# 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-py312-upgraded] [testenv:pytest-py312-prerelease] [testenv:pytest-py311-optional-pinned] # some optional reqs not compatible with py312 yet [testenv:pytest-py{38,39,310,311,312}-pinned] [testenv:pytest-py38-minimum] [testenv:gallery-py312-upgraded] [testenv:gallery-py312-prerelease] [testenv:gallery-py311-optional-pinned] [testenv:gallery-py{38,39,310,311,312}-pinned] [testenv:gallery-py38-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`