-
Notifications
You must be signed in to change notification settings - Fork 88
/
tox.ini
44 lines (39 loc) · 968 Bytes
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[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=gnpy --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 *.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