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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
[tox]
envlist =
{python-3.9,python-3.10,python-3.11,python-pypy3.9,python-pypy3.10},
ignore_basepython_conflict = true
[testenv]
basepython =
python-pypy3.9: {env:TOXPYTHON:pypy3.9}
python-pypy3.10: {env:TOXPYTHON:pypy3.10}
{python-3.9}: {env:TOXPYTHON:python3.9}
python-3.10: {env:TOXPYTHON:python3.10}
python-3.11: {env:TOXPYTHON:python3.11}
{black,docs,isort,mypy,clean}: {env:TOXPYTHON:python3.11}
{check-black,check-check-manifest,check-isort,check-pydocstyle,check-pylint}: {env:TOXPYTHON:python3.11}
{coverage,report,codecov}: {env:TOXPYTHON:python3.11}
setenv =
PYTHONUNBUFFERED=yes
passenv =
*
usedevelop = false
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test_requirements.txt
commands =
python -m unittest discover
[testenv:check-black]
deps =
black
skip_install = true
commands =
python -m black --diff --check src setup.py tests
[testenv:check-check-manifest]
deps =
-r{toxinidir}/requirements.txt
check-manifest
skip_install = true
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest {toxinidir}
[testenv:check-isort]
deps =
-r{toxinidir}/requirements.txt
isort
skip_install = true
commands =
python -m isort --profile black --verbose --check-only --diff src tests setup.py
[testenv:check-pydocstyle]
deps =
pydocstyle
skip_install = true
commands =
python -m pydocstyle src tests
[testenv:check-pylint]
deps =
-r{toxinidir}/requirements.txt
pylint
skip_install = true
commands =
python -m pylint src/code_include tests setup.py
[testenv:black]
deps =
-r{toxinidir}/requirements.txt
black
skip_install = true
commands =
python -m black src setup.py tests
[testenv:isort]
deps =
isort
skip_install = true
commands =
python -m isort --profile black src setup.py tests
[testenv:docs]
usedevelop = true
deps =
-r{toxinidir}/docs/requirements.txt
-r{toxinidir}/requirements.txt
commands =
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs
[testenv:coverage]
deps =
-r{toxinidir}/requirements.txt
codecov
coverage
commands =
python -m coverage run -m unittest discover
[testenv:codecov]
deps =
codecov
coverage
skip_install = true
commands =
python -m coverage xml --ignore-errors
codecov []
[testenv:mypy]
deps =
-r{toxinidir}/requirements.txt
mypy
types-beautifulsoup4
types-docutils
commands =
python -m mypy --strict src tests
[testenv:report]
deps = coverage
skip_install = true
commands =
python -m coverage combine --append
python -m coverage report --omit=tests/*
python -m coverage html --omit=tests/*
[testenv:clean]
commands = coverage erase
skip_install = true
deps = coverage
|