Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
225 lines (210 loc) · 6.65 KB
/
Copy pathpyproject.toml
File metadata and controls
225 lines (210 loc) · 6.65 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
[build-system]
build-backend = "hatchling.build"
requires = [ "hatch-vcs", "hatchling" ]
[project]
name = "spyglass-neuro"
description = "Neuroscience data analysis framework for reproducible research"
readme = "README.md"
keywords = [
"data analysis",
"datajoint",
"electrophysiology",
"kachery",
"neuroscience",
"nwb",
"reproducible",
"research",
"sortingview",
"spike sorting",
"spikeinterface",
]
license = { file = "LICENSE" }
authors = [
{ name = "Loren Frank", email = "loren.frank@ucsf.edu" },
{ name = "Kyu Hyun Lee", email = "kyuhyun.lee@ucsf.edu" },
{ name = "Eric Denovellis", email = "eric.denovellis@ucsf.edu" },
{ name = "Ryan Ly", email = "rly@lbl.gov" },
{ name = "Daniel Gramling", email = "daniel.gramling@ucsf.edu" },
{ name = "Chris Brozdowski", email = "chris.broz@ucsf.edu" },
{ name = "Samuel Bray", email = "sam.bray@ucsf.edu" },
]
requires-python = ">=3.10,<3.13"
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = [ "version" ]
dependencies = [
"black[jupyter]>26",
"bottleneck",
"dask",
"datajoint>=0.14.5,<2.0",
# "ghostipy", # removed from list bc M1 users need to install pyfftw first
"hdmf>=3.4.6",
"ipympl",
"matplotlib",
"ndx-franklab-novela>=0.2.4",
"ndx-optogenetics==0.3.0",
"ndx-ophys-devices",
"ndx-pose",
"non-local-detector",
"numpy",
"opencv-python",
"panel>=1.4",
"position-tools>=0.1",
"probeinterface<0.3", # Bc some probes fail space checks
"pubnub<6.4", # TODO: remove this when sortingview is updated
"pydotplus",
"pynwb>=3.1.3",
"ripple-detection",
"seaborn",
"sortingview>=0.11",
"spikeinterface>=0.99.1,<0.100",
"track-linearization>=2.3",
]
optional-dependencies.dlc = [
"deeplabcut[tf]", # removing dlc pin removes need to pin tf/numba
"ffmpeg",
]
optional-dependencies.docs = [
"hatch", # Get version from env
"jupytext", # Convert notebooks to .py
"mike", # Docs versioning
"mkdocs", # Docs core
"mkdocs-exclude", # Docs exclude files
"mkdocs-exclude-search", # Docs exclude files in search
"mkdocs-gen-files", # Docs API generator
"mkdocs-jupyter", # Docs render notebooks
"mkdocs-literate-nav", # Dynamic page list for API docs
"mkdocs-material", # Docs theme
"mkdocs-mermaid2-plugin", # Docs mermaid diagrams
"mkdocstrings[python]", # Docs API docstrings
]
optional-dependencies.kachery-cloud = [
"kachery",
"kachery-client",
"kachery-cloud>=0.4",
]
optional-dependencies.moseq-cpu = [
"jax[cpu]",
"jax-moseq",
"keypoint-moseq",
]
optional-dependencies.moseq-gpu = [
"jax[cuda12]",
"jax-moseq[cuda12]",
"keypoint-moseq",
]
optional-dependencies.test = [
"codecov", # for code coverage badge
"docker", # for tests in a container
"ghostipy",
"kachery", # database access
"kachery-client",
"kachery-cloud>=0.4",
"netcdf4", # for decoding mocking
"opencv-python-headless", # for headless testing of Qt
"pre-commit", # linting
"pytest", # unit testing
"pytest-cov", # code coverage
"pytest-xvfb", # for headless testing of Qt
]
urls."Bug Tracker" = "https://github.com/LorenFrankLab/spyglass/issues"
urls."Homepage" = "https://github.com/LorenFrankLab/spyglass"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
# this file is created/updated when the package is installed and used in
# src/spyglass/__init__.py to set `spyglass.__version__`
version-file = "src/spyglass/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [ ".git_archival.txt" ]
[tool.hatch.build.targets.wheel]
packages = [ "src/spyglass" ]
exclude = [ ]
[tool.black]
line-length = 80
[tool.ruff] # CB: Propose replacing flake8 with ruff to delete setup.cfg
line-length = 80
lint.ignore = [ "E402", "E501", "F401" ]
[tool.codespell]
skip = '.git,*.pdf,*.svg,*.ipynb,./docs/site/**,temp*'
ignore-words-list = 'nevers'
# Nevers - name in Citation
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"-s", # no capture
# "-v", # verbose output
# "--sw", # stepwise: resume with next test after failure
# "--pdb", # drop into debugger on failure
"-p no:warnings",
# "--no-teardown", # don't teardown the database after tests
# "--quiet-spy", # don't show logging from spyglass
# "--no-dlc", # don't run DLC tests
"--show-capture=no",
"--pdbcls=IPython.terminal.debugger:TerminalPdb", # use ipython debugger
"--doctest-modules", # run doctests in all modules
"--cov=spyglass",
"--cov-report=term-missing",
"--no-cov-on-fail",
]
testpaths = [ "tests" ]
log_level = "INFO"
env = [
"QT_QPA_PLATFORM = offscreen", # QT fails headless without this
"DISPLAY = :0", # QT fails headless without this
"TF_ENABLE_ONEDNN_OPTS = 0", # TF disable approx calcs
"TF_CPP_MIN_LOG_LEVEL = 2", # Disable TF warnings
]
filterwarnings = [
"ignore::ResourceWarning:.*",
"ignore::DeprecationWarning:.*",
"ignore::UserWarning:.*",
"ignore::FutureWarning:.*",
"ignore::PerformanceWarning:.*",
"ignore::MissingRequiredBuildWarning:.*",
# DLC training ends by cancelling a TF enqueue thread; expected, not a bug
"ignore::pytest.PytestUnhandledThreadExceptionWarning",
]
markers = [
# Speed-based markers (based on total time: setup + call + teardown)
"fast: Tests that complete in <1 second",
"medium: Tests that complete in 1-10 seconds",
"slow: Tests that complete in 10-60 seconds",
"very_slow: Tests that complete in >60 seconds (top bottlenecks)",
# Type-based markers
"unit: Pure unit tests with no I/O dependencies",
"integration: Integration tests involving multiple components",
"io_heavy: I/O-intensive tests (database and/or NWB files)",
"database: Tests requiring database operations",
"nwb: Tests requiring NWB file I/O",
# Special markers
"serial: Tests that must run serially (not parallel-safe)",
]
[tool.coverage.run] # NOTE: changes need to be mirrored in tests/.coveragerc
source = [ "*/src/spyglass/*" ]
omit = [ # which submodules have no tests
"*/__init__.py",
"*/_version.py",
# "*/behavior/*",
# "*/common/*",
"*/data_import/*",
"*/decoding/v0/*",
# "*/decoding/*",
"*/figurl_views/*",
# "*/lfp/*",
# "*/linearization/*",
"*/lock/*",
"*/mua/*",
# "*/position/*",
"*/ripple/*",
"*/sharing/*",
# "*/spikesorting/*",
# "*/utils/*",
"settings.py",
]