# 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" from this directory. [tox] envlist = py{39,310,311,312}-{PyQt5,PySide2,PyQt6,PySide6}-all, py{39,310,311,312}-{PyQt5,PyQt6}-napari_{419,54,repo}, py{39,310}-PySide2-napari_{419,54,repo} toxworkdir=/tmp/tox [gh-actions] python = 3.9: py39 3.10: py310 3.11: py311 3.12: py312 fail_on_no_env = True [gh-actions:env] NAPARI = latest: all napari419: napari_419 napari54: napari_54 repo: napari_repo BACKEND = pyqt: PyQt5 pyside: PySide2 PyQt5: PyQt5 PySide2: PySide2 PyQt6: PyQt6 PySide6: PySide6 [base] deps = # pytest-xvfb ; sys_platform == 'linux' PyQt5: PyQt5!=5.15.0 PyQt5: PyQt5-sip!=12.12.0 PySide2: PySide2!=5.15.0 PyQt6: PyQt6 # fix PySide6 when a new napari release is out PySide6: PySide6<6.3.2; python_version < "3.10" PySide6: PySide6; python_version >= "3.10" PySide2: npe2!=0.2.2 imageio != 2.22.1 pytest-json-report [testenv] #recreate=true passenv = QT_API CI GITHUB_ACTIONS AZURE_PIPELINES DISPLAY XAUTHORITY NUMPY_EXPERIMENTAL_ARRAY_FUNCTION PYVISTA_OFF_SCREEN deps = {[base]deps} pytest-pretty extras = test commands = python -m pytest package/tests --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs} [testenv:py312-PySide2-conda] conda_env=environment.yml deps= pytest pytest-json-report lxml_html_clean [testenv:py{39,310,311,312}-{PyQt5,PySide2,PyQt6,PySide6}-napari_{419,54,repo}] deps = {[testenv]deps} napari_419: napari==0.4.19.post1 napari_54: napari==0.5.4 napari_repo: git+https://github.com/napari/napari.git commands = !napari_repo: python -m pytest -v package/tests/test_PartSeg/test_napari_widgets.py --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs} napari_repo: python -m pytest package/tests --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs} [testenv:py{39,310,311,312}-PyQt5-coverage] deps = {[testenv]deps} commands = coverage run --concurrency=multiprocessing -m pytest --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs} [testenv:py39-PyQt5-minimal] min_req = 1 min_req_constraints= typing-extensions==4.5.0 setenv = MINIMAL_REQUIREMENTS=1 PIP_CONSTRAINT= UV_CONSTRAINT= deps = {[base]deps} setuptools_scm[toml]>=3.4 lxml_html_clean commands = coverage run -m pytest --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs} [testenv:py{39,310,311,312}-{PyQt5, PySide2,PyQt6,PySide6}-azure] deps = pytest-azurepipelines {[testenv]deps} [testenv:jupyter] deps = {[testenv]deps} jupyter matplotlib setenv = DATA_PATH = {toxinidir}/typy_neuronow2 commands = jupyter nbconvert --to notebook --execute tutorials/tutorial_neuron_types/Neuron_types_example.ipynb [testenv:docs] deps = {[testenv]deps} -rrequirements/constraints_py3.12_docs.txt allowlist_externals = make tar extras = docs pyqt6 commands = make -C docs html tar -C docs/_build -czf docs.tar.gz html