From a31308d8c3a3e6b7e1fe12e782464b1877a78cb6 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 28 Nov 2020 22:31:59 +0000 Subject: [PATCH 1/6] :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/xls_travis.yml.jj2 | 8 ------ .moban.yml | 1 - .travis.yml | 43 -------------------------------- README.rst | 6 ++--- 7 files changed, 55 insertions(+), 56 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/tests.yml delete mode 100644 .moban.d/xls_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..4b5c675 --- /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_xls --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_xls + - 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/xls_travis.yml.jj2 b/.moban.d/xls_travis.yml.jj2 deleted file mode 100644 index a62287f..0000000 --- a/.moban.d/xls_travis.yml.jj2 +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "travis.yml.jj2" %} -{%block custom_python_versions%} -python: - - 3.8 - - 3.7 - - 3.6 -{%endblock%} - diff --git a/.moban.yml b/.moban.yml index 2af1b28..94ecc3d 100644 --- a/.moban.yml +++ b/.moban.yml @@ -5,7 +5,6 @@ targets: - README.rst: custom_README.rst.jj2 - setup.py: custom_setup.py.jj2 - "docs/source/conf.py": "docs/source/conf.py.jj2" - - .travis.yml: xls_travis.yml.jj2 - .gitignore: gitignore.jj2 - MANIFEST.in: MANIFEST.in.jj2 - "tests/requirements.txt": "tests/custom_requirements.txt.jj2" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9cb4e91..0000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -sudo: false -dist: xenial -language: python -notifications: - email: false -python: - - 3.8 - - 3.7 - - 3.6 - -stages: - - lint - - test - - -.lint: &lint - git: - submodules: false - python: 3.6 - env: - - MINREQ=0 - stage: lint - script: make lint - -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 7cbd400..9773e5f 100644 --- a/README.rst +++ b/README.rst @@ -8,8 +8,8 @@ pyexcel-xls - Let you focus on data, instead of xls format .. 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-xls.svg?branch=master - :target: http://travis-ci.org/pyexcel/pyexcel-xls +.. image:: https://github.com/pyexcel/pyexcel-xls/workflows/run_tests/badge.svg + :target: http://github.com/pyexcel/pyexcel-xls/actions .. image:: https://codecov.io/gh/pyexcel/pyexcel-xls/branch/master/graph/badge.svg :target: https://codecov.io/gh/pyexcel/pyexcel-xls @@ -21,7 +21,7 @@ pyexcel-xls - Let you focus on data, instead of xls format :target: https://anaconda.org/conda-forge/pyexcel-xls .. image:: https://pepy.tech/badge/pyexcel-xls/month - :target: https://pepy.tech/project/pyexcel-xls/month + :target: https://pepy.tech/project/pyexcel-xls .. image:: https://anaconda.org/conda-forge/pyexcel-xls/badges/downloads.svg :target: https://anaconda.org/conda-forge/pyexcel-xls From ced153d95cfb666085cb0cbb6a95923b716d1294 Mon Sep 17 00:00:00 2001 From: Peter Carnesciali Date: Sat, 12 Dec 2020 11:28:55 -0600 Subject: [PATCH 2/6] Lock down xlrd to restore .xlsx support (#41) * Lock down xlrd to restore .xlsx support * Update requirements.txt --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4c06b39..65ffc34 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pyexcel-io>=0.6.2 -xlrd +xlrd<2 xlwt diff --git a/setup.py b/setup.py index 135f172..f88e4ab 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,7 @@ INSTALL_REQUIRES = [ "pyexcel-io>=0.6.2", - "xlrd", + "xlrd<2", "xlwt", ] SETUP_COMMANDS = {} From 488dd0289382b3b8b802a93733022ab213566a56 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 12 Dec 2020 17:29:22 +0000 Subject: [PATCH 3/6] This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst --- .readthedocs.yml | 18 ++++++++++++++++++ CONTRIBUTORS.rst | 3 ++- requirements.txt | 2 +- setup.py | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..a379070 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,18 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# Optionally build your docs in additional formats such as PDF +formats: + - pdf + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.7 diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 9265c0f..aa6bd68 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -1,8 +1,9 @@ -1 contributors +2 contributors ================================================================================ In alphabetical order: * `John Vandenberg `_ +* `Peter Carnesciali `_ diff --git a/requirements.txt b/requirements.txt index 65ffc34..4c06b39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pyexcel-io>=0.6.2 -xlrd<2 +xlrd xlwt diff --git a/setup.py b/setup.py index f88e4ab..135f172 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,7 @@ INSTALL_REQUIRES = [ "pyexcel-io>=0.6.2", - "xlrd<2", + "xlrd", "xlwt", ] SETUP_COMMANDS = {} From 19013b685a1f979386301e20cae833cada3a8589 Mon Sep 17 00:00:00 2001 From: jaska Date: Sat, 12 Dec 2020 17:55:33 +0000 Subject: [PATCH 4/6] Prepare 0.6.2 (#42) * :books: the correct place to update dependencies in pyexcel family. relatedt to #41 * :books: and update change log. related to #41 * This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst Co-authored-by: chfw --- CHANGELOG.rst | 8 ++++++++ changelog.yml | 6 ++++++ docs/source/conf.py | 4 ++-- pyexcel-xls.yml | 8 ++++---- setup.py | 8 ++++---- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8cf4785..613b1e5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,14 @@ Change log ================================================================================ +0.6.2 - 12.12.2020 +-------------------------------------------------------------------------------- + +**Updated** + +#. lock down xlrd version less than version 2.0, because 2.0+ does not support + xlsx read + 0.6.1 - 21.10.2020 -------------------------------------------------------------------------------- diff --git a/changelog.yml b/changelog.yml index a1ceb05..d7e01e3 100644 --- a/changelog.yml +++ b/changelog.yml @@ -1,6 +1,12 @@ name: pyexcel-xls organisation: pyexcel releases: +- changes: + - action: Updated + details: + - "lock down xlrd version less than version 2.0, because 2.0+ does not support xlsx read" + date: 12.12.2020 + version: 0.6.2 - changes: - action: Updated details: diff --git a/docs/source/conf.py b/docs/source/conf.py index 1ed7aba..5e5b7cd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,9 +26,9 @@ copyright = '2015-2020 Onni Software Ltd.' author = 'C.W.' # The short X.Y version -version = '0.6.1' +version = '0.6.2' # The full version, including alpha/beta/rc tags -release = '0.6.1' +release = '0.6.2' # -- General configuration --------------------------------------------------- diff --git a/pyexcel-xls.yml b/pyexcel-xls.yml index 2e474a2..4b55499 100644 --- a/pyexcel-xls.yml +++ b/pyexcel-xls.yml @@ -1,14 +1,14 @@ overrides: "pyexcel.yaml" name: "pyexcel-xls" nick_name: xls -version: 0.6.1 -current_version: 0.6.1 -release: 0.6.1 +version: 0.6.2 +current_version: 0.6.2 +release: 0.6.2 file_type: xls is_on_conda: true dependencies: - pyexcel-io>=0.6.2 - - xlrd + - xlrd<2 - xlwt test_dependencies: - pyexcel diff --git a/setup.py b/setup.py index 135f172..fafb4b7 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ NAME = "pyexcel-xls" AUTHOR = "C.W." -VERSION = "0.6.1" +VERSION = "0.6.2" EMAIL = "info@pyexcel.org" LICENSE = "New BSD" DESCRIPTION = ( @@ -40,7 +40,7 @@ "reads xlsx and xlsm format" ) URL = "https://github.com/pyexcel/pyexcel-xls" -DOWNLOAD_URL = "%s/archive/0.6.1.tar.gz" % URL +DOWNLOAD_URL = "%s/archive/0.6.2.tar.gz" % URL FILES = ["README.rst","CONTRIBUTORS.rst", "CHANGELOG.rst"] KEYWORDS = [ "python", @@ -81,8 +81,8 @@ PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable) HERE = os.path.abspath(os.path.dirname(__file__)) -GS_COMMAND = ("gease pyexcel-xls v0.6.1 " + - "Find 0.6.1 in changelog for more details") +GS_COMMAND = ("gease pyexcel-xls v0.6.2 " + + "Find 0.6.2 in changelog for more details") NO_GS_MESSAGE = ("Automatic github release is disabled. " + "Please install gease to enable it.") UPLOAD_FAILED_MSG = ( From 084fa8ed57fb35879c9c8e77253e562f5e06a174 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 12 Dec 2020 17:56:04 +0000 Subject: [PATCH 5/6] This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4c06b39..65ffc34 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pyexcel-io>=0.6.2 -xlrd +xlrd<2 xlwt diff --git a/setup.py b/setup.py index fafb4b7..9000415 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,7 @@ INSTALL_REQUIRES = [ "pyexcel-io>=0.6.2", - "xlrd", + "xlrd<2", "xlwt", ] SETUP_COMMANDS = {} From 26b665c1373e2c254f942f0edd39e9436a575151 Mon Sep 17 00:00:00 2001 From: jaska Date: Sat, 12 Dec 2020 22:25:40 +0000 Subject: [PATCH 6/6] :books: add usage warning (#44) * :books: add usage warning * This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst * :books: update readme * :sparkles: use pat Co-authored-by: chfw --- .github/workflows/moban-update.yml | 1 + .moban.d/custom_README.rst.jj2 | 21 ++++++++++++++++++--- README.rst | 21 ++++++++++++++++++--- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/.github/workflows/moban-update.yml b/.github/workflows/moban-update.yml index 706fd82..7248179 100644 --- a/.github/workflows/moban-update.yml +++ b/.github/workflows/moban-update.yml @@ -8,6 +8,7 @@ jobs: - uses: actions/checkout@v2 with: ref: ${{ github.head_ref }} + token: ${{ secrets.PAT }} - name: Set up Python uses: actions/setup-python@v1 with: diff --git a/.moban.d/custom_README.rst.jj2 b/.moban.d/custom_README.rst.jj2 index e176dd4..661d558 100644 --- a/.moban.d/custom_README.rst.jj2 +++ b/.moban.d/custom_README.rst.jj2 @@ -4,11 +4,26 @@ {% endblock %} {%block description%} -**pyexcel-{{file_type}}** is a tiny wrapper library to read, manipulate and write data in {{file_type}} format and it can read xlsx and xlsm fromat. You are likely to use it with `pyexcel `_. +**pyexcel-{{file_type}}** is a tiny wrapper library to read, manipulate and +write data in {{file_type}} format and it can read xlsx and xlsm fromat. +You are likely to use it with `pyexcel `_. -New flag: `detect_merged_cells` allows you to spread the same value among all merged cells. But be aware that this may slow down its reading performance. +New flag: `detect_merged_cells` allows you to spread the same value among +all merged cells. But be aware that this may slow down its reading +performance. -New flag: `skip_hidden_row_and_column` allows you to skip hidden rows and columns and is defaulted to **True**. It may slow down its reading performance. And it is only valid for 'xls' files. For 'xlsx' files, please use pyexcel-xlsx. +New flag: `skip_hidden_row_and_column` allows you to skip hidden rows +and columns and is defaulted to **True**. It may slow down its reading +performance. And it is only valid for 'xls' files. For 'xlsx' files, +please use pyexcel-xlsx. + +Warning +================================================================================ + +xls file cannot contain more than 65,000 rows. You are risking the reputation +of yourself/your company/ +`your country `_ if you keep +using xls and are not aware of its row limit. {%endblock%} diff --git a/README.rst b/README.rst index 9773e5f..2505490 100644 --- a/README.rst +++ b/README.rst @@ -35,11 +35,26 @@ pyexcel-xls - Let you focus on data, instead of xls format .. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square :target: https://github.com/psf/black -**pyexcel-xls** is a tiny wrapper library to read, manipulate and write data in xls format and it can read xlsx and xlsm fromat. You are likely to use it with `pyexcel `_. +**pyexcel-xls** is a tiny wrapper library to read, manipulate and +write data in xls format and it can read xlsx and xlsm fromat. +You are likely to use it with `pyexcel `_. -New flag: `detect_merged_cells` allows you to spread the same value among all merged cells. But be aware that this may slow down its reading performance. +New flag: `detect_merged_cells` allows you to spread the same value among +all merged cells. But be aware that this may slow down its reading +performance. -New flag: `skip_hidden_row_and_column` allows you to skip hidden rows and columns and is defaulted to **True**. It may slow down its reading performance. And it is only valid for 'xls' files. For 'xlsx' files, please use pyexcel-xlsx. +New flag: `skip_hidden_row_and_column` allows you to skip hidden rows +and columns and is defaulted to **True**. It may slow down its reading +performance. And it is only valid for 'xls' files. For 'xlsx' files, +please use pyexcel-xlsx. + +Warning +================================================================================ + +xls file cannot contain more than 65,000 rows. You are risking the reputation +of yourself/your company/ +`your country `_ if you keep +using xls and are not aware of its row limit. Support the project