Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maximal Python version to 3.13 in workflows and configuration files #653

Merged
merged 6 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ jobs:
uses: AnimMouse/setup-ffmpeg@v1

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

- name: Generate serial coverage report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
cat tests/requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 pip install
cat tests/requirements_full.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 -I % sh -c "pip install % || true"
pip install -r tests/requirements.txt

- name: Run serial tests with pytest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Setup MPI]
uses: mpi4py/setup-mpi@v1
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/tests_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
pyversion: ['3.9', '3.12']
pyversion: ['3.9', '3.13']
timeout-minutes: 30

steps:
Expand All @@ -19,11 +19,15 @@ jobs:
python-version: ${{ matrix.pyversion }}

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

- name: Test types with mypy
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ffmpeg-python>=0.2
h5py>=2.10
pandas>=2
Pillow>=7.0
py-modelrunner>=0.18.3
py-modelrunner>=0.19
Sphinx>=4
sphinx-autodoc-annotation>=1.0
sphinx-gallery>=0.6
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/requirements_optional.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ mpi4py,3,Parallel processing using MPI
napari,0.4.8,Displaying images interactively
numba-mpi,0.22,Parallel processing using MPI+numba
pandas,2,Handling tabular data
py-modelrunner,0.18.3,Running simulations and handling I/O
py-modelrunner,0.19,Running simulations and handling I/O
pyfftw,0.12,Faster Fourier transforms
rocket-fft,0.2.4,Numba-compiled fast Fourier transforms
2 changes: 1 addition & 1 deletion pde/tools/resources/requirements_full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ matplotlib>=3.1
numba>=0.59
numpy>=1.22
pandas>=2
py-modelrunner>=0.18.3
py-modelrunner>=0.19
rocket-fft>=0.2.4
scipy>=1.10
sympy>=1.9
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.9,<3.13"
requires-python = ">=3.9,<3.14"
dynamic = ["version"]

keywords = ["pdes", "partial-differential-equations", "dynamical-systems"]
Expand All @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

# Requirements for setuptools
Expand Down Expand Up @@ -84,7 +85,7 @@ select = [
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
]
ignore = ["A005", "B007", "B027", "B028", "SIM108", "ISC001", "PT006", "PT011", "RET504", "RET505", "RET506"]
ignore = ["B007", "B027", "B028", "SIM108", "ISC001", "PT006", "PT011", "RET504", "RET505", "RET506"]

[tool.ruff.lint.isort]
section-order = ["future", "standard-library", "third-party", "first-party", "self", "local-folder"]
Expand Down
1 change: 1 addition & 0 deletions scripts/_templates/_pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

# Requirements for setuptools
Expand Down
4 changes: 2 additions & 2 deletions scripts/create_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

PACKAGE_PATH = Path(__file__).resolve().parents[1]
MIN_PYTHON_VERSION = "3.9"
MAX_PYTHON_VERSION = "3.12"
MAX_PYTHON_VERSION = "3.13"


@dataclass
Expand Down Expand Up @@ -107,7 +107,7 @@ def line(self, relation: str = ">=") -> str:
),
Requirement(
name="py-modelrunner",
version_min="0.18.3",
version_min="0.19",
usage="Running simulations and handling I/O",
collections={"full", "docs"},
),
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements_full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ matplotlib>=3.1
numba>=0.59
numpy>=1.22
pandas>=2
py-modelrunner>=0.18.3
py-modelrunner>=0.19
rocket-fft>=0.2.4
scipy>=1.10
sympy>=1.9
Expand Down
Loading