-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
104 lines (93 loc) · 2.54 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[tox]
# These are the default environments that will be run
# when ``tox`` is run without arguments.
envlist =
py{36,38,py3}
coverage
mypy
pep8
docs
reqs
skip_missing_interpreters = true
[flake8]
# Use the more relaxed max line length permitted in PEP8.
# max-line-length = 99
# Enforce the Google Python style for grouping and sorting imports:
# https://github.com/google/styleguide/blob/gh-pages/pyguide.md#313-imports-formatting
import-order-style = google
# Inform flake8-import-order plugin that `pymergevcd` should be treated as a local package name.
application-import-names = pymergevcd
[testenv]
setenv =
COVERAGE_FILE = .coverage.{envname}
usedevelop = True
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands =
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
# Use -Werror to treat warnings as errors.
{envpython} -bb -Werror -m pytest -m 'not manual' --junitxml=result.xml --cov-report xml --cov-report term --cov=pymergevcd {posargs}
[testenv:coverage]
skip_install = true
depends = py36,py38
# Set blank setenv to overwrite setenv from [testenv] (inherited).
setenv =
deps =
-r{toxinidir}/dev-requirements.txt
commands =
coverage combine
coverage html
[testenv:mypy]
skip_install = true
setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands =
mypy src
[testenv:pep8]
skip_install = true
setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands =
flake8 --max-complexity 10 src tests
pylint src tests
[testenv:docs]
skip_install = true
whitelist_externals = make
setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
changedir = {toxinidir}/docs/sphinx
commands =
{envpython} clean_docs.py
sphinx-apidoc --force --output-dir apidoc {toxinidir}/src/pymergevcd
sphinx-build -a -W . _build
sphinx-build -b latex -W . _build
make -C _build all-pdf
[testenv:reqs]
skip_install = true
whitelist_externals =
grep
test
bash
setenv =
RMTOO_CONTRIB_DIR=../../.tox/reqs/lib/python3.6/site-packages/rmtoo/contrib
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
-r{toxinidir}/docs/arch/requirements.txt
changedir = {toxinidir}/docs/
commands =
doit -f requirements/dodo.py
doit -f arch/dodo.py
bash -ec 'test "$(grep -c failed arch/artifacts/tracematrix.tex)" -eq "0"'
[gh-actions]
# pylint not ready
python =
3.6: py36,reqs,docs
3.8: py38,pep8,mypy