f235512d57
- Adding yapf diff to pep8 target - Adding yapf tox target to do actual format ** The rest of this PS contains formatted code only, no other changes Change-Id: Idfef60f53565add2d0cf65bb8e5b91072cf0aded
90 lines
2.1 KiB
INI
90 lines
2.1 KiB
INI
[tox]
|
|
skipsdist = True
|
|
envlist = py35, pep8, cover, bandit
|
|
|
|
[testenv]
|
|
deps=
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
passenv=HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy
|
|
setenv=
|
|
VIRTUAL_ENV={envdir}
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
whitelist_externals =
|
|
find
|
|
rm
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
rm -Rf .testrepository/times.dbm
|
|
|
|
[testenv:py35]
|
|
commands =
|
|
{[testenv]commands}
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
commands =
|
|
oslo-config-generator --config-file=etc/armada/config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
basepython = python3
|
|
commands =
|
|
oslopolicy-sample-generator --config-file=etc/armada/policy-generator.conf
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps = -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
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps =
|
|
yapf
|
|
.[bandit]
|
|
{[testenv]deps}
|
|
commands =
|
|
yapf -dr {toxinidir}/armada {toxinidir}/setup.py
|
|
flake8 {posargs}
|
|
# Run security linter as part of the pep8 gate instead of a separate zuul job.
|
|
bandit -r armada -x armada/tests -n 5
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
commands =
|
|
bandit -r armada -x armada/tests -n 5
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv = {[testenv]setenv}
|
|
PYTHON=coverage run --source armada --parallel-mode
|
|
commands =
|
|
coverage erase
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:yapf]
|
|
basepython = python3
|
|
commands =
|
|
yapf -ir {toxinidir}/armada {toxinidir}/setup.py
|
|
|
|
[flake8]
|
|
filename = *.py
|
|
ignore =
|
|
exclude = .git,.tox,dist,*lib/python*,*egg,build,releasenotes,doc/*,hapi,venv
|