forked from ComPWA/tensorwaves
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
195 lines (183 loc) · 4.1 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
[tox]
envlist =
py,
doc,
sty,
skip_install = True
skip_missing_interpreters = True
skipsdist = True
[testenv]
allowlist_externals =
pytest
commands =
pytest {posargs:src tests} \
--cov-fail-under=90 \
--cov-report=html \
--cov-report=xml \
--cov=tensorwaves
description =
Run all unit tests and doctests and compute test coverage
[testenv:bench]
allowlist_externals =
pytest
commands =
pytest {posargs:benchmarks} \
--durations=0 \
--benchmark-autosave \
-k benchmark
description =
Run benchmark tests and visualize in histogram
[testenv:deps]
changedir = src
commands =
pydeps tensorwaves \
-o ../module_structure.svg \
--exclude *._* \
--max-bacon=1 \
--noshow
deps =
pydeps
description =
Visualize module dependencies
passenv = *
[testenv:doc]
allowlist_externals =
sphinx-build
commands =
sphinx-build \
--builder dirhtml \
--fail-on-warning \
--keep-going \
--show-traceback \
docs/ docs/_build/html
description =
Build documentation and API through Sphinx
passenv = *
setenv =
FORCE_COLOR = yes
[testenv:doclive]
allowlist_externals =
sphinx-autobuild
commands =
sphinx-autobuild \
--builder dirhtml \
--open-browser \
--re-ignore .*/__pycache__/.* \
--re-ignore .*/.ipynb_checkpoints/.* \
--re-ignore docs/_build/.* \
--re-ignore docs/.*\.csv \
--re-ignore docs/.*\.gif \
--re-ignore docs/.*\.gv \
--re-ignore docs/.*\.inv \
--re-ignore docs/.*\.json \
--re-ignore docs/.*\.pickle \
--re-ignore docs/.*\.png \
--re-ignore docs/.*\.svg \
--re-ignore docs/.*\.yaml \
--re-ignore docs/.*\.yml \
--re-ignore docs/api/.* \
--re-ignore docs/usage/logs/.* \
--re-ignore docs/usage/sub_expr_f? \
--watch docs \
--watch src \
docs/ docs/_build/html
description =
Set up a server to directly preview changes to the HTML pages
passenv = *
setenv =
FORCE_COLOR = yes
[testenv:docnb]
allowlist_externals =
sphinx-build
commands =
sphinx-build \
--builder dirhtml \
--fail-on-warning \
--keep-going \
--show-traceback \
docs/ docs/_build/html
description =
Build documentation through Sphinx WITH output of Jupyter notebooks
passenv = *
setenv =
EXECUTE_NB = yes
FORCE_COLOR = yes
[testenv:docnblive]
allowlist_externals =
sphinx-autobuild
commands =
sphinx-autobuild \
--builder dirhtml \
--open-browser \
--re-ignore .*/__pycache__/.* \
--re-ignore .*/.ipynb_checkpoints/.* \
--re-ignore docs/_build/.* \
--re-ignore docs/.*\.csv \
--re-ignore docs/.*\.gif \
--re-ignore docs/.*\.gv \
--re-ignore docs/.*\.inv \
--re-ignore docs/.*\.json \
--re-ignore docs/.*\.pickle \
--re-ignore docs/.*\.png \
--re-ignore docs/.*\.svg \
--re-ignore docs/.*\.yaml \
--re-ignore docs/.*\.yml \
--re-ignore docs/api/.* \
--re-ignore docs/usage/logs/.* \
--re-ignore docs/usage/sub_expr_f? \
--watch docs \
--watch src \
docs/ docs/_build/html
description =
Set up a server to directly preview changes to the HTML pages
passenv = *
setenv =
EXECUTE_NB = yes
FORCE_COLOR = yes
[testenv:jax]
allowlist_externals =
pytest
commands =
pytest {posargs:} \
-k "benchmark or not benchmark" \
-k "not (ampform or four_momenta or numba or tensorflow or tf)" \
--benchmark-disable
description =
Run tests with JAX only
[testenv:jcache]
allowlist_externals =
jcache
changedir = docs/_build
commands =
jcache {posargs:notebook list}
description =
Inspect Jupyter cache
[testenv:linkcheck]
allowlist_externals =
sphinx-build
commands =
sphinx-build \
--builder linkcheck \
--show-traceback \
docs/ docs/_build/linkcheck
description =
Check external links in the documentation (requires internet connection)
passenv = *
setenv =
FORCE_COLOR = yes
[testenv:nb]
allowlist_externals =
pytest
commands =
pytest --nbmake {posargs:docs}
description =
Run all notebooks with pytest
[testenv:sty]
allowlist_externals =
pre-commit
commands =
pre-commit run {posargs} -a
description =
Perform all linting, formatting, and spelling checks
setenv =
SKIP = pyright