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..5703185 --- /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_io --cover-package tests tests --with-doctest --doctest-extension=.rst README.rst docs/source pyexcel_io + - 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.yml b/.moban.yml index b73e1fa..864d61c 100644 --- a/.moban.yml +++ b/.moban.yml @@ -4,7 +4,6 @@ configuration: targets: - "docs/source/conf.py": "docs/source/custom_conf.py.jj2" - setup.py: io_setup.py.jj2 - - .travis.yml: custom_travis.yml.jj2 - README.rst: io_readme.rst.jj2 - "docs/source/index.rst": "docs/source/index.rst.jj2" - .gitignore: gitignore.jj2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 208ab50..0000000 --- a/.travis.yml +++ /dev/null @@ -1,45 +0,0 @@ -sudo: false -dist: xenial -language: python -notifications: - email: false -python: - - 3.8 - - 3.7 - - 3.6 -env: - - MINREQ=1 - -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 4dabd67..4a3e5ae 100644 --- a/README.rst +++ b/README.rst @@ -8,8 +8,8 @@ pyexcel-io - Let you focus on data, instead of file formats .. 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-io.svg?branch=master - :target: http://travis-ci.org/pyexcel/pyexcel-io +.. image:: https://github.com/actions/pyexcel/pyexcel-io/workflows/.github/workflows/tests.yml/badge.svg + :target: http://github.com/pyexcel/pyexcel-io .. image:: https://codecov.io/gh/pyexcel/pyexcel-io/branch/master/graph/badge.svg :target: https://codecov.io/gh/pyexcel/pyexcel-io diff --git a/docs/source/conf.py b/docs/source/conf.py index de27cdb..5da08a2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -26,7 +26,7 @@ project = 'pyexcel-io' copyright = '2015-2020 Onni Software Ltd.' author = 'C.W.' # The short X.Y version -version = '0.6.4' +version = '0.6.5' # The full version, including alpha/beta/rc tags release = '0.6.4' diff --git a/docs/source/index.rst b/docs/source/index.rst index 00332e4..ad3a030 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -10,6 +10,7 @@ :Source code: http://github.com/pyexcel/pyexcel-io.git :Issues: http://github.com/pyexcel/pyexcel-io/issues :License: New BSD License +:Development: |release| :Released: |version| :Generated: |today| diff --git a/docs/source/plaincsv.rst b/docs/source/plaincsv.rst index c6c3490..c009627 100644 --- a/docs/source/plaincsv.rst +++ b/docs/source/plaincsv.rst @@ -153,7 +153,7 @@ Here is an example to write a sentence of "Shui Dial Getou"[#f2] into a csv file .. code-block:: python - >>> content = [[u'人有悲歡離合', u'月有陰晴圓缺']] + >>> content = [['löyly', 'löyly']] >>> test_file = "test-utf8-BOM.csv" >>> save_data(test_file, content, encoding="utf-8-sig", lineterminator="\n") diff --git a/pyexcel-io.yml b/pyexcel-io.yml index fbf944e..2ba98b1 100644 --- a/pyexcel-io.yml +++ b/pyexcel-io.yml @@ -2,8 +2,8 @@ overrides: "pyexcel.yaml" project: "pyexcel-io" name: pyexcel-io nick_name: io -version: 0.6.4 -current_version: 0.6.4 +version: 0.6.5 +current_version: 0.6.5 release: 0.6.4 copyright_year: 2015-2020 moban_command: false diff --git a/setup.py b/setup.py index 267d6a2..4bad324 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ except (ValueError, UnicodeError, locale.Error): NAME = "pyexcel-io" AUTHOR = "C.W." -VERSION = "0.6.4" +VERSION = "0.6.5" EMAIL = "info@pyexcel.org" LICENSE = "New BSD" DESCRIPTION = ( diff --git a/tests/test_issues.py b/tests/test_issues.py index d9cbfd6..6486c6a 100644 --- a/tests/test_issues.py +++ b/tests/test_issues.py @@ -103,6 +103,7 @@ def check_mmap_encoding(encoding): memory_mapped_file = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) data = get_data(memory_mapped_file, file_type="csv", encoding=encoding) eq_(data["csv"], content) + memory_mapped_file.close() os.unlink(test_file)