2014-02-05 17:15:50 +00:00
|
|
|
[tox]
|
2023-04-07 21:03:47 +00:00
|
|
|
requires =
|
|
|
|
tox>=4.2
|
|
|
|
env_list =
|
2022-09-03 16:51:10 +00:00
|
|
|
fix
|
2023-05-01 15:18:54 +00:00
|
|
|
py312
|
2023-03-25 20:24:21 +00:00
|
|
|
py311
|
2022-09-03 15:50:58 +00:00
|
|
|
py310
|
|
|
|
py39
|
|
|
|
py38
|
|
|
|
py37
|
|
|
|
readme
|
|
|
|
skip_missing_interpreters = true
|
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}
|
2023-04-05 16:20:20 +00:00
|
|
|
package = wheel
|
|
|
|
wheel_build_env = .pkg
|
|
|
|
extras =
|
|
|
|
graphviz
|
|
|
|
test
|
2023-04-07 21:03:47 +00:00
|
|
|
set_env =
|
2022-09-03 16:35:00 +00:00
|
|
|
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
|
|
|
|
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
|
|
|
|
_COVERAGE_SRC = {envsitepackagesdir}/sphinx_argparse_cli
|
|
|
|
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
|
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 =
|
2023-06-14 20:02:41 +00:00
|
|
|
pre-commit>=3.3.2
|
2022-09-03 16:51:10 +00:00
|
|
|
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
|
2023-04-07 21:03:47 +00:00
|
|
|
base_python = python3.10
|
2022-09-03 15:50:58 +00:00
|
|
|
skip_install = true
|
|
|
|
deps =
|
2023-02-06 03:13:17 +00:00
|
|
|
build[virtualenv]>=0.10
|
|
|
|
twine>=4.0.2
|
2022-09-03 15:50:58 +00:00
|
|
|
commands =
|
|
|
|
python -m build --sdist --wheel -o {envtmpdir} .
|
|
|
|
twine check {envtmpdir}/*
|
|
|
|
|
|
|
|
[testenv:dev]
|
|
|
|
description = generate a DEV environment
|
2023-04-07 21:03:47 +00:00
|
|
|
package = editable
|
2022-09-03 15:50:58 +00:00
|
|
|
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
|