# To use tox, see https://tox.readthedocs.io # (you may also want to install tox-uv) # then run `tox` or `tox -- {pytest args}` # run in parallel using `tox -p` [tox] envlist = py311 [testenv] usedevelop = true [testenv:py{311,312,313,314}] description = Run unit tests with this Python version extras = testing commands = pytest {posargs} [testenv:py{311,312,313,314}-no-myst] description = Run unit tests with this Python version extras = testing-no-myst commands = pytest {posargs} [testenv:docs-{alabaster,rtd,pydata,sbt,furo,im}] description = Run documentation build for this theme extras = rtd rtd: theme_rtd pydata: theme_pydata sbt: theme_sbt furo: theme_furo im: theme_im allowlist_externals = echo passenv = BUILDER CLEAN TERM setenv = alabaster: SPHINX_THEME = alabaster rtd: SPHINX_THEME = sphinx_rtd_theme pydata: SPHINX_THEME = pydata_sphinx_theme sbt: SPHINX_THEME = sphinx_book_theme furo: SPHINX_THEME = furo im: SPHINX_THEME = sphinx_immaterial commands_pre = python -c "import shutil; shutil.rmtree('docs/_build/{env:BUILDER:html}/{env:SPHINX_THEME:}', ignore_errors=True) if '{env:CLEAN:}' else None" commands = sphinx-build -nW --keep-going {posargs} -b {env:BUILDER:html} docs/ docs/_build/{env:BUILDER:html}/{env:SPHINX_THEME:} commands_post = echo "open docs/_build//{env:BUILDER:html}/{env:SPHINX_THEME:}/index.html" [testenv:mypy] description = Run type checking with mypy dependency_groups = mypy commands = mypy {posargs:sphinx_design} [testenv:ruff-check] description = Run linting with ruff (use --fix to auto-fix) dependency_groups = ruff commands = ruff check {posargs:--fix} [testenv:ruff-fmt] description = Run formatting with ruff dependency_groups = ruff commands = ruff format {posargs}