promenade/tox.ini

94 lines
2.3 KiB
INI

[tox]
envlist = pep8,py38,bandit,docs
[testenv]
pass_env =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
[testenv:venv]
commands = {posargs}
[testenv:py38]
allowlist_externals =
pytest
setenv =
PYTHONWARNING=all
deps =
-r{toxinidir}/requirements-frozen.txt
commands =
pytest {posargs}
[testenv:bandit]
deps =
-r{toxinidir}/requirements-frozen.txt
commands =
bandit --skip B324 -r promenade
[testenv:docs]
pass_env = {[pkgenv]pass_env}
allowlist_externals =
rm
deps =
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements-frozen.txt
commands =
rm -rf doc/build
sphinx-build -W -b html doc/source doc/build/html
[testenv:fmt]
deps =
-r{toxinidir}/requirements-frozen.txt
allowlist_externals =
yapf
commands =
yapf -ir {toxinidir}/promenade {toxinidir}/tests {toxinidir}/tools/image_tags.py
[testenv:freeze]
recreate = True
allowlist_externals=
rm
sh
deps=
-r{toxinidir}/requirements-direct.txt
-r{toxinidir}/test-requirements.txt
commands=
rm -f requirements-frozen.txt
rm -f requirements-tree.txt
sh -c "pip freeze --all | grep -vE 'promenade|pyinotify|pkg-resources' > requirements-frozen.txt"
[testenv:gate-lint]
deps =
-r{toxinidir}/requirements-frozen.txt
allowlist_externals = sh
commands =
sh -c "{toxinidir}/tools/lint_gate.sh"
[testenv:pep8]
deps =
-r{toxinidir}/requirements-frozen.txt
allowlist_externals =
yapf
bandit
flake8
commands =
yapf -rd {toxinidir}/promenade {toxinidir}/tests {toxinidir}/tools/image_tags.py
flake8 {toxinidir}/promenade
bandit --skip B324 -r promenade
[flake8]
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H204] Use assert(Not)Equal to check for equality.
# [H205] Use assert(Greater|Less)(Equal) for comparison.
# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H203,H204,H205,H210
# [E731] Do not assign a lambda expression, use a def. This reduces readability in some cases.
ignore = E126,E731,F405,H102,H301,H306,H401,H404,H405,H904,W503,W504
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,releasenotes,doc,alembic/versions