From ed46f8ab17901a11811f4e634bd9cff2a03972a2 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Sun, 14 Nov 2021 00:00:43 -0500 Subject: [PATCH] Update toxfile to fix coverage calculation and improve formatting --- tox.ini | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/tox.ini b/tox.ini index 54b5d7b..cabee48 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,10 @@ locked_deps = ruamel.yaml toml commands = - pytest --cov={envsitepackagesdir}/kodak --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/ + pytest {toxinidir}/tests/ \ + --cov {toxinidir}/kodak \ + --cov-config {toxinidir}/.coveragerc \ + --cov-report term-missing [testenv:static] description = Static formatting and quality enforcement @@ -35,9 +38,13 @@ locked_deps = pre-commit-hooks pylint commands = - pre-commit run --all-files - pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/kodak/ - mypy --ignore-missing-imports --no-strict-optional {toxinidir}/kodak/ + pre-commit run \ + --all-files + pylint {toxinidir}/kodak/ \ + --rcfile {toxinidir}/.pylintrc + mypy {toxinidir}/kodak/ \ + --ignore-missing-imports \ + --no-strict-optional [testenv:static-tests] description = Static formatting and quality enforcement for the tests @@ -49,8 +56,11 @@ locked_deps = pytest openapi-spec-validator commands = - pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/ - mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/ + pylint {toxinidir}/tests/ \ + --rcfile {toxinidir}/.pylintrc + mypy {toxinidir}/tests/ \ + --ignore-missing-imports \ + --no-strict-optional [testenv:security] description = Security checks @@ -62,7 +72,19 @@ locked_deps = safety poetry commands = - bandit --recursive --quiet {toxinidir}/kodak/ - bandit --recursive --quiet --skip B101 {toxinidir}/tests/ - poetry export --format requirements.txt --output {envtmpdir}/requirements.txt --without-hashes --dev - safety check --bare --file {envtmpdir}/requirements.txt + bandit {toxinidir}/kodak/ \ + --recursive \ + --quiet + bandit {toxinidir}/tests/ \ + --recursive \ + --quiet \ + --skip B101 + poetry export \ + --format requirements.txt \ + --output {envtmpdir}/requirements.txt \ + --without-hashes \ + --dev + safety check \ + --json \ + --file {envtmpdir}/requirements.txt \ + --ignore 42050 # werkzeug defaults update in 2.0.2