[tox] envlist = py37,security,lint,bundle isolated_build = True [testenv] wheel = true wheel_build_env = build [testenv:build] deps = setuptools [testenv:py37] deps = pytest pytest-cov pdbpp commands = pytest --cov={envsitepackagesdir}/hasskiosk \ --cov-report=term-missing \ # --cov-report=xml:coverage.xml \ # --junitxml=test-report.xml \ --cov-branch \ --cov-fail-under=80 \ {posargs} [testenv:security] deps = bandit commands = bandit {envsitepackagesdir}/hasskiosk -r [testenv:lint] deps = flake8 flake8-bandit flake8-blind-except flake8-builtins flake8-docstrings flake8-executable flake8-isort flake8-logging-format flake8-mypy pycodestyle pydocstyle commands = flake8 --output-file pylint-out.txt --format pylint --tee [testenv:bundle] commands = python setup.py sdist bdist_wheel [testenv:dev] # this environment lets tox create a development env quickly and easily deps = bpython mypy python-language-server rope {[testenv:py37]deps} {[testenv:security]deps} {[testenv:security]deps} {[testenv:lint]deps} basepython = python3.7 envdir = {toxinidir}/.venv usedevelop = True [pycodestyle] max-line-length = 87 [pydocstyle] ignore = D203,D213,D400,D401,D407,D413 [flake8] ignore = D401 enable-extensions = G,M max_line_length = 87 exclude = build/ dist/ docs/ tests/ .tox/ _version.py .* [isort] line_length = 87 [mypy] files = src/**/*.py,test/**/*.py mypy_path = [pytest] addopts= -ra --cov-report=term-missing [coverage:run] branch = True include = .tox/**/hasskiosk/ omit = **/hasskiosk/_version.py setup.py tests/* [coverage:paths] # map these two directories as equivalent, so that covered packaged code shows # up as coverage of the git paths actually being reported source = ./src/ .tox/**/site-packages/