windows bulid on github actions (#107)
* ✨ enable github actions for pyexcel-io. https://github.com/pyexcel/pyexcel/issues/238, https://github.com/pyexcel/pyexcel * 🐛 in test. memory map file on windows needs close. * 💚 increase verbosity * 💚 setup utf-8 encoding * 💚 give a line break * 💚 verify the tests on windows * 💚 python 3 need no unicode annotation * 💚 use Finnish world instead of Chinese one for now * 🔥 extra statement had no use * 🔥 remove travis config * 🔥 repalce travis status * ✨ kick start next version * This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst Co-authored-by: chfw <chfw@users.noreply.github.com>
This commit is contained in:
parent
98e0e762b6
commit
c6111784be
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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 }}
|
|
@ -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
|
||||
|
|
45
.travis.yml
45
.travis.yml
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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|
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
2
setup.py
2
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 = (
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue