[tox] envlist = py35, pep8, coverage, bandit, docs [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 commands = bandit \ -r shipyard_airflow shipyard_client \ -x plugins/rest_api_plugin.py,shipyard_client/tests \ -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} [testenv:coverage] commands = pytest \ --cov-branch \ --cov-report term-missing:skip-covered \ --cov-config .coveragerc \ --cov=shipyard_client/api_client \ --cov=shipyard_airflow