This repository has been archived by the owner on Oct 11, 2021. It is now read-only.
/
tox.ini
132 lines (122 loc) · 2.76 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[tox]
envlist =
py,
doc,
sty,
passenv = PYTHONPATH
skip_install = True
skip_missing_interpreters = True
skipsdist = True
[testenv]
description =
Run all fast unit tests
allowlist_externals =
pytest
commands =
pytest src {posargs:tests/unit}
[testenv:cov]
description =
Compute the test coverage of all unit tests
allowlist_externals =
pytest
commands =
pytest {posargs:tests/unit} \
--cov-fail-under=90 \
--cov-report=html \
--cov-report=xml \
--cov=expertsystem
[testenv:doc]
description =
Build documentation and API through Sphinx
changedir = docs
allowlist_externals =
make
commands =
make html
[testenv:doclive]
description =
Set up a server to directly preview changes to the HTML pages
allowlist_externals =
sphinx-autobuild
passenv =
EXECUTE_NB
TERM
commands =
sphinx-autobuild \
--watch docs \
--watch src \
--re-ignore .*/.ipynb_checkpoints/.* \
--re-ignore .*/__pycache__/.* \
--re-ignore docs/.*\.csv \
--re-ignore docs/.*\.gv \
--re-ignore docs/.*\.inv \
--re-ignore docs/.*\.json \
--re-ignore docs/.*\.pickle \
--re-ignore docs/.*\.yaml \
--re-ignore docs/.*\.yml \
--re-ignore docs/_build/.* \
--re-ignore docs/api/.* \
--open-browser \
docs/ docs/_build/html
[testenv:docnb]
description =
Build documentation through Sphinx WITH output of Jupyter notebooks
setenv =
EXECUTE_NB = "yes"
changedir = docs
allowlist_externals =
make
commands =
make html
[testenv:linkcheck]
description =
Check external links in the documentation (requires internet connection)
changedir = docs
allowlist_externals =
make
commands =
make ignore-warnings=1 linkcheck # for margin directive
[testenv:pydeps]
description =
Visualize module dependencies
deps =
pydeps
changedir = src
commands =
pydeps expertsystem \
-o module_structure.svg \
--exclude *._* \
--max-bacon=1 \
--noshow
passenv = HOME
[testenv:sty]
description =
Perform all linting, formatting, and spelling checks
setenv =
SKIP = mypy
allowlist_externals =
mypy
pre-commit
commands =
mypy src tests # run separately because of potential caching problems
pre-commit run {posargs} -a
[testenv:test]
description =
Run ALL tests, including the slow channel tests, and compute coverage
allowlist_externals =
pytest
commands =
pytest {posargs} \
--cov-fail-under=90 \
--cov-report=html \
--cov-report=xml \
--cov=expertsystem
[testenv:testnb]
description =
Run all notebooks with pytest
allowlist_externals =
pytest
passenv =
EXECUTE_NB
commands =
pytest {posargs:docs} --nb-test-files