2014-02-05 17:15:50 +00:00
|
|
|
[tox]
|
2020-09-21 12:46:28 +00:00
|
|
|
envlist =
|
2022-09-03 16:51:10 +00:00
|
|
|
fix
|
2022-09-03 15:50:58 +00:00
|
|
|
py310
|
|
|
|
py39
|
|
|
|
py38
|
|
|
|
py37
|
|
|
|
readme
|
|
|
|
isolated_build = true
|
|
|
|
skip_missing_interpreters = true
|
|
|
|
minversion = 3.14
|
2014-02-05 17:15:50 +00:00
|
|
|
|
|
|
|
[testenv]
|
2022-09-03 16:35:00 +00:00
|
|
|
description = run the unit tests with pytest under {basepython}
|
|
|
|
setenv =
|
|
|
|
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
|
|
|
|
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
|
|
|
|
_COVERAGE_SRC = {envsitepackagesdir}/sphinx_argparse_cli
|
2020-09-21 12:53:53 +00:00
|
|
|
extras =
|
2022-09-03 16:35:00 +00:00
|
|
|
graphviz
|
|
|
|
test
|
|
|
|
commands =
|
|
|
|
python -m pytest {tty:--color=yes} {posargs: \
|
|
|
|
--junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}pipdeptree \
|
|
|
|
--cov {toxinidir}{/}tests --cov-fail-under=75 \
|
|
|
|
--cov-config=pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context=test \
|
|
|
|
--cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \
|
|
|
|
tests}
|
|
|
|
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}{/}coverage.{envname}.xml
|
|
|
|
package = wheel
|
|
|
|
wheel_build_env = .pkg
|
2022-09-03 15:50:58 +00:00
|
|
|
|
2022-09-03 16:51:10 +00:00
|
|
|
[testenv:fix]
|
|
|
|
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
pre-commit>=2.20
|
|
|
|
commands =
|
|
|
|
pre-commit run --all-files --show-diff-on-failure
|
|
|
|
|
2022-09-03 15:50:58 +00:00
|
|
|
[testenv:readme]
|
|
|
|
description = check that the long description is valid
|
|
|
|
basepython = python3.10
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
build[virtualenv]>=0.8
|
|
|
|
twine>=4.0.1
|
|
|
|
commands =
|
|
|
|
python -m build --sdist --wheel -o {envtmpdir} .
|
|
|
|
twine check {envtmpdir}/*
|
|
|
|
|
|
|
|
[testenv:dev]
|
|
|
|
description = generate a DEV environment
|
|
|
|
usedevelop = true
|
|
|
|
commands =
|
|
|
|
python -m pip list --format=columns
|
|
|
|
python -c 'import sys; print(sys.executable)'
|
2022-09-03 16:51:10 +00:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
max-complexity = 22
|
|
|
|
max-line-length = 120
|
|
|
|
noqa-require-code = true
|
|
|
|
dictionaries = en_US,python,technical,django
|
|
|
|
|
|
|
|
[pep8]
|
|
|
|
max-line-length = 120
|