Skip to content

Commit 1bd84f2

Browse files
drop python 3.9 support and fix pyproject toml
1 parent 082d7dd commit 1bd84f2

10 files changed

Lines changed: 21 additions & 19 deletions

File tree

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
pytest-with-nbmake:
1111
strategy:
1212
matrix:
13-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
13+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 30
1616
steps:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
The *RydState* software calculates properties of Rydberg states.
1818
We especially focus on the calculation of the radial wavefunction of Rydberg states via the Numerov method.
19-
The software can be installed via pip (requires Python >= 3.9):
19+
The software can be installed via pip (requires Python >= 3.10):
2020

2121
```bash
2222
pip install rydstate

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ classifiers = [
2424
"Programming Language :: Python",
2525
"Programming Language :: Python :: 3",
2626
"Programming Language :: Python :: 3 :: Only",
27-
"Programming Language :: Python :: 3.9",
2827
"Programming Language :: Python :: 3.10",
2928
"Programming Language :: Python :: 3.11",
3029
"Programming Language :: Python :: 3.12",
@@ -33,7 +32,7 @@ classifiers = [
3332
"Topic :: Scientific/Engineering :: Physics",
3433
"Typing :: Typed",
3534
]
36-
requires-python = ">= 3.9"
35+
requires-python = ">= 3.10"
3736
dependencies = [
3837
"numpy >= 2.0",
3938
"numba >= 0.60",
@@ -47,7 +46,6 @@ dependencies = [
4746
tests = [
4847
"pytest >= 8.0",
4948
"nbmake >= 1.3",
50-
"rydstate[comparison]",
5149
]
5250
docs = [
5351
"sphinx >= 7",
@@ -72,7 +70,7 @@ mypy = [
7270

7371
[dependency-groups]
7472
dev = [
75-
"rydstate[docs,tests,comparison,jupyter,mypy]",
73+
"rydstate[docs,tests,jupyter,mypy]",
7674
"check-wheel-contents >= 0.6",
7775
]
7876

@@ -108,7 +106,7 @@ addopts = [
108106

109107
[tool.ruff]
110108
line-length = 120
111-
target-version = "py39"
109+
target-version = "py310"
112110
extend-include = ["*.ipynb"]
113111

114112
[tool.ruff.lint]

src/rydstate/angular/angular_ket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __setattr__(self, key: str, value: object) -> None:
145145
super().__setattr__(key, value)
146146

147147
def __repr__(self) -> str:
148-
args = ", ".join(f"{qn}={val}" for qn, val in zip(self.quantum_number_names, self.quantum_numbers))
148+
args = ", ".join(f"{qn}={val}" for qn, val in zip(self.quantum_number_names, self.quantum_numbers, strict=True))
149149
if self.m is not None:
150150
args += f", m={self.m}"
151151
return f"{self.__class__.__name__}({args})"

src/rydstate/angular/angular_matrix_element.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
import math
44
from functools import lru_cache
5-
from typing import TYPE_CHECKING, Callable, Literal, TypeVar, get_args
5+
from typing import TYPE_CHECKING, Literal, TypeGuard, TypeVar, get_args
66

77
import numpy as np
8-
from typing_extensions import TypeGuard
98

109
from rydstate.angular.utils import minus_one_pow
1110
from rydstate.angular.wigner_symbols import calc_wigner_3j, calc_wigner_6j
1211

1312
if TYPE_CHECKING:
13+
from collections.abc import Callable
14+
1415
from typing_extensions import ParamSpec
1516

1617
P = ParamSpec("P")

src/rydstate/angular/angular_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
self.coefficients /= self.norm
5050

5151
def __iter__(self) -> Iterator[tuple[float, _AngularKet]]:
52-
return zip(self.coefficients, self.kets).__iter__()
52+
return zip(self.coefficients, self.kets, strict=True).__iter__()
5353

5454
def __repr__(self) -> str:
5555
terms = [f"{coeff}*{ket!r}" for coeff, ket in self]

src/rydstate/angular/wigner_symbols.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import math
44
from functools import lru_cache, wraps
5-
from typing import TYPE_CHECKING, Callable, TypeVar
5+
from typing import TYPE_CHECKING, TypeVar
66

77
from sympy import Integer
88
from sympy.physics.wigner import (
@@ -14,6 +14,8 @@
1414
from rydstate.angular.utils import minus_one_pow
1515

1616
if TYPE_CHECKING:
17+
from collections.abc import Callable
18+
1719
from typing_extensions import ParamSpec
1820

1921
P = ParamSpec("P")

src/rydstate/radial/numerov.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Callable
3+
from typing import TYPE_CHECKING
44

55
from numba import njit
66

77
if TYPE_CHECKING:
8-
from collections.abc import Sequence
8+
from collections.abc import Callable, Sequence
99

1010
from rydstate.units import NDArray
1111

src/rydstate/radial/wavefunction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import logging
44
import math
55
from abc import ABC, abstractmethod
6-
from typing import TYPE_CHECKING, Literal, Optional
6+
from typing import TYPE_CHECKING, Literal
77

88
import numpy as np
99
from mpmath import whitw
@@ -19,7 +19,7 @@
1919

2020
logger = logging.getLogger(__name__)
2121

22-
WavefunctionSignConvention = Optional[Literal["positive_at_outer_bound", "n_l_1"]]
22+
WavefunctionSignConvention = Literal["positive_at_outer_bound", "n_l_1"] | None
2323

2424

2525
class Wavefunction(ABC):

src/rydstate/units.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any, Literal, Union
3+
from typing import TYPE_CHECKING, Any, Literal
44

55
from pint import UnitRegistry
66

77
if TYPE_CHECKING:
8+
from typing import TypeAlias
9+
810
import numpy.typing as npt
911
from pint.facets.plain import PlainQuantity, PlainUnit
10-
from typing_extensions import TypeAlias
1112

1213
NDArray: TypeAlias = npt.NDArray[Any]
1314
PintFloat: TypeAlias = PlainQuantity[float]
@@ -48,7 +49,7 @@
4849
"arbitrary",
4950
"zero",
5051
]
51-
DimensionLike = Union[Dimension, tuple[Dimension, Dimension]]
52+
DimensionLike = Dimension | tuple[Dimension, Dimension]
5253

5354
# some abbreviations: au_time: atomic_unit_of_time; au_current: atomic_unit_of_current; m_e: electron_mass
5455
_CommonUnits: dict[Dimension, str] = {

0 commit comments

Comments
 (0)