-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtox.ini
More file actions
142 lines (121 loc) · 4.11 KB
/
tox.ini
File metadata and controls
142 lines (121 loc) · 4.11 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "python -m pip install tox"
# and then run "tox" from this directory.
# Tox is used by the GitHub Actions workflow to run tests on multiple environments.
[tox]
# NOTE: if the string "py310" is in the environment name, then the py310 interpreter is used,
# so we can omit specifying the basepython version below.
envlist = py310, py311, py312, py313, py314
requires = pip >= 24.3.1
[testenv]
download = True
setenv =
PYTHONDONTWRITEBYTECODE = 1
install_command =
python -m pip install -U {opts} {packages}
dependency_groups = test
commands =
python -m pip list
python -m pip check
pytest -v
# Env to create coverage report locally
[testenv:localcoverage]
basepython = python3.14
commands =
python -m pip list
python -m pip check
pytest --cov=hdmf_zarr
coverage html -d tests/coverage/htmlcov
# Envs that run tests
[testenv:py{310,311,312,313,314}]
commands = {[testenv]commands}
# Test with python 3.13 and all optional dependencies
[testenv:py313-optional]
extras = full
dependency_groups = {[testenv]dependency_groups}
commands = {[testenv]commands}
# Test with python 3.13 and all optional dependencies, using pre-release versions
[testenv:py313-prerelease]
install_command =
python -m pip install -U --pre {opts} {packages}
extras = full
dependency_groups = {[testenv]dependency_groups}
commands = {[testenv]commands}
# Test with python 3.14 and all optional dependencies
[testenv:py314-optional]
extras = full
dependency_groups = {[testenv]dependency_groups}
commands = {[testenv]commands}
# Test with python 3.14 and all optional dependencies, using pre-release versions
[testenv:py314-prerelease]
install_command =
python -m pip install -U --pre {opts} {packages}
extras = full
dependency_groups = {[testenv]dependency_groups}
commands = {[testenv]commands}
# Test with python 3.10 and minimum dependencies
# Uses uv with --resolution lowest-direct to install the lowest compatible
# versions of direct dependencies, replacing the old requirements-min.txt approach.
[testenv:py310-minimum]
skip_install = True
dependency_groups = test
commands_pre =
python -m pip install uv
python -m uv pip install --resolution lowest-direct -e .
commands = {[testenv]commands}
# Envs that builds wheels and source distribution
[testenv:build]
commands =
python -m pip install -U build
python -m pip list
python -m pip check
python -m build
# Envs that will test installation from a wheel
[testenv:wheelinstall]
extras =
commands =
python -m pip list
python -m pip check
python -c "import hdmf_zarr"
# Envs that will execute gallery tests
[testenv:gallery]
# NOTE: the gallery tests do not require the "docs" extras
commands =
python -m pip list
python -m pip check
python test_gallery.py
[testenv:gallery-{py310,py311,py312,py313,py314}]
commands = {[testenv:gallery]commands}
# Test with python 3.13 and all optional dependencies
[testenv:gallery-py313-optional]
extras = full
dependency_groups = docs
commands = {[testenv:gallery]commands}
# Test with python 3.13 and all optional dependencies, using pre-release versions
[testenv:gallery-py313-prerelease]
install_command =
python -m pip install -U --pre {opts} {packages}
extras = full
dependency_groups = docs
commands = {[testenv:gallery]commands}
# Test with python 3.14 and all optional dependencies
[testenv:gallery-py314-optional]
extras = full
dependency_groups = docs
commands = {[testenv:gallery]commands}
# Test with python 3.14 and all optional dependencies, using pre-release versions
[testenv:gallery-py314-prerelease]
install_command =
python -m pip install -U --pre {opts} {packages}
extras = full
dependency_groups = docs
commands = {[testenv:gallery]commands}
# Test with python 3.10 and minimum dependencies
[testenv:gallery-py310-minimum]
skip_install = True
dependency_groups = test
commands_pre =
python -m pip install uv
python -m uv pip install --resolution lowest-direct --group docs -e .
commands = {[testenv:gallery]commands}