Skip to content

Commit fc56cfd

Browse files
committed
Add conservative CI matrix exclusions for NumPy 2.x testing
Implement targeted NumPy 2.x testing strategy to protect stable baseline while enabling forward compatibility validation: Matrix changes: - Python 3.10: ONLY NumPy 1.26.4 (protected stable baseline) - Python 3.11: NumPy 1.26.4 AND NumPy 2.0 (forward compat testing) - Python 3.12: ONLY NumPy 1.26.4 (exclude NumPy 2.x due to upstream instability) Implementation: - Added matrix.exclude rules for Python 3.10 + numpy~=2.0 - Added matrix.exclude rules for Python 3.12 + numpy~=2.0 - Added NumPy version verification step for debugging/transparency - Reduces CI matrix from 6 to 4 combinations (more focused) Rationale: - Protects Python 3.10 + NumPy 1.26.4 as stable baseline (current Colab) - Python 3.11 provides middle ground for NumPy 2.x validation - Python 3.12 + NumPy 2.x excluded due to known zarr/numcodecs instability - Dependencies (numpy >=1.26,<2.2, numcodecs >=0.16) support both versions No application code changes - CI workflow only.
1 parent a013d98 commit fc56cfd

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ jobs:
1313
matrix:
1414
python-version: ["3.10", "3.11", "3.12"]
1515
numpy-version:
16-
- "numpy==1.26.4" # current colab version
17-
- "numpy~=2.0" # 2.0 series
16+
- "numpy==1.26.4" # current colab version
17+
- "numpy~=2.0" # 2.0 series
1818
# numba (0.60.0) does not yet support numpy 2.1, disable this for now
1919
# - "numpy~=2.1" # 2.1 series
20+
exclude:
21+
# Python 3.10: ONLY test with NumPy 1.26.4 (stable baseline)
22+
- python-version: "3.10"
23+
numpy-version: "numpy~=2.0"
24+
# Python 3.12: ONLY test with NumPy 1.26.4 (upstream wheel/zarr instability)
25+
- python-version: "3.12"
26+
numpy-version: "numpy~=2.0"
2027
runs-on: ubuntu-latest
2128

2229
steps:
@@ -32,5 +39,8 @@ jobs:
3239
- name: Install package
3340
run: pip install "${{ matrix.numpy-version }}" .[dev]
3441

42+
- name: Verify NumPy version
43+
run: python -c "import numpy; print('NumPy version:', numpy.__version__)"
44+
3545
- name: Run unit tests
3646
run: pytest -v tests --ignore tests/integration --typeguard-packages=malariagen_data,malariagen_data.anoph

0 commit comments

Comments
 (0)