[tox] isolated_build = true envlist = # Keep this in sync with .github/workflows/main.yml py{37,38,39,310,311} formatting typecheck lint docs release_notes [gh-actions] python = 3.7: py37 3.8: py38 3.9: py39 3.10: py310 3.11: py311, formatting, typecheck, lint, docs, release_notes [testenv] extras = dotnet go deps = beautifulsoup4 pytest commands = pytest {posargs} [testenv:formatting] basepython = python3 skip_install = true deps = black commands = black --check --diff autoapi tests [testenv:lint] skip_install = true deps = ruff commands = ruff check {posargs:autoapi} [testenv:typecheck] deps = mypy types-docutils types-PyYAML commands = mypy {posargs:autoapi} [testenv:docs] extras = docs deps = changedir = {toxinidir}/docs commands = sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html [testenv:release_notes] skip_install = true deps = towncrier commands = towncrier {posargs:check} [testenv:release] skip_install = true deps = build twine commands = python -c "import shutil, os; os.path.isdir('dist') and shutil.rmtree('dist')" python -m build twine upload dist/*