8afdedab30
This PS adds tooling and automation to automatically generate Drydock's documentation into feature-rich HTML pages that can be hosted. To run the documentation job, simply execute: tox -e docs A future PS should add warning_is_error to 'build_sphinx' in setup.py once the import warnings are addressed. Change-Id: I91a3c585b2c27096e7fde12d180638d1ae4bdb81
48 lines
1.1 KiB
INI
48 lines
1.1 KiB
INI
[tox]
|
|
envlist = py35
|
|
|
|
[testenv]
|
|
basepython=python3.5
|
|
deps=
|
|
-rrequirements-direct.txt
|
|
-rrequirements-test.txt
|
|
|
|
[testenv:yapf]
|
|
whitelist_externals=find
|
|
commands=
|
|
yapf -i -r --style=pep8 {toxinidir}/setup.py
|
|
yapf -i -r --style=pep8 {toxinidir}/drydock_provisioner
|
|
yapf -i -r --style=pep8 {toxinidir}/tests
|
|
find {toxinidir}/drydock_provisioner -name '__init__.py' -exec yapf -i --style=pep8 \{\} ;
|
|
|
|
[testenv:unit]
|
|
setenv=
|
|
PYTHONWARNING=all
|
|
commands=
|
|
py.test \
|
|
tests/unit/{posargs}
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --config-file=etc/drydock/drydock-config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands = oslopolicy-sample-generator --config-file etc/drydock/drydock-policy-generator.conf
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 \
|
|
{posargs}
|
|
|
|
[testenv:bandit]
|
|
commands = bandit -r drydock_provisioner -n 5
|
|
|
|
[flake8]
|
|
ignore=E302,H306,H304,D101,D102,D103,D104
|
|
exclude= venv,.venv,.git,.idea,.tox,*.egg-info,*.eggs,bin,dist,./build/
|
|
max-line-length=119
|
|
|
|
[testenv:docs]
|
|
whitelist_externals=rm
|
|
commands =
|
|
rm -rf docs/build
|
|
python setup.py build_sphinx {posargs}
|