Skip to content

Commit

Permalink
tox: Enable testing and linting ngclient
Browse files Browse the repository at this point in the history
* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: theupdateframework#1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
  • Loading branch information
Jussi Kukkonen authored and MVrachev committed Jul 1, 2021
1 parent 239927f commit d3217b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit d3217b2

Please sign in to comment.