forked from nipreps/nifreeze
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
123 lines (115 loc) · 2.28 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
[tox]
requires =
tox>=4
envlist =
py3{10,11,12,13}
notebooks
skip_missing_interpreters = true
# Configuration that allows us to split tests across GitHub runners effectively
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312, notebooks
3.13: py313
[testenv]
description = Pytest with coverage
labels = test
pass_env =
# getpass.getuser() sources for Windows:
LOGNAME
USER
LNAME
USERNAME
# Pass user color preferences through
PY_COLORS
FORCE_COLOR
NO_COLOR
CLICOLOR
CLICOLOR_FORCE
CURBRANCH
GITHUB_ACTIONS
TEST_DATA_HOME
TEST_OUTPUT_DIR
TEST_WORK_DIR
PYTHONHASHSEED
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS
PATH
NIFREEZE_WERRORS
extras = test
commands =
pytest -svx --doctest-modules --cov nifreeze --cov-report xml \
--junitxml=test-results.xml -v src test {posargs:-n auto}
[testenv:notebooks]
description = Run notebooks
labels = notebooks
pass_env =
# getpass.getuser() sources for Windows:
LOGNAME
USER
LNAME
USERNAME
# Pass user color preferences through
PY_COLORS
FORCE_COLOR
NO_COLOR
CLICOLOR
CLICOLOR_FORCE
CURBRANCH
GITHUB_ACTIONS
TEST_DATA_HOME
TEST_OUTPUT_DIR
TEST_WORK_DIR
PYTHONHASHSEED
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS
PATH
extras = test, notebooks
commands =
# pytest --nbmake docs/notebooks/*.ipynb
# not working due to https://github.com/tox-dev/tox/issues/1571
python {toxinidir}/tools/run_notebooks.py
[testenv:docs]
description = Build documentation site
labels = docs
allowlist_externals = make
extras = doc
commands =
make -C docs/ SPHINXOPTS="-W -v" BUILDDIR="$HOME/docs" OUTDIR="${CURBRANCH:-html}" html
[testenv:typecheck]
description = Run mypy type checking
labels = check
deps =
mypy
microsoft-python-type-stubs @ git+https://github.com/microsoft/python-type-stubs.git
extras = types
commands =
mypy .
[testenv:spellcheck]
description = Check spelling
labels = check
deps =
codespell[toml]
skip_install = true
commands =
codespell . {posargs}
[testenv:build{,-strict}]
labels =
check
pre-release
deps =
build
twine
skip_install = true
set_env =
build-strict: PYTHONWARNINGS=error
commands =
python -m build
python -m twine check dist/*
[testenv:publish]
depends = build
labels = release
deps =
twine
skip_install = true
commands =
python -m twine upload dist/*