-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (131 loc) · 3.17 KB
/
Copy pathpyproject.toml
File metadata and controls
150 lines (131 loc) · 3.17 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "bl1"
version = "0.1.0"
description = "In-silico cortical culture simulator inspired by DishBrain"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
dependencies = [
"jax>=0.9.1",
"jaxlib>=0.9.1",
"equinox>=0.11.0",
"optax>=0.2.0",
"matplotlib>=3.8",
"h5py>=3.10",
"pyyaml>=6.0",
"numpy>=1.24",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"hypothesis>=6.0",
"ipykernel>=6.0",
]
quality = [
"ruff>=0.4",
"mypy>=1.10",
"vulture>=2.11",
"radon>=6.0",
"bandit>=1.7",
"interrogate>=1.5",
]
jaxley = [
"jaxley>=0.3.0",
]
nwb = [
"pynwb>=2.0",
]
spikeinterface = [
"spikeinterface[full]>=0.101",
]
vizdoom = [
"vizdoom>=1.2.0",
"opencv-python>=4.8",
]
docs = [
"sphinx>=7.0",
"sphinx-rtd-theme>=2.0",
"sphinx-autodoc-typehints>=2.0",
"myst-parser>=3.0",
]
[tool.hatch.build.targets.wheel]
packages = ["src/bl1"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "B", "UP", "SIM", "C90", "I", "W"]
ignore = [
"E501", # line too long — handled by formatter
"SIM108", # ternary operator — readability preference
"UP007", # X | Y union syntax — need 3.10+ only
"B905", # zip strict — not always needed
]
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["B", "SIM"]
"notebooks/*" = ["E", "F", "B"]
[tool.mypy]
# Start permissive — tighten over time as type annotations improve
strict = false
check_untyped_defs = false
disallow_incomplete_defs = false
warn_return_any = true
warn_unused_ignores = true
ignore_missing_imports = true
exclude = ["notebooks/", "benchmarks/", "scripts/", "tests/"]
[[tool.mypy.overrides]]
module = "bl1.core.*"
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "bl1.analysis.*"
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "bl1.compat.*"
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "bl1.mea.*"
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "bl1.validation.*"
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "bl1.visualization.*"
check_untyped_defs = true
[tool.coverage.run]
branch = true
source = ["src/bl1"]
[tool.coverage.report]
fail_under = 50
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if _VIZDOOM_AVAILABLE",
"if _JAXLEY_AVAILABLE",
"if _PYNWB_AVAILABLE",
"if _PALLAS_AVAILABLE",
"raise ImportError",
"raise NotImplementedError",
]
[tool.interrogate]
ignore-init-module = true
ignore-init-method = true
ignore-magic = true
ignore-private = true
fail-under = 60
exclude = ["tests", "notebooks", "benchmarks", "scripts"]
[tool.vulture]
min_confidence = 90
exclude = ["tests/", "notebooks/", "benchmarks/", "scripts/"]
# Intentionally-unused params: public plotting kwarg, context-manager *exc,
# and a BaseHTTPRequestHandler.log_message override.
ignore_names = ["colorby", "exc", "format"]