Skip to content

Commit 816382a

Browse files
CI/BLD: Bump min python to 3.10, since 3.9 is at EOL (#643)
1 parent c1da1f9 commit 816382a

File tree

5 files changed

+17
-35
lines changed

5 files changed

+17
-35
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v4
2121
with:
22-
python-version: "3.9"
22+
python-version: "3.10"
2323
- name: Linting
2424
run: |
2525
pip install pre-commit
@@ -34,7 +34,7 @@ jobs:
3434
- name: Set up Python
3535
uses: actions/setup-python@v4
3636
with:
37-
python-version: "3.9"
37+
python-version: "3.10"
3838
- name: build
3939
run: pip install .
4040
- name: test import
@@ -71,7 +71,7 @@ jobs:
7171
fail-fast: false
7272
max-parallel: 4
7373
matrix:
74-
python-version: ["3.9", "3.11"]
74+
python-version: ["3.10", "3.12"]
7575

7676
steps:
7777
- uses: actions/checkout@v4

.github/workflows/notebooks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Python
3131
uses: actions/setup-python@v3
3232
with:
33-
python-version: "3.9"
33+
python-version: "3.10"
3434
- name: Install dependencies
3535
run: |
3636
pip install .[cvxpy,miosr] sympy nbconvert jupyter matplotlib seaborn pandas dysts

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Python
1515
uses: actions/setup-python@v3
1616
with:
17-
python-version: "3.9"
17+
python-version: "3.10"
1818
- name: Install Build
1919
run: |
2020
python -m pip install --upgrade pip

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ authors = [
1212
{name="Alan Kaptanoglu", email="[email protected]"}
1313
]
1414
license = {text = "MIT"}
15-
requires-python = ">=3.8"
15+
requires-python = ">=3.10"
1616
dynamic = ["version"]
1717
classifiers = [
1818
"Programming Language :: Python",
19-
"Programming Language :: Python :: 3.8",
20-
"Programming Language :: Python :: 3.9",
2119
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
2223
"Development Status :: 5 - Production/Stable",
2324
"Intended Audience :: Science/Research",
2425
"License :: OSI Approved :: MIT License",

pysindy/pysindy.py

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
import warnings
32
from abc import ABC
43
from abc import abstractmethod
@@ -814,32 +813,14 @@ def _check_multiple_trajectories(x, x_dot, u) -> bool:
814813
815814
"""
816815
SequenceOrNone = Union[Sequence, None]
817-
if sys.version_info.minor < 10:
818-
mixed_trajectories = (
819-
isinstance(x, Sequence)
820-
and (
821-
not isinstance(x_dot, Sequence)
822-
and x_dot is not None
823-
or not isinstance(u, Sequence)
824-
and u is not None
825-
)
826-
or isinstance(x_dot, Sequence)
827-
and not isinstance(x, Sequence)
828-
or isinstance(u, Sequence)
829-
and not isinstance(x, Sequence)
830-
)
831-
else:
832-
mixed_trajectories = (
833-
isinstance(x, Sequence)
834-
and (
835-
not isinstance(x_dot, SequenceOrNone)
836-
or not isinstance(u, SequenceOrNone)
837-
)
838-
or isinstance(x_dot, Sequence)
839-
and not isinstance(x, Sequence)
840-
or isinstance(u, Sequence)
841-
and not isinstance(x, Sequence)
842-
)
816+
mixed_trajectories = (
817+
isinstance(x, Sequence)
818+
and (not isinstance(x_dot, SequenceOrNone) or not isinstance(u, SequenceOrNone))
819+
or isinstance(x_dot, Sequence)
820+
and not isinstance(x, Sequence)
821+
or isinstance(u, Sequence)
822+
and not isinstance(x, Sequence)
823+
)
843824
if mixed_trajectories:
844825
raise TypeError(
845826
"If x, x_dot, or u are a Sequence of trajectories, each must be a Sequence"

0 commit comments

Comments
 (0)