mirror of
https://github.com/Telecominfraproject/oopt-gnpy-api.git
synced 2025-10-28 16:52:19 +00:00
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: Idabe9dfdc1827bf88f614b66eef1546728b15c1f
45 lines
976 B
INI
45 lines
976 B
INI
[tox]
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
extras = tests
|
|
deps =
|
|
cover: pytest-cov
|
|
linters: flake8
|
|
linters: pep8-naming
|
|
linters: mccabe
|
|
linters: flake8-noqa
|
|
linters-diff-ci: flake8-html
|
|
changedir = {toxinidir}
|
|
usedevelop = True
|
|
setenv =
|
|
cover: CI_COVERAGE_OPTS=--cov=gnpyapi --cov=tests --cov-report=
|
|
commands =
|
|
pytest {env:CI_COVERAGE_OPTS:} -vv {posargs}
|
|
cover: coverage html -d cover
|
|
cover: coverage xml -o cover/coverage.xml
|
|
python -m build
|
|
|
|
[testenv:docs]
|
|
extras = docs
|
|
allowlist_externals =
|
|
/bin/sh
|
|
commands =
|
|
sphinx-build -E -W --keep-going -q -b html docs/ doc/build/html
|
|
/bin/sh -c "rstcheck --ignore-roles cite docs/*.rst"
|
|
|
|
[testenv:linters]
|
|
commands =
|
|
flake8 {posargs}
|
|
|
|
[testenv:linters-diff-ci]
|
|
allowlist_externals = bash
|
|
commands =
|
|
flake8 {posargs} --format html --htmldir linters --exit-zero
|
|
bash -c "git diff -U0 origin/$(git rev-parse --abbrev-ref HEAD) | flake8 --diff {posargs}"
|
|
|
|
[flake8]
|
|
max-line-length = 120
|
|
max-complexity = 15
|
|
ignore = N806 W503
|