From d6a59dc7c87e6b1c67d970b1415c1479d7a32b86 Mon Sep 17 00:00:00 2001 From: Bart van Andel Date: Sun, 15 Dec 2024 17:14:18 +0100 Subject: [PATCH] chore: update dependencies and test matrix - Update pytest 8.3.{3=>4} - Update pytest-cov {5=>6}.0.0 for Python >= 3.9 - Update numpy 1.26.{3=>4} for Python >= 3.9 - Add support for numpy 2.x, requires Python >= 3.9 - Add separate test runs for NumPy 1.x and 2.x - Enable support for Python 3.13 - Update gh-action-pypi-publish 1.1{0=>2}.3 in GitHub Actions config --- .github/workflows/ci.yml | 21 ++++++++++++++------- numpy-1.x-requirements.txt | 2 ++ numpy-2.x-requirements.txt | 3 +++ numpy-requirements.txt | 2 -- requirements.txt | 5 +++-- 5 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 numpy-1.x-requirements.txt create mode 100644 numpy-2.x-requirements.txt delete mode 100644 numpy-requirements.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e88bdc3..90dfd63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,16 +17,23 @@ jobs: fail-fast: true matrix: python-version: + - "3.13" - "3.12" - "3.11" - "3.10" - "3.9" - "3.8" - numpy: - - true + numpy-version: - false + - "1.x" + - "2.x" + exclude: + - python-version: "3.13" + numpy-version: "1.x" + - python-version: "3.8" + numpy-version: "2.x" - name: "Tests (Python v${{ matrix.python-version }}, NumPy: ${{ matrix.numpy }})" + name: "Tests (Python v${{ matrix.python-version }}, NumPy: ${{ matrix.numpy-version }})" runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -37,8 +44,8 @@ jobs: - run: pip install -r requirements.txt - - run: pip install -r numpy-requirements.txt - if: matrix.numpy == true + - run: pip install -r numpy-${{ matrix.numpy-version }}-requirements.txt + if: matrix.numpy-version != false - run: pytest -v --cov=utm --color=yes @@ -53,11 +60,11 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - run: python setup.py sdist - - uses: pypa/gh-action-pypi-publish@v1.10.3 + - uses: pypa/gh-action-pypi-publish@v1.12.3 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} diff --git a/numpy-1.x-requirements.txt b/numpy-1.x-requirements.txt new file mode 100644 index 0000000..527154c --- /dev/null +++ b/numpy-1.x-requirements.txt @@ -0,0 +1,2 @@ +numpy==1.24.4; python_version < '3.9' +numpy==1.26.4; python_version >= '3.9' and python_version < '3.13' diff --git a/numpy-2.x-requirements.txt b/numpy-2.x-requirements.txt new file mode 100644 index 0000000..ab78893 --- /dev/null +++ b/numpy-2.x-requirements.txt @@ -0,0 +1,3 @@ +numpy==2.0.0; python_version >= '3.9' and python_version < '3.10' +numpy==2.1.0; python_version >= '3.10' and python_version < '3.13' +numpy==2.2.0; python_version >= '3.13' diff --git a/numpy-requirements.txt b/numpy-requirements.txt deleted file mode 100644 index 8758635..0000000 --- a/numpy-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -numpy==1.24.4; python_version < '3.9' -numpy==1.26.3; python_version >= '3.9' \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 549199a..754f19f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -pytest==8.3.3 -pytest-cov==5.0.0 \ No newline at end of file +pytest==8.3.4 +pytest-cov==5.0.0; python_version < '3.9' +pytest-cov==6.0.0; python_version >= '3.9'