tox: Enable testing and linting ngclient

* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: #1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
This commit is contained in:
Jussi Kukkonen 2021-05-21 13:30:45 +03:00
parent 6da206516b
commit 775c5c6a81

10
tox.ini
View file

@ -16,7 +16,7 @@ changedir = tests
commands =
python --version
python -m coverage run aggregate_tests.py
python -m coverage report -m --fail-under 97
python -m coverage report -m --fail-under 97 --omit "{toxinidir}/tuf/ngclient/*"
deps =
-r{toxinidir}/requirements-test.txt
@ -43,13 +43,13 @@ changedir = {toxinidir}
commands =
# Use different configs for new (tuf/api/*) and legacy code
# TODO: configure black and isort args in pyproject.toml (see #1161)
black --check --diff --line-length 80 tuf/api
isort --check --diff --line-length 80 --profile black -p tuf tuf/api
pylint -j 0 tuf/api --rcfile=tuf/api/pylintrc
black --check --diff --line-length 80 tuf/api tuf/ngclient
isort --check --diff --line-length 80 --profile black -p tuf tuf/api tuf/ngclient
pylint -j 0 tuf/api tuf/ngclient --rcfile=tuf/api/pylintrc
# NOTE: Contrary to what the pylint docs suggest, ignoring full paths does
# work, unfortunately each subdirectory has to be ignored explicitly.
pylint -j 0 tuf --ignore=tuf/api,tuf/api/serialization
pylint -j 0 tuf --ignore=tuf/api,tuf/api/serialization,tuf/ngclient,tuf/ngclient/_internal
mypy