diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fa2fa6a..6017f21 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,9 @@ With your PR, here is a check list: -- [ ] Has Test cases written -- [ ] Has all code lines tested +- [ ] Has test cases written? +- [ ] 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 -- [ ] run 'make format' so as to confirm the pyexcel organisation's coding style -- [ ] Please add yourself to 'contributors' section of pyexcel-ods.yml (if not found, please use CONTRIBUTORS.rst) - [ ] Agree on NEW BSD License for your contribution diff --git a/.github/workflows/moban-update.yml b/.github/workflows/moban-update.yml index db4f13a..706fd82 100644 --- a/.github/workflows/moban-update.yml +++ b/.github/workflows/moban-update.yml @@ -5,23 +5,25 @@ jobs: runs-on: ubuntu-latest name: synchronize templates via moban steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.7' - - name: check changes - run: | - pip install moban gitfs2 pypifs - moban - git status - git diff --exit-code - - name: Auto-commit - if: failure() - uses: docker://cdssnc/auto-commit-github-action - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.7' + - name: check changes + run: | + pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible + moban + git status + git diff --exit-code + - name: Auto-commit + if: failure() + uses: docker://cdssnc/auto-commit-github-action + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: >- + This is an auto-commit, updating project meta data, + such as changelog.rst, contributors.rst diff --git a/.gitignore b/.gitignore index a9ca840..e8b12f9 100644 --- a/.gitignore +++ b/.gitignore @@ -540,3 +540,7 @@ cscope.files cscope.out cscope.in.out cscope.po.out + + +# remove moban hash dictionary +.moban.hashes diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 0445133..ccdfc96 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -1,9 +1,10 @@ + 3 contributors ================================================================================ In alphabetical order: -* `Azamat H. Hackimov `_ -* `John Vandenberg `_ -* `Mateusz Konieczny `_ +* `Azamat H. Hackimov `_ +* `John Vandenberg `_ +* `Mateusz Konieczny `_ diff --git a/Makefile b/Makefile index d7e640e..3e0ee51 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,6 @@ test: lint install_test: pip install -r tests/requirements.txt -git-diff-check: - git diff --exit-code - lint: bash lint.sh diff --git a/lint.sh b/lint.sh index 6907d07..891aa63 100644 --- a/lint.sh +++ b/lint.sh @@ -1,3 +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 diff --git a/pyexcel_ods/odsr.py b/pyexcel_ods/odsr.py index 9aa3cee..5cd5113 100644 --- a/pyexcel_ods/odsr.py +++ b/pyexcel_ods/odsr.py @@ -21,16 +21,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pyexcel_io.service as service from odf.text import P from odf.table import Table, TableRow, TableCell # Thanks to grt for the fixes from odf.teletype import extractText from odf.namespaces import OFFICENS -from odf.opendocument import load - -import pyexcel_io.service as service from pyexcel_io.book import BookReader +from odf.opendocument import load from pyexcel_io.sheet import SheetReader from pyexcel_io._compact import OrderedDict diff --git a/pyexcel_ods/odsw.py b/pyexcel_ods/odsw.py index 2cbe118..429bd42 100644 --- a/pyexcel_ods/odsw.py +++ b/pyexcel_ods/odsw.py @@ -9,13 +9,12 @@ """ import sys +import pyexcel_io.service as converter from odf.text import P from odf.table import Table, TableRow, TableCell from odf.namespaces import OFFICENS -from odf.opendocument import OpenDocumentSpreadsheet - -import pyexcel_io.service as converter from pyexcel_io.book import BookWriter +from odf.opendocument import OpenDocumentSpreadsheet from pyexcel_io.sheet import SheetWriter PY2 = sys.version_info[0] == 2 diff --git a/tests/test_bug_fixes.py b/tests/test_bug_fixes.py index de4d13b..c644529 100644 --- a/tests/test_bug_fixes.py +++ b/tests/test_bug_fixes.py @@ -2,13 +2,13 @@ # -*- encoding: utf-8 -*- import os +import psutil import pyexcel as pe from pyexcel_ods import get_data, save_data +from pyexcel_io.exceptions import IntegerAccuracyLossError -import psutil from nose import SkipTest from nose.tools import eq_, raises -from pyexcel_io.exceptions import IntegerAccuracyLossError IN_TRAVIS = "TRAVIS" in os.environ diff --git a/tests/test_filter.py b/tests/test_filter.py index 67d8876..029e04b 100644 --- a/tests/test_filter.py +++ b/tests/test_filter.py @@ -1,8 +1,9 @@ import os -from nose.tools import eq_ from pyexcel_io import get_data, save_data +from nose.tools import eq_ + class TestFilter: def setUp(self):