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
|
[tox]
minversion = 3.18.0
envlist = py312,py311,py310,py39,py38,pep8
[testenv]
usedevelop = True
install_command = pip install -U --force-reinstall {opts} {packages}
allowlist_externals =
find
stestr
deps = -r{toxinidir}/test-requirements.txt
commands =
python tools/find_and_rm.py
stestr run {posargs}
[testenv:pep8]
sitepackages = False
commands =
flake8 {posargs}
black --check {posargs} stestr tools doc
[testenv:black]
commands =
black {posargs} stestr tools doc
[testenv:venv]
commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source stestr
commands =
coverage run stestr/cli.py run {posargs}
coverage combine
coverage html -d cover
[testenv:coverxml]
setenv =
PYTHON=coverage run --source stestr
commands =
coverage run stestr/cli.py run {posargs}
coverage combine
coverage xml -o cover/coverage.xml
[testenv:docs]
extras =
sql
commands =
doc8 -e .rst doc/source CONTRIBUTING.rst README.rst
sphinx-build -W -T --keep-going -b html doc/source doc/build/html
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# H402 skipped because some docstrings aren't sentences
# E123 skipped because it is ignored by default in the default pep8
# E129 skipped because it is too limiting when combined with other rules
# H305 skipped because it is inconsistent between python versions
# E711 skipped because sqlalchemy filter() requires using == instead of is
# W504 skipped because it makes multiline operations too hard with W503
ignore = E125,H402,E123,E129,H305,E711,W504,W503,E203
exclude = .venv,.git,.tox,dist,doc,*egg,build,releasenotes
max-line-length = 88
[testenv:pip-check-reqs]
# Do not install test-requirements as that will pollute the virtualenv for
# determining missing packages.
# This also means that pip-check-reqs must be installed separately, outside
# of the requirements.txt files
deps = pip_check_reqs
-r{toxinidir}/requirements.txt
commands=
# pip-extra-reqs -d --ignore-file=stestr/tests/* stestr
pip-missing-reqs -d --ignore-file=stestr/tests/* stestr
|