# To use tox, see https://tox.readthedocs.io
# Simply pip or conda install tox
# If you use conda, you may also want to install tox-conda
# then run `tox` or `tox -- {pytest args}`
# run in parallel using `tox -p`
[tox]
envlist = py310

[testenv]
usedevelop = true

[testenv:py{39,310,311,312}]
extras =
    testing
commands = pytest {posargs}

[testenv:cli]
changedir={toxinidir}
commands = sphinx-etoc {posargs}

[testenv:docs-{update,clean}]
extras = rtd
whitelist_externals =
    rm
    echo
setenv =
    update: SKIP_APIDOC = true
commands =
    clean: rm -rf docs/_build
    sphinx-build -nW --keep-going -b {posargs:html} docs/ docs/_build/{posargs:html}
commands_post = echo "open docs/_build/html/index.html"

[flake8]
max-line-length = 100
extend-ignore = E203
