-
Notifications
You must be signed in to change notification settings - Fork 19
/
tox.ini
106 lines (92 loc) · 2.33 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
[tox]
minversion = 4.4.0
requires =
tox-ignore-env-name-mismatch ~= 0.2.0
envlist = style, lint, coverage
isolated_build = true
# CI: skip-next-line
usedevelop = true
# CI: skip-next-line
skip_missing_interpreters = true
[testenv]
description = {envname} tests
runner = ignore_env_name_mismatch
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
extras =
test
commands =
pip check
pytest --no-cov
################################################################################
## SOURCE
################################################################################
[testenv:coverage]
description = coverage tests
envdir = {toxworkdir}/py312
basepython = python3.12
setenv =
{[testenv]setenv}
commands =
pytest --cov zne
[testenv:lint]
description = lint checks
envdir = {toxworkdir}/lint
basepython = python3.12
extras =
lint
commands =
flake8 zne test docs
isort zne test docs --check-only
black zne test docs --check
pylint -rn zne
mypy -p zne
[testenv:style]
description = style formatter
envdir = {toxworkdir}/lint
basepython = python3.12
extras =
lint
commands =
autoflake -i --remove-all-unused-imports -r zne test docs
isort zne test docs
black zne test docs
################################################################################
## DOCS
################################################################################
[testenv:docs]
description = build sphinx documentation
basepython = python3
extras =
docs
skip_install = false
commands =
sphinx-build -b html -W {posargs} docs/ docs/_build/html
################################################################################
## NOTEBOOK
################################################################################
[testenv:py3{8,9,10,11,12}-notebook]
extras =
notebook
lint
commands =
nbqa flake8 docs --ignore=E203,E266,E402
nbqa isort docs --check-only
nbqa black docs --check
; nbqa pylint -rn docs
nbqa mypy docs
treon docs --threads 2
[testenv:style-notebook]
description = jupyter notebook style formatter
envdir = {toxworkdir}/notebook
basepython = python3
extras =
notebook
lint
commands =
nbqa autoflake -i --remove-all-unused-imports -r docs
nbqa isort docs
nbqa black docs