1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
[tox]
env_list =
lint
mypy
covclean
py{38,39,310,311,312,313}
covcombine
covreport
labels =
ci = py{38,39,310,311,312,313}, covcombine, covreport
ci-mypy = mypy-py38, mypy-py313
ci-package-check = twine-check
minversion = 4.22.0
[testenv]
package = wheel
wheel_build_env = build_wheel
dependency_groups = test
commands = coverage run -m pytest -v {posargs}
depends =
py{38,39,310,311,312},py: clean
covcombine: py,py{38,39,310,311,312}
covreport: covcombine
[testenv:covclean]
skip_install = true
dependency_groups = coverage
commands = coverage erase
[testenv:covcombine]
skip_install = true
dependency_groups = coverage
commands = coverage combine
[testenv:covreport]
skip_install = true
dependency_groups = coverage
commands_pre = coverage html --fail-under=0
commands = coverage report
[testenv:lint]
dependency_groups = lint
commands = pre-commit run -a
[testenv:mypy,mypy-{py38,py313}]
dependency_groups = typing
commands = mypy src/
[testenv:twine-check]
description = "check the metadata on a package build"
allowlist_externals = rm
dependency_groups = build
commands_pre = rm -rf dist/
# check that twine validating package data works
commands = python -m build
twine check dist/*
[testenv:docs]
description = "build docs with sphinx"
basepython = python3.12
dependency_groups = docs
allowlist_externals = rm
changedir = docs/
# clean the build dir before rebuilding
commands_pre = rm -rf _build/
commands = sphinx-build -d _build/doctrees -b dirhtml -W . _build/dirhtml {posargs}
|