Skip to content

Commit 7a1d744

Browse files
authored
Merge pull request #1109 from effigies/py313-uv
chore: Use tox-uv to ease lower bound checking, test on Python 3.13
2 parents c66a4d9 + fa1101c commit 7a1d744

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

.github/workflows/build-test-deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
strategy:
5555
matrix:
5656
os: ['ubuntu-latest', 'macos-latest']
57-
python-version: ['3.9', '3.10', '3.11', '3.12']
57+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
5858
dependencies: ['full', 'pre']
5959
source: ['repo']
6060
include:
@@ -93,6 +93,8 @@ jobs:
9393
- name: Extract sdist
9494
if: matrix.source == 'sdist'
9595
run: tar --strip-components=1 -xzf dist/*.tar.gz
96+
- name: Install the latest version of uv
97+
uses: astral-sh/setup-uv@v3
9698
- name: Set up Python ${{ matrix.python-version }}
9799
uses: actions/setup-python@v5
98100
with:
@@ -102,16 +104,14 @@ jobs:
102104
run: python -c "import sys; print(sys.version)"
103105
- name: Install tox
104106
run: |
105-
python -m pip install --upgrade pip
106-
python -m pip install tox tox-gh-actions
107+
uv tool install tox --with=tox-uv --with=tox-gh-actions
107108
- name: Show tox config
108109
run: tox c
109110
- name: Run tox
110111
run: tox -v --exit-and-dump-after 1200
111112
- uses: codecov/codecov-action@v5
112113
if: ${{ always() }}
113114
with:
114-
files: cov.xml
115115
token: ${{ secrets.CODECOV_TOKEN }}
116116

117117
test-publish:

pyproject.toml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ doc = [
4747
]
4848
plotting = ["graphviz"]
4949
test = [
50-
"pytest >=3.3",
51-
"pytest-cov",
52-
"bsmschema",
53-
"coverage[toml]",
54-
"altair",
55-
"pytest-xdist",
56-
"s3fs" #for testing remote uri
50+
"pytest >= 6",
51+
"pytest-cov >= 2.11",
52+
"bsmschema >= 0.1",
53+
"coverage[toml] >= 5.2.1",
54+
"altair >= 5",
55+
"pytest-xdist >= 2.5",
56+
"s3fs >= 2024" #for testing remote uri
5757
]
5858
model_reports = [
5959
"jinja2",
@@ -91,13 +91,19 @@ versionfile_build = "bids/_version.py"
9191

9292
[tool.coverage.run]
9393
branch = true
94-
source = ["src/bids/*"]
94+
source = ["src/", "tests/"]
9595
omit = [
9696
"*/setup.py",
9797
"*/external/*",
9898
"*/due.py",
9999
"*/*version.py",
100100
]
101101

102+
[tool.coverage.paths]
103+
source = [
104+
"src/bids",
105+
"**/site-packages/bids",
106+
]
107+
102108
[tool.coverage.report]
103-
include = ["src/bids/*"]
109+
include = ["src/", "tests/"]

tox.ini

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[tox]
22
requires =
33
tox>=4
4+
tox-uv
45
envlist =
5-
py3{9,10,11,12}-{full,pre}
6+
py3{9,10,11,12,13}-{full,pre}
67
py39-min
78
skip_missing_interpreters = true
89

@@ -13,6 +14,7 @@ python =
1314
3.10: py310
1415
3.11: py311
1516
3.12: py312
17+
3.13: py313
1618

1719
[gh-actions:env]
1820
DEPENDS =
@@ -38,21 +40,13 @@ pass_env =
3840
CLICOLOR
3941
CLICOLOR_FORCE
4042
extras = test
41-
deps =
42-
min: numpy ==1.22
43-
min: scipy ==1.8
44-
min: nibabel ==4.0
45-
min: pandas ==1.2.0
46-
# Tested on 0.2.4-0.5.2
47-
min: formulaic ==0.2.4
48-
min: sqlalchemy ==1.3.16
49-
min: num2words ==0.5.5
50-
min: click ==8.0
43+
uv_resolution =
44+
min: lowest-direct
5145

5246
commands =
5347
pytest --doctest-modules -v \
54-
--cov src/bids --cov-report xml:cov.xml --cov-report term \
55-
src/bids {posargs:-n auto}
48+
--cov src -cov tests --cov-report xml --cov-report term \
49+
src/ tests/ {posargs:-n auto}
5650

5751
[testenv:docs]
5852
description = Build documentation site

0 commit comments

Comments
 (0)