Skip to content

Commit 5332548

Browse files
authored
add 3.13, remove 3.10 (#142)
* add 3.13, remove 3.10, add numba coverage * move to uv in ghactions * add ruff to ci deps * ruff and typo * this is ttim ofc * remove coveralls parallel - seems overkill since all tests produce same coverage, no need to gather reports and merge after.
1 parent 1420f99 commit 5332548

5 files changed

Lines changed: 24 additions & 29 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,36 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
python-version: ["3.10", "3.11", "3.12"]
20+
python-version: ["3.11", "3.12", "3.13"]
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v5
24+
- uses: actions/checkout@v4
25+
- name: Install uv with Python ${{ matrix.python-version }}
26+
uses: astral-sh/setup-uv@v6
2627
with:
28+
enable-cache: true
2729
python-version: ${{ matrix.python-version }}
2830

29-
- name: Install dependencies
30-
run: |
31-
python -m pip install --upgrade pip
32-
pip install -e .[ci]
31+
- name: Install the project
32+
run: uv sync --all-extras
3333

3434
- name: ruff-lint
35-
uses: chartboost/ruff-action@v1
35+
run: uv run ruff check
3636

3737
- name: ruff-format
38-
uses: chartboost/ruff-action@v1
39-
with:
40-
args: "format --check"
38+
run: uv run ruff format --check
4139

4240
- name: Run tests
43-
run: |
44-
pytest ./tests
41+
run: uv run pytest ./tests
4542

4643
- name: Numba coverage
4744
run: |
48-
NUMBA_DISABLE_JIT=1 pytest --cov-append ./tests/test_bessel.py
45+
NUMBA_DISABLE_JIT=1 uv run pytest --cov-append ./tests/test_bessel.py
4946
5047
5148
- name: Publish to coveralls.io
5249
uses: coverallsapp/github-action@v2
5350
with:
54-
parallel: true
5551
github-token: ${{ secrets.GITHUB_TOKEN }}
56-
57-
finish:
58-
needs: test
59-
runs-on: ubuntu-latest
60-
steps:
61-
- name: Close parallel build
62-
uses: coverallsapp/github-action@v2
63-
with:
64-
parallel-finished: true
52+

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ maintainers = [
1414
{ name = "Mark Bakker", email = "markbak@gmail.com" },
1515
{ name = "Davíd Brakenhoff", email = "d.brakenhoff@artesia-water.nl" },
1616
]
17-
requires-python = ">= 3.10"
17+
requires-python = ">= 3.11"
1818
dependencies = ["numpy", "scipy", "numba", "matplotlib", "lmfit", "pandas"]
1919

2020
keywords = ["hydrology", "groundwater", "model", "analytic element method"]
@@ -29,9 +29,9 @@ classifiers = [
2929
"Operating System :: MacOS",
3030
"Programming Language :: Python",
3131
"Programming Language :: Python :: 3",
32-
"Programming Language :: Python :: 3.10",
3332
"Programming Language :: Python :: 3.11",
3433
"Programming Language :: Python :: 3.12",
34+
"Programming Language :: Python :: 3.13",
3535
"Programming Language :: Python :: 3 :: Only",
3636
"Topic :: Scientific/Engineering :: Hydrology",
3737
]
@@ -49,6 +49,7 @@ ci = [
4949
"jupyter",
5050
"shapely",
5151
"coveralls",
52+
"ruff",
5253
"timml",
5354
]
5455
docs = [

pytest.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
[pytest]
2-
addopts=--durations=0 -v --cov ttim --cov-config=.coveragerc
2+
addopts=
3+
--durations=0
4+
-v
5+
--cov=ttim
6+
--cov-config=.coveragerc
7+
--cov-report=lcov:./coverage/lcov.info
8+
--cov-report=term
39
markers =
410
notebooks: run notebooks

ttim/aquifer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def compute_lab_eigvec(self, p, returnA=False, B=None):
148148
)
149149
d0 = p / self.D
150150
if B is not None:
151-
d0 = d0 * B # B is vector of load efficiency paramters
151+
d0 = d0 * B # B is vector of load efficiency parameters
152152
d0[:-1] += a[1:] / (self.c[1:] * self.T[:-1])
153153
d0[1:] += a[1:] / (self.c[1:] * self.T[1:])
154154
if self.topboundary[:3] == "lea":

ttim/src/test_bessel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
2-
32
from ttim.bessel import bessel # fortran compiled funcs
3+
44
from ttim.besselnumba import besselnumba # numba funcs
55

66
bessel.initialize()

0 commit comments

Comments
 (0)