From 70f533d8c993af851b525cd91071f81e2265f3cf Mon Sep 17 00:00:00 2001 From: chfw Date: Sun, 22 Nov 2020 22:18:53 +0000 Subject: [PATCH 1/4] :horse: popagate goodies from pyexcel project to all plugins. https://github.com/pyexcel/pyexcel/pull/234 --- .github/workflows/lint.yml | 20 ++++++++++++++++++++ .github/workflows/tests.yml | 34 ++++++++++++++++++++++++++++++++++ README.rst | 6 ++++-- docs/source/conf.py | 2 +- lint.sh | 2 +- setup.py | 8 ++++---- 6 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/tests.yml 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..c96cb58 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +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 min_requirements + if: matrix.python-version == 3.6 + run: | + rm requirements.txt + mv min_requirements.txt requirements.txt + - name: install + run: | + pip install -r requirements.txt + pip install -r tests/requirements.txt + - name: test + run: | + pip freeze + nosetests --with-coverage --cover-package pyexcel --cover-package tests tests --with-doctest --doctest-extension=.rst docs/source pyexcel + \ No newline at end of file diff --git a/README.rst b/README.rst index d2160f5..fcb2c20 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ pyexcel-xlsx - Let you focus on data, instead of xlsx 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-xlsx.svg?branch=master @@ -21,7 +21,7 @@ pyexcel-xlsx - Let you focus on data, instead of xlsx format :target: https://anaconda.org/conda-forge/pyexcel-xlsx .. image:: https://pepy.tech/badge/pyexcel-xlsx/month - :target: https://pepy.tech/project/pyexcel-xlsx/month + :target: https://pepy.tech/project/pyexcel-xlsx .. image:: https://anaconda.org/conda-forge/pyexcel-xlsx/badges/downloads.svg :target: https://anaconda.org/conda-forge/pyexcel-xlsx @@ -67,6 +67,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 b190c67..64f8e7a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ project = 'pyexcel-xlsx' 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 d49d6ce..45674c2 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ locale.setlocale(locale.LC_ALL, "en_US.UTF-8") NAME = "pyexcel-xlsx" -AUTHOR = "chfw" +AUTHOR = "C.W." VERSION = "0.6.0" EMAIL = "info@pyexcel.org" LICENSE = "New BSD" @@ -73,13 +73,14 @@ } # 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-xlsx v0.6.0 " + +HERE = os.path.abspath(os.path.dirname(__file__)) + +GS_COMMAND = ("gease pyexcel-xlsx 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): @@ -125,7 +126,6 @@ def run(self): "publish": PublishCommand }) - def has_gease(): """ test if github release command is installed From 30b4efc32f6e7d8e4671ac66e48b1e07d13805b1 Mon Sep 17 00:00:00 2001 From: chfw Date: Sun, 22 Nov 2020 22:23:27 +0000 Subject: [PATCH 2/4] :fire: remove min requirement tests for now --- .github/workflows/tests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c96cb58..5ced797 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,11 +18,6 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: install min_requirements - if: matrix.python-version == 3.6 - run: | - rm requirements.txt - mv min_requirements.txt requirements.txt - name: install run: | pip install -r requirements.txt From def9791599b5b3f3546cdda653ce4ab3ffef8667 Mon Sep 17 00:00:00 2001 From: chfw Date: Mon, 23 Nov 2020 21:46:53 +0000 Subject: [PATCH 3/4] :green_heart: now test pyexcel_xlsx --- .github/workflows/tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5ced797..15fd3cb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,14 +10,14 @@ jobs: python-version: [3.6, 3.7, 3.8, 3.9] os: [macOs-latest, ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + 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 }} + python-version: ${{ matrix.python-version }} - name: install run: | pip install -r requirements.txt @@ -25,5 +25,4 @@ jobs: - name: test run: | pip freeze - nosetests --with-coverage --cover-package pyexcel --cover-package tests tests --with-doctest --doctest-extension=.rst docs/source pyexcel - \ No newline at end of file + nosetests --with-coverage --cover-package pyexcel_xlsx --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xlsx \ No newline at end of file From 54e3c5e5af3a5fb91672fcdc5b7d272a47f98f14 Mon Sep 17 00:00:00 2001 From: chfw Date: Mon, 23 Nov 2020 21:51:55 +0000 Subject: [PATCH 4/4] :sparkles: add coverage on github action. https://github.com/pyexcel/pyexcel/issues/238 --- .github/workflows/tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 15fd3cb..16f3375 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: python-version: [3.6, 3.7, 3.8, 3.9] os: [macOs-latest, ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os }} name: run tests steps: - uses: actions/checkout@v2 @@ -25,4 +25,8 @@ jobs: - name: test run: | pip freeze - nosetests --with-coverage --cover-package pyexcel_xlsx --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xlsx \ No newline at end of file + nosetests --with-coverage --cover-package pyexcel_xlsx --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xlsx + - name: Upload coverage + uses: codecov/codecov-action@v1 + with: + name: ${{ matrix.os }} Python ${{ matrix.python-version }} \ No newline at end of file