[tox] minversion = 2.3.1 skipsdist = True envlist = py35,py27,pep8 [testenv] usedevelop = True install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = find tests -type f -name "*.pyc" -delete stestr run {posargs} whitelist_externals = bash find passenv = PBR_VERSION [testenv:pep8] basepython = python3 deps = {[testenv]deps} commands = flake8 # Run security linter bandit -r tests -x tests [testenv:bandit] basepython = python3 commands = bandit -r tests -x tests [testenv:venv] basepython = python3 commands = {posargs} [testenv:cover] basepython = python3 setenv = PYTHON=coverage run --source tests --parallel-mode commands = stestr run {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml coverage report [flake8] filename= *.py show-source = true enable-extensions = H203,H904 per-file-ignores = # continuation line under-indented for visual indent ./tests/spark_etl/*.py: E127,E128,E501,E704,E731,E741 # D100: Missing docstring in public module # D101: Missing docstring in public class # D102: Missing docstring in public method # D103: Missing docstring in public function # D104: Missing docstring in public package # D107: Missing docstring in __init__ # H105 Don't use author tags # D203: 1 blank line required before class docstring (deprecated in pep257) # H202: assertRaises Exception too broad # D401: First line should be in imperative mood # H306 imports not in alphabetical order (follow this rule instead https://www.python.org/dev/peps/pep-0008/#imports) # W504: line break after binary operator # W503: line break before binary operator ignore = D100,D101,D102,D103,D104,D107,H105,D203,H202,D401,H306,W504,W503 exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot max-complexity=24