forked from BlueBrain/connectome-manipulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
117 lines (102 loc) · 2.62 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
[base]
name = connectome_manipulator
testdeps =
libsonata
mock
pytest
tables
[tox]
envlist =
check-version
check-packaging
lint
py{39,310}
minversion = 3.1.0
# ignore basepython for envs that already specify a version
ignore_basepython_conflict = true
[testenv]
setenv =
PIP_INDEX_URL = https://bbpteam.epfl.ch/repository/devpi/simple
deps = {[base]testdeps}
commands = pytest -vv tests/unit {posargs}
[testenv:functional]
commands = pytest -vv tests/functional {posargs}
[testenv:integration]
passenv =
SLURM_ACCOUNT
MODULESHOME
MODULEPATH
LOADEDMODULES
_LMFILES_
changedir =
tests/integration
allowlist_externals =
bash
echo
find
cat
commands =
echo "Testing with Dask"
connectome-manipulator -v manipulate-connectome wiring_config.json \
--output-dir {temp_dir}/integration_dask \
--profile --convert-to-sonata \
--parallel \
--splits 4 \
-a processes=1 \
-a n_workers=2 \
-a threads_per_worker=1
find {temp_dir}/integration_dask/logs -type f -name '*.task-*.log' -exec cat -n {} \;
bash -c 'h5ls -S {temp_dir}/integration_dask/edges.h5/edges/All__All__chemical/target_node_id | grep "{127}" -q'
[testenv:check-version]
skip_install = true
deps = bbp-nse-ci
commands = do_release.py -p . check-version
[testenv:check-packaging]
deps =
wheel
twine
commands =
python setup.py sdist bdist_wheel -d {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:lint]
deps =
pycodestyle
pydocstyle
pylint
black[jupyter]
commands =
pycodestyle {[base]name}
pydocstyle {[base]name}
pylint {[base]name}
black --check .
[testenv:format]
deps = black
commands = black .
[testenv:coverage]
usedevelop=True
deps =
{[base]testdeps}
pytest-cov
commands =
pytest --cov-report term-missing --cov-report xml --cov={[base]name} tests/unit
[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
# E261 at least two spaces before inline comment
# E501: long line: THIS SHOULD BE TEMPARARY
[pycodestyle]
ignore = E731,W503,W504,E261,E501,E203
max-line-length = 100
[pydocstyle]
# ignore the following
# - D300: Use """triple double quotes""" (found '''-quotes)
# - D413: no blank line afer last section
# - D415: First line should end with a period, question mark, or exclamation point
add-ignore = D300,D413,D415
convention = google