Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
82 lines (73 loc) · 3.02 KB
/
Copy pathtox.ini
File metadata and controls
82 lines (73 loc) · 3.02 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
# 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 -m pip install -U {opts} {packages}
prerelease: python -m pip install -U --pre {opts} {packages}
extras =
# user-facing feature extras, needed by the optional test and gallery environments
optional: zarr
optional: termset
gallery: zarr
gallery: termset
dependency_groups =
# development dependency groups
test: test
optional: stream
gallery: test
gallery: docs
deps =
# pyarrow backs the pandas 3 ArrowStringArray scratch test (tests/unit/test_scratch.py)
test-upgraded, test-prerelease: pyarrow
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
test: python test.py -v
gallery: python test.py --example
build: python -m pip install -U build
build: python -m build
wheelinstall: python -c "import pynwb"
# list of pre-defined environments
[testenv:test-py{310,311,312,313,314}-upgraded]
[testenv:test-py{313,314}-upgraded-optional]
[testenv:test-py314-prerelease]
[testenv:gallery-py{310,311,312,313,314}-upgraded]
[testenv:gallery-py{313,314}-prerelease]
# minimum envs use uv with --resolution lowest-direct to install the lowest
# compatible versions of the direct dependencies (replacing requirements-min.txt)
[testenv:test-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
# install the documentation and optional dependencies at their latest compatible versions
python -m uv pip install --group docs -e ".[zarr,termset]"
# then resolve pynwb's own (direct) dependencies down to their minimum supported versions
python -m uv pip install --resolution lowest-direct -e .
[testenv:build] # using tox for this so that we can have a clean build environment
[testenv:wheelinstall] # use with `--installpkg dist/*-none-any.whl`