6bbcf49b74
This patch cleans up docs/*.py and update tox.ini's exclude target as well as specifying pep8 to scan *.py files only. Change-Id: Ic81cc81edd9da682581d9deb0a7a5404bb7aa4d9
42 lines
1.2 KiB
INI
42 lines
1.2 KiB
INI
[tox]
|
|
envlist = py35, pep8
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
setenv=
|
|
PYTHONWARNING=all
|
|
commands=
|
|
pytest \
|
|
{posargs}
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:bandit]
|
|
# NOTE(Bryan Strassner) ignoring airflow plugin which uses a subexec
|
|
# tests are not under the shipyard_airflow directory, not exlcuding those
|
|
commands = bandit -r shipyard_airflow -x plugins/rest_api_plugin.py -n 5
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --config-file=generator/config-generator.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands = oslopolicy-sample-generator --config-file=generator/policy-generator.conf
|
|
|
|
[flake8]
|
|
filename = *.py
|
|
# NOTE(Bryan Strassner) ignoring F841 because of the airflow example pattern
|
|
# of naming variables even if they aren't used for DAGs and Operators.
|
|
# Doing so adds readability and context in this case.
|
|
ignore = F841
|
|
# NOTE(Bryan Strassner) excluding 3rd party and generated code that is brought into the
|
|
# codebase.
|
|
exclude = .venv,.git,.tox,build,dist,*plugins/rest_api_plugin.py,*lib/python*,*egg,alembic/env.py,docs
|
|
|
|
[testenv:docs]
|
|
whitelist_externals=rm
|
|
commands =
|
|
rm -rf docs/build
|
|
python setup.py build_sphinx {posargs}
|