-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
111 lines (96 loc) · 2.08 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
[base]
name = currentscape
testdeps =
mock
pytest
[tox]
envlist =
check-version
check-packaging
lint
py3
docs
coverage
minversion = 4
# ignore basepython for envs that already specify a version
ignore_basepython_conflict = true
[gh-actions]
python =
3.8: py3
3.9: py3
3.10: py3
3.11: py3
3.12: check-packaging, lint, docs, coverage
[testenv]
basepython=python
deps =
{[base]testdeps}
hypothesis
neuron
extras = example
allowlist_externals = make
setenv =
PIP_INDEX_URL = https://pypi.python.org/simple
commands =
make remove_test_output
pytest tests
[testenv:check-version]
skip_install = true
deps = bbp-nse-ci
commands = do_release.py -p . check-version
[testenv:check-packaging]
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:lint]
deps =
pycodestyle
pydocstyle
pylint
black
commands =
pycodestyle {[base]name}
pydocstyle {[base]name}
pylint {[base]name}
black --diff --check {[base]name}
black --diff --check tests
[testenv:format]
deps = black
commands =
black {[base]name}
black tests
[testenv:coverage]
extras = example
usedevelop=True
allowlist_externals = make
deps =
{[base]testdeps}
pytest-cov
hypothesis
neuron
commands =
make remove_test_output
pytest --cov-report term-missing --cov-report xml --cov={[base]name} tests/
[testenv:docs]
changedir = doc
extras = docs
# set warnings as errors using the -W sphinx option
commands = make html SPHINXOPTS=-W
allowlist_externals = make
# E731: do not assign a lambda expression, use a def
# W503: line break after binary operator
# W504: line break before binary operator
# E203: whitespace before ':'
# E402: module level import not at top of file
[pycodestyle]
ignore = E731,W503,W504,E203,E402, D211
max-line-length = 100
[pydocstyle]
# ignore the following
# - D413: no blank line afer last section
# - D211: No blank lines allowed before class docstring (clashes with black formatting)
add-ignore = D413, D211
convention = google