Skip to content

Commit b503baf

Browse files
Update maximal Python version to 3.13 in workflows and configuration files (#653)
* Update maximal Python version to 3.13 in workflows and configuration files * Update py-modelrunner version to 0.19 in requirements files * Rename build job to serial_tests and update dependency installation process in tests_all.yml * Improve dependency installation process in Github actions to handle installation failures gracefully
1 parent b8195da commit b503baf

File tree

11 files changed

+25
-14
lines changed

11 files changed

+25
-14
lines changed

.github/workflows/coverage_report.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ jobs:
1919
uses: AnimMouse/setup-ffmpeg@v1
2020

2121
- name: Install dependencies
22+
# install all requirements. Note that the full requirements are installed separately
23+
# so the job does not fail if one of the packages cannot be installed. This allows
24+
# testing the package for newer python version even when some of the optional
25+
# packages are not yet available.
2226
run: |
2327
python -m pip install --upgrade pip
24-
pip install -r tests/requirements_full.txt
28+
pip install -r requirements.txt
29+
cat tests/requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 -I % sh -c "pip install % || true"
2530
pip install -r tests/requirements.txt
2631
2732
- name: Generate serial coverage report

.github/workflows/tests_all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
python -m pip install --upgrade pip
3131
pip install -r requirements.txt
32-
cat tests/requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 pip install
32+
cat tests/requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 -I % sh -c "pip install % || true"
3333
pip install -r tests/requirements.txt
3434
3535
- name: Run serial tests with pytest

.github/workflows/tests_mpi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v5
2424
with:
25-
python-version: '3.12'
25+
python-version: '3.13'
2626

2727
- name: Setup MPI]
2828
uses: mpi4py/setup-mpi@v1

.github/workflows/tests_types.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
pyversion: ['3.9', '3.12']
10+
pyversion: ['3.9', '3.13']
1111
timeout-minutes: 30
1212

1313
steps:
@@ -19,11 +19,15 @@ jobs:
1919
python-version: ${{ matrix.pyversion }}
2020

2121
- name: Install dependencies
22-
# install all requirements
22+
# install all requirements. Note that the full requirements are installed separately
23+
# so the job does not fail if one of the packages cannot be installed. This allows
24+
# testing the package for newer python version even when some of the optional
25+
# packages are not yet available.
2326
run: |
2427
python -m pip install --upgrade pip
28+
pip install -r requirements.txt
29+
cat tests/requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 -I % sh -c "pip install % || true"
2530
pip install -r tests/requirements.txt
26-
pip install -r tests/requirements_full.txt
2731
pip install types-PyYAML
2832
2933
- name: Test types with mypy

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ffmpeg-python>=0.2
33
h5py>=2.10
44
pandas>=2
55
Pillow>=7.0
6-
py-modelrunner>=0.18.3
6+
py-modelrunner>=0.19
77
Sphinx>=4
88
sphinx-autodoc-annotation>=1.0
99
sphinx-gallery>=0.6

docs/source/_static/requirements_optional.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ mpi4py,3,Parallel processing using MPI
66
napari,0.4.8,Displaying images interactively
77
numba-mpi,0.22,Parallel processing using MPI+numba
88
pandas,2,Handling tabular data
9-
py-modelrunner,0.18.3,Running simulations and handling I/O
9+
py-modelrunner,0.19,Running simulations and handling I/O
1010
pyfftw,0.12,Faster Fourier transforms
1111
rocket-fft,0.2.4,Numba-compiled fast Fourier transforms

pde/tools/resources/requirements_full.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ matplotlib>=3.1
66
numba>=0.59
77
numpy>=1.22
88
pandas>=2
9-
py-modelrunner>=0.18.3
9+
py-modelrunner>=0.19
1010
rocket-fft>=0.2.4
1111
scipy>=1.10
1212
sympy>=1.9

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
]
1010
license = {text = "MIT"}
1111
readme = "README.md"
12-
requires-python = ">=3.9,<3.13"
12+
requires-python = ">=3.9,<3.14"
1313
dynamic = ["version"]
1414

1515
keywords = ["pdes", "partial-differential-equations", "dynamical-systems"]
@@ -24,6 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.10",
2525
"Programming Language :: Python :: 3.11",
2626
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
2728
]
2829

2930
# Requirements for setuptools
@@ -84,7 +85,7 @@ select = [
8485
"SIM", # flake8-simplify
8586
"PTH", # flake8-use-pathlib
8687
]
87-
ignore = ["A005", "B007", "B027", "B028", "SIM108", "ISC001", "PT006", "PT011", "RET504", "RET505", "RET506"]
88+
ignore = ["B007", "B027", "B028", "SIM108", "ISC001", "PT006", "PT011", "RET504", "RET505", "RET506"]
8889

8990
[tool.ruff.lint.isort]
9091
section-order = ["future", "standard-library", "third-party", "first-party", "self", "local-folder"]

scripts/_templates/_pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
2323
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
2425
]
2526

2627
# Requirements for setuptools

scripts/create_requirements.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
PACKAGE_PATH = Path(__file__).resolve().parents[1]
1313
MIN_PYTHON_VERSION = "3.9"
14-
MAX_PYTHON_VERSION = "3.12"
14+
MAX_PYTHON_VERSION = "3.13"
1515

1616

1717
@dataclass
@@ -107,7 +107,7 @@ def line(self, relation: str = ">=") -> str:
107107
),
108108
Requirement(
109109
name="py-modelrunner",
110-
version_min="0.18.3",
110+
version_min="0.19",
111111
usage="Running simulations and handling I/O",
112112
collections={"full", "docs"},
113113
),

0 commit comments

Comments
 (0)