Skip to content

Commit ecc1545

Browse files
MatthewFlammMatthew Flamm
andauthored
update pins and python versions (#7)
* update pins and python versions * use min versions for python 3.10 * update scipy version --------- Co-authored-by: Matthew Flamm <matthew.flammm@merck.com>
1 parent 7f5b87c commit ecc1545

4 files changed

Lines changed: 30 additions & 12 deletions

File tree

.github/workflows/test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.10", "3.11"]
15+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1616

1717
steps:
1818
- uses: actions/checkout@v4
@@ -25,7 +25,15 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install -e ".[dev]"
28+
if [ "${{ matrix.python-version }}" == "3.10" ]; then
29+
pip install -e ".[dev-min]"
30+
else
31+
pip install -e ".[dev]"
32+
fi
33+
34+
- name: Show package versions
35+
run: |
36+
pip list
2937
3038
- name: Run tests
3139
run: |

pyproject.toml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ authors = [
1313
]
1414
requires-python = ">=3.10"
1515
dependencies = [
16-
"numpy<1.24",
17-
"scipy<1.14",
16+
"numpy>=1.23.0",
17+
"scipy>=1.9.0",
1818
]
1919
classifiers = [
2020
"Development Status :: 4 - Beta",
2121
"Programming Language :: Python :: 3",
2222
"Programming Language :: Python :: 3.10",
2323
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
"Programming Language :: Python :: 3.14",
2427
"License :: OSI Approved :: MIT License",
2528
"Topic :: Scientific/Engineering",
2629
]
@@ -39,8 +42,15 @@ include = ["rtdpy*"]
3942

4043
[project.optional-dependencies]
4144
dev = [
42-
"numpy==1.23.5",
43-
"scipy==1.13.1",
45+
"numpy==2.3.5",
46+
"scipy==1.16.3",
47+
"pytest>=7.0",
48+
"pytest-cov>=4.0",
49+
"ruff>=0.1.0",
50+
]
51+
dev-min = [
52+
"numpy==1.23.0",
53+
"scipy==1.9.0",
4454
"pytest>=7.0",
4555
"pytest-cov>=4.0",
4656
"ruff>=0.1.0",

rtdpy/convection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ def __init__(self, tau, dt, time_end):
6666

6767
def _calc_exitage(self):
6868
"""Calculte exit age function."""
69-
time_safe = np.clip(self.time, np.finfo(np.float).eps, None)
69+
time_safe = np.clip(self.time, np.finfo(np.float64).eps, None)
7070
output = self.tau**2 / (2 * time_safe**3)
7171
mintime = self.tau / 2
7272
output[self.time < mintime] = 0.
7373
return output
7474

7575
def _calc_exitage_star(self):
7676
"""Calculte exit age function."""
77-
time_safe = np.clip(self.time, np.finfo(np.float).eps, None)
77+
time_safe = np.clip(self.time, np.finfo(np.float64).eps, None)
7878
output = self.tau / (2 * time_safe**2)
7979
mintime = self.tau/2
8080
output[self.time < mintime] = 0.
@@ -87,7 +87,7 @@ def exitage_star(self):
8787

8888
def _calc_exitage_star2(self):
8989
"""Calculte exit age function."""
90-
time_safe = np.clip(self.time, np.finfo(np.float).eps, None)
90+
time_safe = np.clip(self.time, np.finfo(np.float64).eps, None)
9191
output = 1. / (2 * time_safe)
9292
mintime = self.tau/2
9393
output[self.time < mintime] = 0.

rtdpy/rtd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Base RTD Class and Error."""
22
import numpy as np
3-
from scipy.integrate import cumtrapz
3+
from scipy.integrate import cumulative_trapezoid
44
from scipy.signal import convolve
55

66
from rtdpy.const import DTTOL
@@ -43,12 +43,12 @@ def exitage_norm(self):
4343
@property
4444
def stepresponse(self):
4545
"""Step respose of RTD"""
46-
return cumtrapz(self.exitage, self.time, initial=0)
46+
return cumulative_trapezoid(self.exitage, self.time, initial=0)
4747

4848
@property
4949
def stepresponse_norm(self):
5050
"""Normalized step respose of RTD"""
51-
return cumtrapz(self.exitage_norm, self.time, initial=0)
51+
return cumulative_trapezoid(self.exitage_norm, self.time, initial=0)
5252

5353
@property
5454
def dt(self):

0 commit comments

Comments
 (0)