pegleg/tox.ini
Sergiy Markin 0f2ab241f9 Restored ubuntu_bionic image build
This PS restores image build for ubuntu_bionic and adds appropriate
gates to keep it tested by appropriate functional and integrational
tests.

Change-Id: Id31d97ced8732d823937fb1f218e7ad8760d735c
2023-06-07 21:02:28 +00:00

163 lines
3.6 KiB
INI

[tox]
envlist = py38,pep8,docs,cover
minversion = 2.38.0
skipsdist = True
[testenv]
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
PIPENV_VERBOSITY=-1
PIPENV_IGNORE_PIPFILE=1
deps=
-r{toxinidir}/requirements-frozen.txt
-r{toxinidir}/test-requirements.txt
passenv =
http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY
no_proxy
NO_PROXY
PBR_VERSION
allowlist_externals =
bash
find
commands =
find . -type f -name "*.pyc" -delete
bash -c "{toxinidir}/tools/install-cfssl.sh"
bash -c "{toxinidir}/tools/gate/run-unit-tests.sh '{posargs}'"
[testenv:py36]
deps =
-r{toxinidir}/requirements-frozen-bionic.txt
-r{toxinidir}/test-requirements.txt
allowlist_externals =
bash
find
commands =
{[testenv]commands}
[testenv:py38]
allowlist_externals =
bash
find
commands =
{[testenv]commands}
[testenv:fmt]
basepython = python3
commands =
yapf -ir {toxinidir}/pegleg {toxinidir}/tests
allowlist_externals =
yapf
[testenv:pep8]
basepython = python3
command =
bash -c "{toxinidir}/tools/gate/whitespace-linter.sh"
bandit --skip B105 -r pegleg -n 5
flake8 {toxinidir}/pegleg
yapf -dr {toxinidir}/pegleg {toxinidir}/tests
allowlist_externals =
bash
bandit
flake8
yapf
find
[testenv:docs]
basepython = python3
deps=
-r{toxinidir}/requirements-frozen.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
bash -c "{toxinidir}/tools/gate/build-docs.sh"
allowlist_externals =
bash
[testenv:bandit]
basepython = python3
commands = bandit --skip B105 -r pegleg -n 5
[testenv:safety]
basepython = python3
deps =
safety
commands =
safety check -r {toxinidir}/requirements-frozen.txt -r {toxinidir}/doc/requirements.txt --full-report
[testenv:cover]
basepython = python3
commands =
find . -type f -name "*.pyc" -delete
bash -c "{toxinidir}/tools/install-cfssl.sh"
bash -c "{toxinidir}/tools/gate/run-cover-tests.sh '{posargs}'"
allowlist_externals =
bash
find
[testenv:freeze-bionic]
recreate = True
allowlist_externals=
rm
sh
deps=
-r{toxinidir}/requirements-direct.txt
commands=
rm -f {toxinidir}/requirements-frozen-bionic.txt
sh -c "pip freeze --all | grep -vE 'pegleg|pyinotify|pkg-resources' > requirements-frozen-bionic.txt"
[testenv:freeze]
recreate = True
allowlist_externals=
rm
sh
deps=
-r{toxinidir}/requirements-direct.txt
commands=
rm -f {toxinidir}/requirements-frozen.txt
sh -c "pip freeze --all | grep -vE 'pegleg|pyinotify|pkg-resources' > requirements-frozen.txt"
[testenv:releasenotes]
basepython = python3
deps=
-r{toxinidir}/requirements-frozen.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
allowlist_externals =
rm
[testenv:venv]
commands = {posargs}
[flake8]
filename = *.py
show-source = true
# [H106] Don't put vim configuration in source files.
# [H201] No 'except:' at least use 'except Exception:'
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H201,H904
# TODO(lamt) Clean up these docstring violations if possible
# [H403] multi line docstrings should end on a new line
# [H404] multi line docstring should start without a leading new line
# [H405] multi line docstring summary not separated with an empty line
# [W503] line break before binary operator
ignore = H403,H404,H405,W503
exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,*.ini,*.po,*.pot
max-complexity = 24
application-import-names = pegleg
application-package-names = deckhand,promenade,shipyard
import-order-style = pep8