Skip to content

Commit c7f0c4a

Browse files
authored
Remove NumPy<2 constraint (PyDMD#560)
* remove restriction * numpy tests * black * use vrs supported on py3.8 * exclude 3.8 from npy 2.0.2 * propagate exclude * exclude more * fix exclusion * exclude 1.26
1 parent 201f910 commit c7f0c4a

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.github/workflows/testing_pr.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ jobs:
9898
cache-dependency-path: pyproject.toml
9999
- name: Install Python dependencies
100100
run: |
101-
pip install --upgrade pip
102101
pip install .[test]
102+
# Force NumPy version
103+
pip install numpy==${{ matrix.numpy-version }}
103104
- name: Test with pytest
104105
run: |
105106
pytest
@@ -125,10 +126,11 @@ jobs:
125126

126127
- name: Install dependencies
127128
run: |
128-
pip install --upgrade pip
129-
pip install -e .[test]
129+
pip install .[test]
130130
# Dependencies for tutorials
131131
pip install jupyter pandas opencv-python ffmpeg-python
132+
# Force NumPy version
133+
pip install numpy==${{ matrix.numpy-version }}
132134
# timeout not available by default on MacOS
133135
brew install coreutils || true
134136

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dynamic = ["version"]
44
description = "Python Dynamic Mode Decomposition."
55
requires-python = ">=3.8"
66
dependencies = [
7-
"numpy<2",
7+
"numpy",
88
"scipy>=1.6.0",
99
"matplotlib",
1010
"scikit-learn",

utils/info2json.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,25 @@
77
testing_matrix_ghact = {
88
"python-version": ["3.8", "3.9", "3.10", "3.11", "3.12"],
99
"os": ["windows-latest", macos_version, "ubuntu-latest"],
10-
"exclude": [{"os": "windows-latest", "python-version": "3.11"}],
10+
"numpy-version": ["1.24.4", "1.26.4", "2.0.2"],
11+
"exclude": [
12+
{"os": "windows-latest", "python-version": "3.11"},
13+
# 3.8 is only tested with NumPy 1.24.5
14+
{"python-version": "3.8", "numpy-version": "1.26.4"},
15+
{"python-version": "3.8", "numpy-version": "2.0.2"},
16+
# NumPy 1.24.4 is only kept for 3.8
17+
{"python-version": "3.9", "numpy-version": "1.24.4"},
18+
{"python-version": "3.10", "numpy-version": "1.24.4"},
19+
{"python-version": "3.11", "numpy-version": "1.24.4"},
20+
{"python-version": "3.12", "numpy-version": "1.24.4"},
21+
],
1122
}
1223

1324
tutorial_testing_matrix_ghact = {
14-
"python-version": ["3.8", "3.9", "3.10", "3.11", "3.12"],
25+
"python-version": testing_matrix_ghact["python-version"],
1526
"os": [macos_version, "ubuntu-latest"],
27+
"numpy-version": testing_matrix_ghact["numpy-version"],
28+
"exclude": testing_matrix_ghact["exclude"],
1629
}
1730

1831
deploy_matrix_ghact = {"python-version": ["3.8"], "os": ["ubuntu-latest"]}

0 commit comments

Comments
 (0)