From 661d4f0b484ed281128c72e1a2701e2d33fc1879 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 28 Nov 2020 22:33:41 +0000 Subject: [PATCH] :fire: remove travis build from ci. credit goes to #234 --- .github/PULL_REQUEST_TEMPLATE.md | 1 - .github/workflows/lint.yml | 20 ++++++++++++ .github/workflows/tests.yml | 32 ++++++++++++++++++ .moban.d/custom_travis.yml.jj2 | 13 -------- .moban.yml | 1 - .travis.yml | 56 -------------------------------- README.rst | 10 +++--- docs/source/conf.py | 2 +- lint.sh | 2 +- setup.py | 8 ++--- 10 files changed, 64 insertions(+), 81 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/tests.yml delete mode 100644 .moban.d/custom_travis.yml.jj2 delete mode 100644 .travis.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6017f21..8996445 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,5 @@ With your PR, here is a check list: - [ ] Has all code lines tested? - [ ] Has `make format` been run? - [ ] Please update CHANGELOG.yml(not CHANGELOG.rst) -- [ ] Passes all Travis CI builds - [ ] Has fair amount of documentation if your change is complex - [ ] Agree on NEW BSD License for your contribution diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..03122a1 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: lint + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + name: lint code + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: lint + run: | + pip install flake8 + pip install -r tests/requirements.txt + flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . + python setup.py checkdocs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..5d03855 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: run_tests + +on: [push, pull_request] + +jobs: + test: + strategy: + fail-fast: false + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + os: [macOs-latest, ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.os }} + name: run tests + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: install + run: | + pip install -r requirements.txt + pip install -r tests/requirements.txt + - name: test + run: | + pip freeze + nosetests --verbosity=3 --with-coverage --cover-package pyexcel_ods --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_ods + - name: Upload coverage + uses: codecov/codecov-action@v1 + with: + name: ${{ matrix.os }} Python ${{ matrix.python-version }} \ No newline at end of file diff --git a/.moban.d/custom_travis.yml.jj2 b/.moban.d/custom_travis.yml.jj2 deleted file mode 100644 index d330a08..0000000 --- a/.moban.d/custom_travis.yml.jj2 +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "travis.yml.jj2" %} -{%block extra_matrix %} -env: - - MINREQ=1 -{%endblock%} -{%block custom_python_versions%} -python: - - 3.8 - - 3.7 - - 3.6 -{%endblock%} -{%block pypi_deployment%} -{%endblock %} diff --git a/.moban.yml b/.moban.yml index 4f49247..46b2d76 100644 --- a/.moban.yml +++ b/.moban.yml @@ -5,6 +5,5 @@ targets: - README.rst: custom_README.rst.jj2 - setup.py: custom_setup.py.jj2 - "docs/source/conf.py": "docs/source/conf.py.jj2" - - .travis.yml: custom_travis.yml.jj2 - .gitignore: gitignore.jj2 - MANIFEST.in: MANIFEST.in.jj2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8718cdd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -sudo: false -dist: xenial -language: python -notifications: - email: false -python: - - 3.8 - - 3.7 - - 3.6 -env: - - MINREQ=1 - -stages: - - lint - - moban - - test - - -.lint: &lint - git: - submodules: false - python: 3.6 - env: - - MINREQ=0 - stage: lint - script: make lint - -.moban: &moban - python: 3.6 - env: - - MINREQ=0 - stage: moban - install: pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible - script: - - moban - - git diff --exit-code - -jobs: - include: - - *moban - - *lint - -stage: test - -before_install: - - if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then - mv min_requirements.txt requirements.txt ; - fi - - test ! -f rnd_requirements.txt || - pip install --no-deps -r rnd_requirements.txt - - test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ; - - pip install -r tests/requirements.txt -script: - - make test -after_success: - codecov diff --git a/README.rst b/README.rst index abbced9..b74e157 100644 --- a/README.rst +++ b/README.rst @@ -5,11 +5,11 @@ pyexcel-ods - Let you focus on data, instead of ods format .. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png :target: https://www.patreon.com/chfw -.. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg +.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel-mobans/master/images/awesome-badge.svg :target: https://awesome-python.com/#specific-formats-processing -.. image:: https://travis-ci.org/pyexcel/pyexcel-ods.svg?branch=master - :target: http://travis-ci.org/pyexcel/pyexcel-ods +.. image:: https://github.com/pyexcel/pyexcel-ods/workflows/run_tests/badge.svg + :target: http://github.com/pyexcel/pyexcel-ods/actions .. image:: https://codecov.io/gh/pyexcel/pyexcel-ods/branch/master/graph/badge.svg :target: https://codecov.io/gh/pyexcel/pyexcel-ods @@ -19,7 +19,7 @@ pyexcel-ods - Let you focus on data, instead of ods format .. image:: https://pepy.tech/badge/pyexcel-ods/month - :target: https://pepy.tech/project/pyexcel-ods/month + :target: https://pepy.tech/project/pyexcel-ods .. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg @@ -61,6 +61,8 @@ Known constraints Fonts, colors and charts are not supported. +Nor to read password protected xls, xlsx and ods files. + Installation ================================================================================ diff --git a/docs/source/conf.py b/docs/source/conf.py index 5a459b0..46df225 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,7 +23,7 @@ DESCRIPTION = ( project = 'pyexcel-ods' copyright = '2015-2020 Onni Software Ltd.' -author = 'chfw' +author = 'C.W.' # The short X.Y version version = '0.6.0' # The full version, including alpha/beta/rc tags diff --git a/lint.sh b/lint.sh index 891aa63..d31eeaa 100644 --- a/lint.sh +++ b/lint.sh @@ -1,2 +1,2 @@ pip install flake8 -flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . && python setup.py checkdocs +flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . && python setup.py checkdocs \ No newline at end of file diff --git a/setup.py b/setup.py index e4a3e42..b9f9462 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ except (ValueError, UnicodeError, locale.Error): locale.setlocale(locale.LC_ALL, "en_US.UTF-8") NAME = "pyexcel-ods" -AUTHOR = "chfw" +AUTHOR = "C.W." VERSION = "0.6.0" EMAIL = "info@pyexcel.org" LICENSE = "New BSD" @@ -70,13 +70,14 @@ EXTRAS_REQUIRE = { } # You do not need to read beyond this line PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable) -GS_COMMAND = ("gs pyexcel-ods v0.6.0 " + +HERE = os.path.abspath(os.path.dirname(__file__)) + +GS_COMMAND = ("gease pyexcel-ods v0.6.0 " + "Find 0.6.0 in changelog for more details") NO_GS_MESSAGE = ("Automatic github release is disabled. " + "Please install gease to enable it.") UPLOAD_FAILED_MSG = ( 'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND) -HERE = os.path.abspath(os.path.dirname(__file__)) class PublishCommand(Command): @@ -122,7 +123,6 @@ SETUP_COMMANDS.update({ "publish": PublishCommand }) - def has_gease(): """ test if github release command is installed