-
Notifications
You must be signed in to change notification settings - Fork 26
/
tox.ini
58 lines (53 loc) · 2.42 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
# 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 >= 22.0
[testenv]
download = True
setenv =
PYTHONDONTWRITEBYTECODE = 1
VIRTUALENV_PIP = 23.3.1
recreate =
pinned, minimum, upgraded, prerelease: False
build, wheelinstall: True # good practice to recreate the environment
skip_install =
pinned, minimum, 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
pinned, minimum, 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}
deps =
# use pinned, minimum, or neither (use dependencies in pyproject.toml)
pytest, gallery: -rrequirements-dev.txt
gallery: -rrequirements-doc.txt
optional: -rrequirements-opt.txt
pinned: -rrequirements.txt
minimum: -rrequirements-min.txt
commands =
python --version # print python version for debugging
python -m pip check # check for conflicting packages
python -m pip list # list installed packages for debugging
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. (Technically environments not listed here
# like build-py312 can also be used.)
[testenv:pytest-py313-upgraded]
[testenv:pytest-py313-prerelease]
[testenv:pytest-py311-optional-pinned] # some optional reqs not compatible with py312 yet
[testenv:pytest-py{39,310,311,312,313}-pinned]
[testenv:pytest-py39-minimum]
[testenv:gallery-py313-upgraded]
[testenv:gallery-py313-prerelease]
[testenv:gallery-py311-optional-pinned]
[testenv:gallery-py{39,310,311,312,313}-pinned]
[testenv:gallery-py39-minimum]
[testenv:build] # using tox for this so that we can have a clean build environment
[testenv:wheelinstall] # use with `--installpkg dist/*-none-any.whl`