-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
288 lines (263 loc) · 8.79 KB
/
pyproject.toml
File metadata and controls
288 lines (263 loc) · 8.79 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# -------------------------------------------------------------------------
# Project metadata
# -------------------------------------------------------------------------
[project]
authors = [
{name = "Arco Bast", email = "basta@janelia.hhmi.org"},
{name = "Bjorge Meulemeester", email = "bjorge.meulemeester@mpinb.mpg.de"},
{name = "Robert Egger"},
{name = "Rieke Fruengel"},
{name = "Maria Royo Cano" },
{name = "Omar Valerio" },
{name = "Shantanu Durgvanshi"}
]
description = "An In Silico Framework for the generation, simulation and analysis of neuron-network interactions during in vivo conditions."
name = "ISF"
requires-python = ">=3.8"
version = "0.7.2-beta"
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "win-64"]
[tool.pixi.system-requirements]
libc = "2.17"
linux = "3.10.0"
# -------------------------------------------------------------------------
# Build config
# -------------------------------------------------------------------------
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
# -------------------------------------------------------------------------
# Dependencies
# -------------------------------------------------------------------------
[tool.pixi.dependencies]
cmasher = ">=1.6.3,<2"
cython = ">=3.0.11,<4"
dash = ">=2.18.1,<3"
dask = "2.30.0.*"
fasteners = ">=0.17.3,<0.18"
flask = "==1.1.4"
ipywidgets = ">=8.1.5,<9"
jupyterlab = ">=3.5.3,<4"
jupyter-scatter = ">=0.19.1,<0.20"
kazoo = ">=2.10.0,<3"
matplotlib = ">=3.3.2,<4"
mock = ">=5.1.0,<6"
pandas = "1.1.3.*"
plotly = ">=5.24.1,<6"
pypdf2 = ">=3.0.1,<4"
pytest = ">=8.3.3,<9"
pytest-cov = ">=5.0.0,<6"
pytest-xdist = ">=3.6.1,<4"
pytest-timeout = ">=2.3.1,<3"
scikit-learn = "0.23.2.*"
seaborn = ">=0.12.2,<0.13"
scipy = "1.5.2.*"
wheel = ">=0.45.1,<0.46"
zarr = ">=2.15.0,<3"
pyarrow = ">=18.0.0,<22"
# for extracting barrel cortex data (optional)
7zip = ">=26.0,<27"
[tool.pixi.pypi-dependencies]
bluepyopt = "==1.9.126"
redis = ">=5.2.0,<6"
isf-pandas-msgpack = ">=0.4.0"
blosc = ">=1.11.1,<2"
blenderspike-py = { git = "https://github.com/ArtemKirsanov/BlenderSpike.git" }
# OS specific dependencies
[tool.pixi.target.osx]
# >=9 compiles to c++, not c, breaking our .mod files
pypi-dependencies = { neuron = ">=8.2,<9", "distributed"= ">=2.30.0" }
dependencies = { numpy = "==1.21", pytables = ">=3.7.0,<4" }
[tool.pixi.target.linux]
dependencies = { neuron = "==7.8.2", numpy = "==1.19.2", distributed = "==2.30.0", gcc = "<15", gxx = "<15" }
pypi-dependencies = { tables = ">=3.8.0,<4" }
[tool.pixi.target.win]
dependencies = { numpy = "==1.19.2", distributed = "==2.30.0"}
pypi-dependencies = { tables = ">=3.8.0,<4" }
# Docs does not inherit the default dependencies
[tool.pixi.feature.docs.dependencies]
# astroid >=4 breaks autoapi API - filenames get mangled: last three chars are repeated
astroid="<4"
black = ">=21.12b0,<22"
cloudpickle = ">=3.1.1,<4"
dask = ">=2024.8.0,<2025"
flask = ">=2"
graphviz = ">=7.0.5,<13"
ipython = ">=8.18.1,<9"
jinja2 = ">=3.1.4,<4"
matplotlib = ">=3.9.4,<4"
nbsphinx = ">=0.9.6,<0.10"
nbsphinx-link = ">=1.3.0,<2"
pandoc = ">=3.6.2,<4"
python = ">=3.9"
sphinxcontrib-bibtex = ">=2.6.3,<3"
sphinxext-opengraph = ">=0.9.1,<0.10"
sphinx-copybutton = ">=0.5.2,<0.6"
sphinx = "<7.3.5"
sphinx-inline-tabs = ">=2023.4.21,<2024"
sphinx-design = ">=0.5.0,<0.6"
sphinxcontrib-video = ">=0.2.1,<0.3"
sphinx-immaterial = ">=0.12.5,<0.13"
sphinx-autoapi = ">=3.5.0,<4"
toml = ">=0.10.2,<0.11"
[tool.pixi.feature.docs.pypi-dependencies]
catppuccin = { version = ">=2.2.0,<3", extras = ["pygments"] }
isf-pandas-msgpack = ">=0.4.0,<0.5"
sphinx-paramlinks = ">=0.6.0,<0.7"
# -------------------------------------------------------------------------
# Environment config
# -------------------------------------------------------------------------
[tool.pixi.target.unix.activation.env]
PYTHONPATH = "$(pwd):$PYTHONPATH"
ISF_HOME="$(pwd)"
[tool.pixi.target.win.activation.env]
PYTHONPATH = "%cd%;%NEURONHOME%/lib/python;%PYTHONPATH%"
PATH = "%PATH%;%NEURONHOME%/bin"
ISF_HOME="%cd%"
[tool.pixi.environments]
docs = { features = ["docs"], no-default-feature = true }
# -------------------------------------------------------------------------
# Testing config
# -------------------------------------------------------------------------
[tool.pytest.ini_options]
markers = [
"early: Mark a test as early, ensuring it is scheduled early in the test suite.",
"statistical(n_runs, max_failure_rate): Mark tests to rerun multiple times to determine statistical significance."
]
# Don't schedule new tests if the previous exceeded this time
# Previous tests are gracefully finished until the timeout.
session_timeout = 600
timeout = 180
# Dask workers per pytest worker.
DASK_N_WORKERS = 4
DASK_MEM_LIMIT = "5GB"
log_cli = true
log_level = "INFO"
# -------------------------------------------------------------------------
# Pixi tasks
# -------------------------------------------------------------------------
[tool.pixi.tasks.configure]
# (re)configure ISF for local filesystem
args = [
{arg = "force_recompile", default = "False" },
{arg = "overwrite_param_files", default = "False" }
]
cmd = [
"python",
"config/isf_configure.py",
"--force-recompile={{ force_recompile }}",
"--overwrite-param-files={{ overwrite_param_files }}",
]
[tool.pixi.tasks.install]
depends-on = ["configure"]
cmd = [
"echo",
"\nSuccessfully installed ISF.\n\n",
]
[tool.pixi.tasks.launch_dask_server]
args = [
{arg = "port", default = "8786"},
{arg = "dashboard_port", default = "8787"}
]
cmd = [
"dask-scheduler",
"--port={{ port }}",
"--dashboard-address={{ dashboard_port }}",
"--host=localhost"
]
description = "Launch a Dask scheduler"
[tool.pixi.tasks.launch_dask_workers]
args = [
{arg = "port", default = "8786"},
{arg = "dashboard_port", default = "8787"},
{arg = "num_workers", default = "4"},
{arg = "mem_limit", default = "3GB"}
]
cmd = [
"dask-worker",
"localhost:{{ port }}",
"--nthreads=1",
"--nprocs={{ num_workers }}",
"--memory-limit={{ mem_limit }}",
"--dashboard-address={{ dashboard_port }}"
]
description = "Launch Dask workers"
[tool.pixi.tasks.launch_jupyter_server]
args = [
{arg = "port", default = "11113"}
]
cmd = [
"jupyter-lab",
"--ip='*'",
"--no-browser",
"--port={{ port }}",
"--NotebookApp.allow_origin='*'"
]
description = "Launch a Jupyter Lab server"
[tool.pixi.tasks.test]
args = [
{arg = "n_pytest_workers", default = "3"},
]
depends-on = ["configure"]
cmd = [
"rm", "-rf", "tests/logs", "&&",
"mkdir", "-p", "tests/logs", "&&",
"pytest",
"-rsx", # print skipped and expected failures
"-n",
"{{ n_pytest_workers }}",
"-vv",
"--color=yes",
"--durations=15",
"tests",
]
env = {"DASK_CONFIG" = "tests/dask_config.yml"}
description = "Run test suite"
[tool.pixi.target.unix.tasks.download_bc_model]
cmd = ["./download_bc_model.sh"]
description = "Download ISF's barrel cortex model from Harvard Datverse"
cwd="installer"
[tool.pixi.target.win.tasks.download_bc_model]
cmd = ["./download_bc_model.bat"]
description = "Download ISF's barrel cortex model from Harvard Datverse"
cwd="installer"
[tool.pixi.feature.docs.tasks]
# Removing tutorials from doctrees and build is necessary to avoid slow recursion issues when building repeatedly
remove_tutorial_content = {cmd = [
"rm",
"-rf",
"docs/_build/doctrees/_build",
"docs/_build/doctrees/tutorials",
"docs/_build/html/_build",
"docs/_build/html/tutorials",
"docs/_build/doctrees/nbsphinx"
], description = "Remove tutorial content from docs"}
build_docs = {cmd = ["make", "html"], description = "Build the documentation", cwd="docs", depends-on = ["remove_tutorial_content"]}
host_docs = {cmd = ["python", "-m", "http.server", "8000"], description = "Host the documentation", cwd="docs/_build/html"}
[tool.coverage.run]
# Ignore temporary dask files during test suite.
omit = ["dask-worker-space/*", "*/dask-worker-space/*"]
[tool.basedpyright]
pythonVersion = "3.8"
# we don't typehint arguments
reportUnknownArgumentType = false
reportArgumentType = false
# we don't typehint class instance variables
reportUnknownMemberType = false
# we don't typehing variables
reportUnknownVariableType = false
# Otherwise passing args to get or set gives error: No overloads for "__getitem__" match the provided arguments (basedpyrightreportCallIssue)
reportCallIssue = false
# We don't typehing parameters or functions
reportUnknownParameterType = false
reportMissingParameterType = false
# usually caught by the linter. there are many reasons why imports may remain unused, this clutters warnings
reportUnusedImport = false
# we allow "private" imports
reportPrivateLocalImportUsage = false
# When you call a function and don't care about the return value
reportUnusedCallResult = false
reportUnannotatedClassAttribute = false
ignore = ["**/*.ipynb"]
exclude = ["**/*.ipynb", "**.pixi**"]