Skip to content
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
21 changes: 8 additions & 13 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
dependencies: ['full', 'pre']
include:
- os: ubuntu-latest
python-version: '3.8'
python-version: '3.9'
dependencies: 'min'
exclude:
# Skip pre-release tests for Pythons out of SPEC0
- python-version: 3.8
- python-version: '3.9'
dependencies: pre
- python-version: 3.9
- python-version: '3.10'
dependencies: pre

env:
Expand All @@ -70,12 +70,8 @@ jobs:
git config --global user.email "bids.maintenance@gmail.com"
git config --global user.name "bids-maintenance"

- name: Set up Python ${{ matrix.python-version }} via conda
uses: conda-incubator/setup-miniconda@v3
if: matrix.os == 'ubuntu-latest'
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5

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

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

- name: Install git-annex macos
if: matrix.os == 'macos-latest'
Expand All @@ -106,8 +102,7 @@ jobs:

- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
uv tool install --with=tox-uv --with=tox-gh-actions tox
- name: Show tox config
run: tox c
- name: Run tox
Expand Down
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -9,10 +9,8 @@ repos:
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.3
rev: v0.11.0
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- id: ruff
args: [ --select, ISC001, --fix ]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 changes: 17 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ classifiers = [
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"bidsschematools >=0.11",
"bidsschematools >=1.0",
]

[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"coverage[toml]",
"datalad",
"pytest >=8",
"pytest-cov >=5",
"coverage[toml] >=7.2",
"datalad >=1.1",
]

[project.urls]
Expand All @@ -54,13 +54,24 @@ versionfile_build = "bids_validator/_version.py"
tag_prefix = ""
parentdir_prefix = ""

[tool.pytest.ini_options]
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]

[tool.coverage.run]
branch = true
parallel = true
source = ["bids_validator"]
omit = [
"setup.py",
"*/_version.py",
]

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

[tool.coverage.report]
exclude_lines = [
"no cov",
Expand Down
18 changes: 7 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[tox]
requires =
tox>=4
tox-uv
envlist =
py3{8,9,10,11,12}-{full,pre}
py38-min
py3{9,10,11,12}-{full,pre}
py39-min
style
spellcheck
skip_missing_interpreters = true

# Configuration that allows us to split tests across GitHub runners effectively
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
Expand Down Expand Up @@ -45,17 +45,14 @@ pass_env =
CLICOLOR
CLICOLOR_FORCE
extras = test
uv_resolution =
min: lowest-direct
deps =
min: bidsschematools ==0.11.0
pre: git+https://github.com/bids-standard/bids-specification.git\#subdirectory=tools/schemacode
commands =
pytest --doctest-modules --cov bids_validator --cov-report xml --cov-report term \
--junitxml=test-results.xml -v src/ {posargs}

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

[testenv:docs]
description = Build documentation site
Expand All @@ -74,7 +71,6 @@ skip_install = true
commands =
fix: ruff check --fix src/
fix: ruff format src/
fix: ruff check --select ISC001 --fix src/
!fix: ruff check src/
!fix: ruff format --diff src/

Expand Down
Loading