[tox] envlist = py37,security,lint isolated_build = True [testenv] wheel = true wheel_build_env = build basepython = python3.7 [testenv:build] deps = setuptools [testenv:py37] deps = importlib_metadata pytest pytest-asyncio 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 {toxinidir}/src/hasskiosk -r [testenv:lint] deps = flake8 flake8-blind-except flake8-builtins flake8-docstrings flake8-executable flake8-isort flake8-logging-format 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 recreate=True deps = bpython python-language-server rope pip-tools -r{toxinidir}/requirements.txt {[testenv:py37]deps} {[testenv:security]deps} {[testenv:security]deps} {[testenv:lint]deps} #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 **/hasskiosk/__main__.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/