Skip to content

Commit a40bf21

Browse files
authored
Merge pull request #20 from effigies/mnt/py39
chore: Drop py38, add py313, use tox-uv
2 parents dc86eb1 + 690b29f commit a40bf21

File tree

5 files changed

+35
-35
lines changed

5 files changed

+35
-35
lines changed

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

+8-13
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ jobs:
4747
fail-fast: false
4848
matrix:
4949
os: [ubuntu-latest, macos-latest, windows-latest]
50-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
50+
python-version: ['3.9', '3.10', '3.11', '3.12']
5151
dependencies: ['full', 'pre']
5252
include:
5353
- os: ubuntu-latest
54-
python-version: '3.8'
54+
python-version: '3.9'
5555
dependencies: 'min'
5656
exclude:
5757
# Skip pre-release tests for Pythons out of SPEC0
58-
- python-version: 3.8
58+
- python-version: '3.9'
5959
dependencies: pre
60-
- python-version: 3.9
60+
- python-version: '3.10'
6161
dependencies: pre
6262

6363
env:
@@ -70,12 +70,8 @@ jobs:
7070
git config --global user.email "[email protected]"
7171
git config --global user.name "bids-maintenance"
7272
73-
- name: Set up Python ${{ matrix.python-version }} via conda
74-
uses: conda-incubator/setup-miniconda@v3
75-
if: matrix.os == 'ubuntu-latest'
76-
with:
77-
auto-update-conda: true
78-
python-version: ${{ matrix.python-version }}
73+
- name: Install the latest version of uv
74+
uses: astral-sh/setup-uv@v5
7975

8076
- name: Set up Python ${{ matrix.python-version }}
8177
uses: actions/setup-python@v5
@@ -86,7 +82,7 @@ jobs:
8682

8783
- name: Install git-annex ubuntu
8884
if: matrix.os == 'ubuntu-latest'
89-
run: conda install -c conda-forge git-annex
85+
run: sudo apt-get update && sudo apt-get install git-annex
9086

9187
- name: Install git-annex macos
9288
if: matrix.os == 'macos-latest'
@@ -106,8 +102,7 @@ jobs:
106102
107103
- name: Install tox
108104
run: |
109-
python -m pip install --upgrade pip
110-
python -m pip install tox tox-gh-actions
105+
uv tool install --with=tox-uv --with=tox-gh-actions tox
111106
- name: Show tox config
112107
run: tox c
113108
- name: Run tox

.pre-commit-config.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v5.0.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
@@ -9,10 +9,8 @@ repos:
99
- id: check-toml
1010
- id: check-added-large-files
1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: v0.4.3
12+
rev: v0.11.0
1313
hooks:
1414
- id: ruff
1515
args: [ --fix ]
1616
- id: ruff-format
17-
- id: ruff
18-
args: [ --select, ISC001, --fix ]

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1717
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1818
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1919
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pyproject.toml

+17-6
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ classifiers = [
2020
"Programming Language :: Python",
2121
"Topic :: Scientific/Engineering",
2222
]
23-
requires-python = ">=3.8"
23+
requires-python = ">=3.9"
2424
dependencies = [
25-
"bidsschematools >=0.11",
25+
"bidsschematools >=1.0",
2626
]
2727

2828
[project.optional-dependencies]
2929
test = [
30-
"pytest",
31-
"pytest-cov",
32-
"coverage[toml]",
33-
"datalad",
30+
"pytest >=8",
31+
"pytest-cov >=5",
32+
"coverage[toml] >=7.2",
33+
"datalad >=1.1",
3434
]
3535

3636
[project.urls]
@@ -54,13 +54,24 @@ versionfile_build = "bids_validator/_version.py"
5454
tag_prefix = ""
5555
parentdir_prefix = ""
5656

57+
[tool.pytest.ini_options]
58+
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]
59+
5760
[tool.coverage.run]
5861
branch = true
5962
parallel = true
63+
source = ["bids_validator"]
6064
omit = [
65+
"setup.py",
6166
"*/_version.py",
6267
]
6368

69+
[tool.coverage.paths]
70+
source = [
71+
"src/bids_validator/",
72+
"*/site-packages/bids_validator/",
73+
]
74+
6475
[tool.coverage.report]
6576
exclude_lines = [
6677
"no cov",

tox.ini

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[tox]
22
requires =
33
tox>=4
4+
tox-uv
45
envlist =
5-
py3{8,9,10,11,12}-{full,pre}
6-
py38-min
6+
py3{9,10,11,12}-{full,pre}
7+
py39-min
78
style
89
spellcheck
910
skip_missing_interpreters = true
1011

1112
# Configuration that allows us to split tests across GitHub runners effectively
1213
[gh-actions]
1314
python =
14-
3.8: py38
1515
3.9: py39
1616
3.10: py310
1717
3.11: py311
@@ -45,17 +45,14 @@ pass_env =
4545
CLICOLOR
4646
CLICOLOR_FORCE
4747
extras = test
48+
uv_resolution =
49+
min: lowest-direct
4850
deps =
49-
min: bidsschematools ==0.11.0
5051
pre: git+https://github.com/bids-standard/bids-specification.git\#subdirectory=tools/schemacode
51-
commands =
52-
pytest --doctest-modules --cov bids_validator --cov-report xml --cov-report term \
53-
--junitxml=test-results.xml -v src/ {posargs}
5452

55-
[testenv:long]
5653
commands =
57-
pytest --doctest-modules --cov fmripost_aroma --cov-report xml \
58-
--junitxml=test-results.xml -v tests/ {posargs}
54+
python -m pytest --doctest-modules --cov . --cov-report xml --cov-report term \
55+
--junitxml=test-results.xml -v {posargs}
5956

6057
[testenv:docs]
6158
description = Build documentation site
@@ -74,7 +71,6 @@ skip_install = true
7471
commands =
7572
fix: ruff check --fix src/
7673
fix: ruff format src/
77-
fix: ruff check --select ISC001 --fix src/
7874
!fix: ruff check src/
7975
!fix: ruff format --diff src/
8076

0 commit comments

Comments
 (0)