diff --git a/setup.cfg b/setup.cfg index cb55349..adcbe17 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,26 +19,5 @@ packages = find: install_requires = paho-mqtt -[options.extras_require] -dev = - bpython - flake8 - flake8-bandit - flake8-blind-except - flake8-builtins - flake8-docstrings - flake8-executable - flake8-isort - flake8-logging-format - mypy - pdbpp - pycodestyle - pydocstyle - pytest - pytest-cov - python-language-server - rope - sphinx - [options.packages.find] where=src diff --git a/tox.ini b/tox.ini index 14ebee4..b07a242 100644 --- a/tox.ini +++ b/tox.ini @@ -5,27 +5,43 @@ isolated_build = True [testenv] wheel = true wheel_build_env = build -extras= - dev [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-report=xml:coverage.xml \ + # --junitxml=test-report.xml \ --cov-branch \ - --cov-fail-under=80 + --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 @@ -33,6 +49,21 @@ commands = 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