-
Notifications
You must be signed in to change notification settings - Fork 23
/
tox.ini
55 lines (47 loc) · 1.47 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
[tox]
minversion = 1.6
skipsdist = True
envlist = docs,examples,doc8,pep8,autopep8
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
[testenv:autopep8]
description = Print autopep8 suggestions.
envdir = {toxworkdir}/linters
deps = -r test-requirements.txt
commands = autopep8 --recursive --aggressive --diff --exit-code .
[testenv:doc8]
description = Style guide enforcement with doc8.
envdir = {toxworkdir}/linters
deps = -r test-requirements.txt
commands = doc8 {posargs}
[testenv:docs]
description = Build project documentation.
envdir = {toxworkdir}/sphinx
deps = -r docs/requirements.txt
allowlist_externals = rm
commands =
rm -rf docs/_build
sphinx-build -W -b html docs docs/_build
[testenv:examples]
description = Run all python scripts from examples directory - physics check.
envdir = {toxworkdir}/build
deps = -r requirements.txt
# Env variable MPLBACKEND=Agg prevents display of windows during tests
setenv = MPLBACKEND=Agg
allowlist_externals = bash
commands = bash -ex -c 'for FILE in examples/*.py; do python $FILE; done'
[testenv:pep8]
description = Style guide enforcement with flake8.
envdir = {toxworkdir}/linters
deps = -r test-requirements.txt
commands = flake8 {posargs}
[doc8]
# D000 - invalid rst format
# D002 - no trailing whitespace
# D004 - no carriage returns (use unix newlines)
ignore = D000,D002,D004
ignore-path = .git,.tox,.venv,docs/_build,*.egg-info
[flake8]
exclude = .git,.tox,.venv,build,docs,*.egg-info