From cc52fdbd416512243c22de76363576966a634eb4 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 21:45:45 +0800 Subject: [PATCH 1/8] build: switch to tox-poetry-installer --- .github/workflows/pythonapp.yaml | 2 +- tox.ini | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pythonapp.yaml b/.github/workflows/pythonapp.yaml index 45f8e864..2f42ef9e 100644 --- a/.github/workflows/pythonapp.yaml +++ b/.github/workflows/pythonapp.yaml @@ -31,7 +31,7 @@ jobs: cache: poetry - name: Install tox run: | - python -m pip install --upgrade tox tox-gh-actions + python -m pip install --upgrade tox tox-gh-actions tox-poetry-installer[poetry] - name: Lint with flake8 run: | pip install flake8 diff --git a/tox.ini b/tox.ini index cf75560f..1645fef4 100644 --- a/tox.ini +++ b/tox.ini @@ -11,20 +11,18 @@ python = 3.10: py310 [testenv:mypy] -whitelist_externals = poetry commands = - poetry install -v poetry run mypy . [testenv:duckdb_master] -whitelist_externals = poetry +deps = + duckdb commands = - poetry install -v - poetry run pip install duckdb --pre -U poetry run pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs +pip_pre = true [testenv] -whitelist_externals = poetry commands = - poetry install -v poetry run pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs +install_dev_deps = True +require_poetry = True From e52e74ea54e6a9e1bc6bb85769bd69129c4687a7 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 21:50:14 +0800 Subject: [PATCH 2/8] chore: run pytest directly --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 1645fef4..439212bb 100644 --- a/tox.ini +++ b/tox.ini @@ -18,11 +18,11 @@ commands = deps = duckdb commands = - poetry run pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs + pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs pip_pre = true [testenv] commands = - poetry run pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs + pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs install_dev_deps = True require_poetry = True From a484d69a2ada76b32d967b9868e551814dfa6d8c Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 21:56:47 +0800 Subject: [PATCH 3/8] chore: pass through HOME --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 439212bb..711cdfdf 100644 --- a/tox.ini +++ b/tox.ini @@ -26,3 +26,4 @@ commands = pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs install_dev_deps = True require_poetry = True +passenv = HOME From 05eda5bf9b4ed8d5a0e26ca6e1d99f40c1ce957d Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 22:02:09 +0800 Subject: [PATCH 4/8] chore: debug installation --- .github/workflows/pythonapp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonapp.yaml b/.github/workflows/pythonapp.yaml index 2f42ef9e..331e61f0 100644 --- a/.github/workflows/pythonapp.yaml +++ b/.github/workflows/pythonapp.yaml @@ -40,7 +40,7 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with tox - run: tox -e duckdb_master + run: tox -e duckdb_master -vvvv if: matrix.bleeding_edge - name: Test with tox run: tox From 9551f189e9b7e2be23c145982e2a6a8e0430898a Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 22:05:17 +0800 Subject: [PATCH 5/8] chore: use custom install_command --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 711cdfdf..d0aa82a3 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,6 @@ deps = duckdb commands = pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs -pip_pre = true [testenv] commands = @@ -27,3 +26,4 @@ commands = install_dev_deps = True require_poetry = True passenv = HOME +install_command = pip install --pre -U {opts} {packages} From 09dc6a77aabb05dd81599fe9caeaf6d79f025928 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 22:06:21 +0800 Subject: [PATCH 6/8] chore: remove mypy run prefix --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d0aa82a3..2b09fccd 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ python = [testenv:mypy] commands = - poetry run mypy . + mypy . [testenv:duckdb_master] deps = From f4585d52d9ebfecaf0a92c0d1757fe071710da0b Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 22:08:09 +0800 Subject: [PATCH 7/8] chore: turn verbosity back down --- .github/workflows/pythonapp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonapp.yaml b/.github/workflows/pythonapp.yaml index 331e61f0..2f42ef9e 100644 --- a/.github/workflows/pythonapp.yaml +++ b/.github/workflows/pythonapp.yaml @@ -40,7 +40,7 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with tox - run: tox -e duckdb_master -vvvv + run: tox -e duckdb_master if: matrix.bleeding_edge - name: Test with tox run: tox From a767d7869d42593359cf56d670016724fb905097 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 24 Aug 2022 22:14:13 +0800 Subject: [PATCH 8/8] chore: remove duplicate commands def --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index 2b09fccd..2d7ad4e0 100644 --- a/tox.ini +++ b/tox.ini @@ -17,8 +17,6 @@ commands = [testenv:duckdb_master] deps = duckdb -commands = - pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml --verbose -rs [testenv] commands =