From 04a5e39fd61475028bb1e5a1ff567f2e21e56251 Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Thu, 31 Oct 2024 09:28:36 +0200 Subject: [PATCH 1/5] Add setuptools to setup_requirements --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 09cd257a..066413aa 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ extras_require["complete-cuda"] = sorted(set(sum(_all_extras, []))) -setup_requirements = [] +setup_requirements = ["setuptools"] test_requirements = ( extras_require["testing"] + extras_require["astropy"] From e50b588afc09b8e2e08a2a56018fa8f41652160c Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Thu, 31 Oct 2024 09:35:59 +0200 Subject: [PATCH 2/5] Revert "Add setuptools to setup_requirements" This reverts commit 04a5e39fd61475028bb1e5a1ff567f2e21e56251. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 066413aa..09cd257a 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ extras_require["complete-cuda"] = sorted(set(sum(_all_extras, []))) -setup_requirements = ["setuptools"] +setup_requirements = [] test_requirements = ( extras_require["testing"] + extras_require["astropy"] From 7daea958af42809dbb8112d854b3b26673bd968a Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Thu, 31 Oct 2024 09:47:48 +0200 Subject: [PATCH 3/5] Use virtual environments, rather than pipenv --- .github/workflows/ci.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b994a074..aa30850c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: python -m pip install -U pip setuptools - pipenv + virtualenv - name: Checkout source uses: actions/checkout@v4 @@ -64,11 +64,18 @@ jobs: echo "NUMBA_NRT_STATS=1" >> .env echo "NUMBA_CAPTURED_ERRORS='new_style'" >> .env + - name: Create base virtual environment + run: python -m virtualenv -p ${{ matrix.python-version }} /tmp/base + - name: Install base codex-africanus - run: pipenv install .[testing] + run: | + source /tmp/base/activate + pip install .[testing] - name: Run base test suite - run: pipenv run py.test -s -vvv africanus/ + run: | + source /tmp/base/activate + py.test -s -vvv africanus/ - name: List the measures directory run: curl ftp://ftp.astron.nl/outgoing/Measures/ > measures_dir.txt @@ -89,17 +96,18 @@ jobs: curl ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar | tar xvzf - -C ~/measures echo "measures.directory: ~/measures" > ~/.casarc - - name: Install complete codex-africanus - run: > - pipenv install - .[complete] - git+https://gitlab.mpcdf.mpg.de/ift/nifty_gridder.git#egg=nifty-gridder + - name: Create complete virtual environment + run: python -m virtualenv -p ${{ matrix.python-version }} /tmp/complete - - name: Log installed package versions - run: pipenv graph + - name: Install complete codex-africanus + run: | + source /tmp/complete/activate + pip install .[complete] git+https://gitlab.mpcdf.mpg.de/ift/nifty_gridder.git#egg=nifty-gridder - name: Run complete test suite - run: pipenv run py.test -s -vvv africanus/ + run: | + source /tmp/complete/activate + py.test -s -vvv africanus/ deploy: needs: [test] From 6dac25cc476bafb41ce7a5e741f958610735af29 Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Thu, 31 Oct 2024 09:52:01 +0200 Subject: [PATCH 4/5] Fix venv activation instructions --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa30850c..a7f8350d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,12 +69,12 @@ jobs: - name: Install base codex-africanus run: | - source /tmp/base/activate + source /tmp/base/bin/activate pip install .[testing] - name: Run base test suite run: | - source /tmp/base/activate + source /tmp/base/bin/activate py.test -s -vvv africanus/ - name: List the measures directory @@ -101,12 +101,12 @@ jobs: - name: Install complete codex-africanus run: | - source /tmp/complete/activate + source /tmp/complete/bin/activate pip install .[complete] git+https://gitlab.mpcdf.mpg.de/ift/nifty_gridder.git#egg=nifty-gridder - name: Run complete test suite run: | - source /tmp/complete/activate + source /tmp/complete/bin/activate py.test -s -vvv africanus/ deploy: From a6f28c056692fc6f23aa1ba1d776a79995d36246 Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Thu, 31 Oct 2024 09:54:00 +0200 Subject: [PATCH 5/5] [skip ci] Update HISTORY.rst --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 0fc54441..69c3be3d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ History 0.3.8 (2024-09-29) ------------------ +* Use virtualenv to setup github CI test environments (:pr:`321`) * Update to NumPy 2.0.0 (:pr:`317`) * Update to python-casacore 3.6.1 (:pr:`317`) * Test on Python 3.12 (:pr:`318`)