From abfd780612b3c7f783ff596ca390abebbf3e268d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 22:22:48 +0100 Subject: [PATCH 01/10] GitHub Action to test with tox As discussed at https://github.com/WebwareForPython/DBUtils/pull/28#issuecomment-805182535 --- .github/workflows/test_with_tox.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/test_with_tox.yml diff --git a/.github/workflows/test_with_tox.yml b/.github/workflows/test_with_tox.yml new file mode 100644 index 0000000..b0e96bc --- /dev/null +++ b/.github/workflows/test_with_tox.yml @@ -0,0 +1,18 @@ +name: Python package + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python: [2.7, 3.6, 3.7, 3.8, 3.9] + steps: + - uses: actions/checkout@v2 + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - run: pip install tox + - run: tox -e py From 63d9645d11ee9edd3cbaa24793f9704c2f6a3869 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 22:27:27 +0100 Subject: [PATCH 02/10] Update test_with_tox.yml --- .github/workflows/test_with_tox.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_with_tox.yml b/.github/workflows/test_with_tox.yml index b0e96bc..33f7e7f 100644 --- a/.github/workflows/test_with_tox.yml +++ b/.github/workflows/test_with_tox.yml @@ -16,3 +16,5 @@ jobs: python-version: ${{ matrix.python }} - run: pip install tox - run: tox -e py + - if: matrix.python == 3.9 + run: TOXENV=flake8,manifest,docs tox From aa0c7c7c9e6a97691516c0b9758ee568137193f9 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 22:29:54 +0100 Subject: [PATCH 03/10] flake8 the entire repo --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2de6636..66d1f54 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ commands = basepython = python3.8 deps = flake8 commands = - flake8 dbutils tests docs setup.py + flake8 . [testenv:manifest] basepython = python3.8 From 2bbed1a3f61c8595b12917a34bcf32d459a0bedb Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 22:52:56 +0100 Subject: [PATCH 04/10] codespell --quiet-level=2 --skip="./docs/main.de.*" --- tox.ini | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 66d1f54..bc7ffd9 100644 --- a/tox.ini +++ b/tox.ini @@ -8,20 +8,26 @@ deps = pytest commands = pytest {posargs} +[testenv:codespell] +basepython = python3.9 +deps = codespell +commands = + codespell --quiet-level=2 --skip="./docs/main.de.*" + [testenv:flake8] -basepython = python3.8 +basepython = python3.9 deps = flake8 commands = flake8 . [testenv:manifest] -basepython = python3.8 +basepython = python3.9 deps = check-manifest commands = check-manifest -v [testenv:docs] -basepython = python3.8 +basepython = python3.9 deps = docutils changedir = docs commands = From 783082abfdae935d5b86c726001984e26b93ccba Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 22:55:30 +0100 Subject: [PATCH 05/10] TOXENV=codespell,flake8,manifest,docs tox --- .github/workflows/test_with_tox.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_with_tox.yml b/.github/workflows/test_with_tox.yml index 33f7e7f..e19f860 100644 --- a/.github/workflows/test_with_tox.yml +++ b/.github/workflows/test_with_tox.yml @@ -17,4 +17,4 @@ jobs: - run: pip install tox - run: tox -e py - if: matrix.python == 3.9 - run: TOXENV=flake8,manifest,docs tox + run: TOXENV=codespell,flake8,manifest,docs tox From 83e29d4938f7c1ed121e215378c6723875259b80 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 22:58:44 +0100 Subject: [PATCH 06/10] codespell --quiet-level=2 --skip="./.*,./docs/main.de.*" --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index bc7ffd9..2fc157d 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ commands = basepython = python3.9 deps = codespell commands = - codespell --quiet-level=2 --skip="./docs/main.de.*" + codespell --quiet-level=2 --skip="./.*,./docs/main.de.*" [testenv:flake8] basepython = python3.9 From 3477d9f785c50cfd87f4a22dae5ebe8fe5d551d2 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 23:03:41 +0100 Subject: [PATCH 07/10] Update tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2fc157d..5c0e49d 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ commands = basepython = python3.9 deps = codespell commands = - codespell --quiet-level=2 --skip="./.*,./docs/main.de.*" + codespell --ignore-words-list="dont" --quiet-level=2 --skip="./.*,./docs/main.de.*" [testenv:flake8] basepython = python3.9 From 5433a53b74e4002ca7ee900ce796715d1e08d2e1 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 23:05:00 +0100 Subject: [PATCH 08/10] Fix typo discovered by codespell --- dbutils/simple_pooled_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbutils/simple_pooled_db.py b/dbutils/simple_pooled_db.py index cfd2c8b..5e31b29 100644 --- a/dbutils/simple_pooled_db.py +++ b/dbutils/simple_pooled_db.py @@ -47,7 +47,7 @@ * Connections should have some sort of maximum usage limit after which they should be automatically closed and reopened. * Prefer or enforce thread-affinity for the connections, -allowing for both sharable and non-sharable connections. +allowing for both shareable and non-shareable connections. Please note that these and other ideas have been already implemented in in PooledDB, a more sophisticated version From 9967c946ce4c772267440ed38b8530e5a2c1adaf Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 23:07:14 +0100 Subject: [PATCH 09/10] Update tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 5c0e49d..9700b46 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ commands = basepython = python3.9 deps = codespell commands = - codespell --ignore-words-list="dont" --quiet-level=2 --skip="./.*,./docs/main.de.*" + codespell --ignore-words-list="dont'" --quiet-level=2 --skip="./.*,./docs/main.de.*" [testenv:flake8] basepython = python3.9 From 72722d370d8c8794fa48ab0f5c1073df1185a784 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 23 Mar 2021 23:12:31 +0100 Subject: [PATCH 10/10] Delete .travis.yml --- .travis.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d67b1e0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Travis CI configuration -# see https://docs.travis-ci.com/user/languages/python - -language: python -matrix: - include: - - name: Code quality tests - env: TOXENV=flake8,manifest,docs - python: 3.8 - - name: Unit tests with Python 3.8 - env: TOXENV=py38 - python: 3.8 - - name: Unit tests with Python 3.7 - env: TOXENV=py37 - python: 3.7 - - name: Unit tests with Python 3.6 - env: TOXENV=py36 - python: 3.6 - - name: Unit tests with Python 3.5 - env: TOXENV=py35 - python: 3.5 - - name: Unit tests with Python 2.7 - env: TOXENV=py27 - python: 2.7 -cache: - directories: - - "$HOME/.cache/pip" - - "$TRAVIS_BUILD_DIR/.tox" -install: - - pip install tox -script: - - tox -e $TOXENV