-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathtox.ini
More file actions
77 lines (69 loc) · 2.88 KB
/
tox.ini
File metadata and controls
77 lines (69 loc) · 2.88 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
# 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, "pip install tox"
# and then run "tox -e [envname]" from this directory.
[tox]
requires = pip >= 24.3.1
[testenv]
download = True
setenv =
PYTHONDONTWRITEBYTECODE = 1
recreate =
upgraded, prerelease: False
build, wheelinstall: True # good practice to recreate the environment
skip_install =
upgraded, prerelease, wheelinstall: False
build: True # no need to install anything when building
install_command =
# when using [testenv:wheelinstall] and --installpkg, the wheel and its dependencies
# are installed, instead of the package in the current directory
wheelinstall: python -I -m pip install {opts} {packages}
upgraded: python -I -m pip install -U {opts} {packages}
prerelease: python -I -m pip install -U --pre {opts} {packages}
extras =
# which optional dependency set(s) to use (default: none)
optional: tqdm
optional: sparse
optional: zarr
optional: termset
dependency_groups =
# which dependency group(s) to use (default: none)
pytest: test
gallery: docs
commands =
# commands to run for every environment
python --version # print python version for debugging
python -m pip check # check for conflicting packages
python -m pip list # list installed packages for debugging
# commands to run for select environments
pytest: pytest -v
gallery: python test_gallery.py
build: python -m pip install -U build
build: python -m build
wheelinstall: python -c "import hdmf; import hdmf.common"
# list of pre-defined environments
[testenv:pytest-py{310,311,312,313,314}-upgraded]
[testenv:pytest-py{313,314}-upgraded-optional]
[testenv:pytest-py314-prerelease]
[testenv:pytest-py{313,314}-prerelease-optional]
# minimum envs use uv with --resolution lowest-direct to install the lowest
# compatible versions of direct dependencies. These are defined explicitly
# (rather than using factor matching in [testenv]) because gallery-minimum
# needs to resolve docs deps together with project deps to avoid incompatibilities.
[testenv:pytest-py310-minimum]
skip_install = True
dependency_groups = test
commands_pre =
python -m pip install uv
python -m uv pip install --resolution lowest-direct -e .
[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 .
# TODO: Update to 3.14 when linkml and its deps support 3.14
[testenv:gallery-py313-upgraded-optional]
[testenv:gallery-py313-prerelease-optional]
[testenv:build] # using tox for this so that we can have a clean build environment
[testenv:wheelinstall] # use with `--installpkg dist/*-none-any.whl`