From 0a6a635ea659310f33f97611e725037d4ef52e73 Mon Sep 17 00:00:00 2001 From: Matthew Flamm Date: Thu, 18 Dec 2025 16:04:42 -0500 Subject: [PATCH 1/3] update pins and python versions --- .github/workflows/test.yml | 2 +- pyproject.toml | 11 +++++++---- rtdpy/convection.py | 6 +++--- rtdpy/rtd.py | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 002bdf7..d17fbed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 6472515..6bed43f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,14 +13,17 @@ authors = [ ] requires-python = ">=3.10" dependencies = [ - "numpy<1.24", - "scipy<1.14", + "numpy>=1.23.0", + "scipy>=1.6.0", ] classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", "Topic :: Scientific/Engineering", ] @@ -39,8 +42,8 @@ include = ["rtdpy*"] [project.optional-dependencies] dev = [ - "numpy==1.23.5", - "scipy==1.13.1", + "numpy==2.3.5", + "scipy==1.16.3", "pytest>=7.0", "pytest-cov>=4.0", "ruff>=0.1.0", diff --git a/rtdpy/convection.py b/rtdpy/convection.py index cc25479..cd09048 100644 --- a/rtdpy/convection.py +++ b/rtdpy/convection.py @@ -66,7 +66,7 @@ def __init__(self, tau, dt, time_end): def _calc_exitage(self): """Calculte exit age function.""" - time_safe = np.clip(self.time, np.finfo(np.float).eps, None) + time_safe = np.clip(self.time, np.finfo(np.float64).eps, None) output = self.tau**2 / (2 * time_safe**3) mintime = self.tau / 2 output[self.time < mintime] = 0. @@ -74,7 +74,7 @@ def _calc_exitage(self): def _calc_exitage_star(self): """Calculte exit age function.""" - time_safe = np.clip(self.time, np.finfo(np.float).eps, None) + time_safe = np.clip(self.time, np.finfo(np.float64).eps, None) output = self.tau / (2 * time_safe**2) mintime = self.tau/2 output[self.time < mintime] = 0. @@ -87,7 +87,7 @@ def exitage_star(self): def _calc_exitage_star2(self): """Calculte exit age function.""" - time_safe = np.clip(self.time, np.finfo(np.float).eps, None) + time_safe = np.clip(self.time, np.finfo(np.float64).eps, None) output = 1. / (2 * time_safe) mintime = self.tau/2 output[self.time < mintime] = 0. diff --git a/rtdpy/rtd.py b/rtdpy/rtd.py index 8086d35..246b7b0 100644 --- a/rtdpy/rtd.py +++ b/rtdpy/rtd.py @@ -1,6 +1,6 @@ """Base RTD Class and Error.""" import numpy as np -from scipy.integrate import cumtrapz +from scipy.integrate import cumulative_trapezoid from scipy.signal import convolve from rtdpy.const import DTTOL @@ -43,12 +43,12 @@ def exitage_norm(self): @property def stepresponse(self): """Step respose of RTD""" - return cumtrapz(self.exitage, self.time, initial=0) + return cumulative_trapezoid(self.exitage, self.time, initial=0) @property def stepresponse_norm(self): """Normalized step respose of RTD""" - return cumtrapz(self.exitage_norm, self.time, initial=0) + return cumulative_trapezoid(self.exitage_norm, self.time, initial=0) @property def dt(self): From 1473c36c0d71f0c1aeff2f1bb87b7b276d635109 Mon Sep 17 00:00:00 2001 From: Matthew Flamm Date: Thu, 18 Dec 2025 16:07:52 -0500 Subject: [PATCH 2/3] use min versions for python 3.10 --- .github/workflows/test.yml | 10 +++++++++- pyproject.toml | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d17fbed..e25459a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,15 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e ".[dev]" + if [ "${{ matrix.python-version }}" == "3.10" ]; then + pip install -e ".[dev-min]" + else + pip install -e ".[dev]" + fi + + - name: Show package versions + run: | + pip list - name: Run tests run: | diff --git a/pyproject.toml b/pyproject.toml index 6bed43f..96eddde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,13 @@ dev = [ "pytest-cov>=4.0", "ruff>=0.1.0", ] +dev-min = [ + "numpy==1.23.0", + "scipy==1.6.0", + "pytest>=7.0", + "pytest-cov>=4.0", + "ruff>=0.1.0", +] docs = [ "sphinx", "numpydoc>=1.0.0", From 49fbdfed06fe8f588b38e97c67f0bdf4ef894e19 Mon Sep 17 00:00:00 2001 From: Matthew Flamm Date: Thu, 18 Dec 2025 16:10:58 -0500 Subject: [PATCH 3/3] update scipy version --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 96eddde..7b32ed5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ authors = [ requires-python = ">=3.10" dependencies = [ "numpy>=1.23.0", - "scipy>=1.6.0", + "scipy>=1.9.0", ] classifiers = [ "Development Status :: 4 - Beta", @@ -50,7 +50,7 @@ dev = [ ] dev-min = [ "numpy==1.23.0", - "scipy==1.6.0", + "scipy==1.9.0", "pytest>=7.0", "pytest-cov>=4.0", "ruff>=0.1.0",