Files
oopt-gnpy-api/tox.ini
EstherLerouzic 733af3d088 add missing tox and config files
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Idabe9dfdc1827bf88f614b66eef1546728b15c1f
2025-02-25 17:31:32 +01:00

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