Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Use tox-uv to ease lower bound checking, test on Python 3.13 #1109

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
dependencies: ['full', 'pre']
source: ['repo']
include:
Expand Down Expand Up @@ -93,6 +93,8 @@ jobs:
- name: Extract sdist
if: matrix.source == 'sdist'
run: tar --strip-components=1 -xzf dist/*.tar.gz
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -102,16 +104,14 @@ jobs:
run: python -c "import sys; print(sys.version)"
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
uv tool install tox --with=tox-uv --with=tox-gh-actions
- name: Show tox config
run: tox c
- name: Run tox
run: tox -v --exit-and-dump-after 1200
- uses: codecov/codecov-action@v5
if: ${{ always() }}
with:
files: cov.xml
token: ${{ secrets.CODECOV_TOKEN }}

test-publish:
Expand Down
24 changes: 15 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ doc = [
]
plotting = ["graphviz"]
test = [
"pytest >=3.3",
"pytest-cov",
"bsmschema",
"coverage[toml]",
"altair",
"pytest-xdist",
"s3fs" #for testing remote uri
"pytest >= 6",
"pytest-cov >= 2.11",
"bsmschema >= 0.1",
"coverage[toml] >= 5.2.1",
"altair >= 5",
"pytest-xdist >= 2.5",
"s3fs >= 2024" #for testing remote uri
]
model_reports = [
"jinja2",
Expand Down Expand Up @@ -91,13 +91,19 @@ versionfile_build = "bids/_version.py"

[tool.coverage.run]
branch = true
source = ["src/bids/*"]
source = ["src/", "tests/"]
omit = [
"*/setup.py",
"*/external/*",
"*/due.py",
"*/*version.py",
]

[tool.coverage.paths]
source = [
"src/bids",
"**/site-packages/bids",
]

[tool.coverage.report]
include = ["src/bids/*"]
include = ["src/", "tests/"]
20 changes: 7 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[tox]
requires =
tox>=4
tox-uv
envlist =
py3{9,10,11,12}-{full,pre}
py3{9,10,11,12,13}-{full,pre}
py39-min
skip_missing_interpreters = true

Expand All @@ -13,6 +14,7 @@ python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[gh-actions:env]
DEPENDS =
Expand All @@ -38,21 +40,13 @@ pass_env =
CLICOLOR
CLICOLOR_FORCE
extras = test
deps =
min: numpy ==1.22
min: scipy ==1.8
min: nibabel ==4.0
min: pandas ==1.2.0
# Tested on 0.2.4-0.5.2
min: formulaic ==0.2.4
min: sqlalchemy ==1.3.16
min: num2words ==0.5.5
min: click ==8.0
uv_resolution =
min: lowest-direct

commands =
pytest --doctest-modules -v \
--cov src/bids --cov-report xml:cov.xml --cov-report term \
src/bids {posargs:-n auto}
--cov src -cov tests --cov-report xml --cov-report term \
src/ tests/ {posargs:-n auto}

[testenv:docs]
description = Build documentation site
Expand Down
Loading