-
Notifications
You must be signed in to change notification settings - Fork 55
/
tox.ini
104 lines (94 loc) · 1.97 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
[base]
name = neurom
testdeps =
pytest>3.0
[tox]
envlist =
lint
docs
coverage
tutorial
check-packaging
py{39,310,311,312,313}
[testenv]
deps =
{[base]testdeps}
pytest-cov
coverage[toml]>=6.3
extras = plotly
commands = python -m pytest \
--cov={[base]name} \
--cov-report term-missing \
--cov-fail-under=100 \
--cov-report=xml \
--no-cov-on-fail \
{posargs}
[testenv:lint]
deps =
isort
black
pycodestyle
pydocstyle
astroid
pylint
commands =
isort --check-only --diff {[base]name}
black --check .
pycodestyle --exclude=tests neurom
pydocstyle --match-dir='(?!test).*' {toxinidir}/neurom
pylint --rcfile=pylintrc --extension-pkg-whitelist=numpy --ignore=tests neurom
[testenv:format]
skip_install = true
deps =
isort
black
commands =
isort {[base]name}
black .
[testenv:docs]
extras = docs
commands =
# remove autosummary output and cleanup
rm -rf {toxinidir}/doc/source/_neurom_build {toxinidir}/doc/build/*
sphinx-build -b doctest \
{toxinidir}/doc/source \
{toxinidir}/doc/build/doctest \
-d {toxinidir}/doc/build/doctrees \
-W
sphinx-build -b html \
{toxinidir}/doc/source \
{toxinidir}/doc/build/html \
-d {toxinidir}/doc/build/doctrees \
-W
allowlist_externals =
rm
[testenv:tutorial]
changedir = {toxinidir}/tutorial
extras = plotly
deps =
{[base]testdeps}
nbmake
ipywidgets
commands =
pytest --nbmake .
[testenv:check-packaging]
skip_install = true
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[pycodestyle]
max-line-length=100
# E203,W503 needed for black
ignore = E203,W503
[pydocstyle]
convention = google
[gh-actions]
python =
3.9: py39, lint
3.10: py310, tutorial
3.11: py311, check-packaging
3.12: py312, docs
3.13: py313