Skip to content

Commit 468e564

Browse files
authored
Merge branch 'main' into main
2 parents c4fece4 + a95dc57 commit 468e564

7 files changed

Lines changed: 27 additions & 13 deletions

File tree

.github/scripts/determine_testing_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
elif changed_file.name == "nwbextractors.py":
4949
extractors_changed = True # There are NWB tests that are not streaming
5050
stream_extractors_changed = True
51-
elif changed_file.name == "iblextractors.py":
51+
elif changed_file.name == "iblextractors.py" or changed_file.name == "test_iblextractors.py":
5252
stream_extractors_changed = True
5353
elif "core" in changed_file.parts:
5454
core_changed = True

doc/api.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ Non-NEO-based
143143
.. autofunction:: read_mcsh5
144144
.. autofunction:: read_mda_recording
145145
.. autofunction:: read_mda_sorting
146-
.. autofunction:: read_nwb
146+
.. autofunction:: read_nwb_sorting
147+
.. autofunction:: read_nwb_recording
148+
.. autofunction:: read_nwb_timeseries
147149
.. autofunction:: read_phy
148150
.. autofunction:: read_shybrid_recording
149151
.. autofunction:: read_shybrid_sorting

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,13 @@ extractors = [
6767
"sonpy;python_version<'3.10'",
6868
"lxml", # lxml for neuroscope
6969
"scipy",
70-
"ONE-api>=2.7.0,<3.0.0", # alf sorter and streaming IBL
71-
"ibllib>=2.36.0,<3.0.0", # streaming IBL
70+
"ibllib", # streaming IBL
7271
"pymatreader>=0.0.32", # For cell explorer matlab files
7372
"zugbruecke>=0.2; sys_platform!='win32'", # For plexon2
7473
]
7574

7675
streaming_extractors = [
77-
"ONE-api>=2.7.0,<3.0.0", # alf sorter and streaming IBL
78-
"ibllib>=2.36.0,<3.0.0", # streaming IBL
76+
"ibllib", # streaming IBL
7977
# Following dependencies are for streaming with nwb files
8078
"pynwb>=2.6.0",
8179
"fsspec",
@@ -140,7 +138,7 @@ test_extractors = [
140138
]
141139

142140
test_preprocessing = [
143-
# "ibllib>=2.36.0", # for IBL
141+
"ibllib", # for IBL
144142
"torch",
145143
]
146144

@@ -154,7 +152,7 @@ test = [
154152
"huggingface_hub",
155153

156154
# preprocessing
157-
"ibllib>=2.36.0", # for IBL
155+
"ibllib", # for IBL
158156

159157
# streaming templates
160158
"s3fs",

src/spikeinterface/core/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class BaseExtractor:
4747
# these properties are skipped by default in copy_metadata
4848
_skip_properties = []
4949

50+
# kwargs which can be precomputed before being used by the extractor
51+
_precomputable_kwarg_names = []
52+
5053
installation_mesg = ""
5154
installed = True
5255

src/spikeinterface/core/numpyextractors.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,20 @@ def from_times_and_labels(times_list, labels_list, sampling_frequency, unit_ids=
367367

368368
@staticmethod
369369
def from_times_labels(times_list, labels_list, sampling_frequency, unit_ids=None) -> "NumpySorting":
370+
warning_msg = (
371+
"`from_times_labels` is deprecated and will be removed in 0.104.0. Note this function requires"
372+
"samples rather than times so should not be used for clarity purposes. For those working in samples please"
373+
"use `from_samples_and_labels` instead. For those working in time units (seconds) please use "
374+
"`from_times_and_labels` instead."
375+
)
376+
370377
warnings.warn(
371-
"from_times_labels is deprecated and will be removed in 0.104.0, use from_sample_and_labels instead",
378+
warning_msg,
372379
DeprecationWarning,
373380
stacklevel=2,
374381
)
375-
return NumpySorting.from_times_and_labels(times_list, labels_list, sampling_frequency, unit_ids)
382+
# despite the naming of the original function this required samples
383+
return NumpySorting.from_samples_and_labels(times_list, labels_list, sampling_frequency, unit_ids)
376384

377385
@staticmethod
378386
def from_unit_dict(units_dict_list, sampling_frequency) -> "NumpySorting":

src/spikeinterface/extractors/tests/test_iblextractors.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from re import escape
23
from unittest import TestCase
34

@@ -10,9 +11,11 @@
1011
EID = "e2b845a1-e313-4a08-bc61-a5f662ed295e"
1112
PID = "80f6ffdd-f692-450f-ab19-cd6d45bfd73e"
1213

14+
if sys.version_info < (3, 10):
15+
pytest.skip("IBL support requires Python 3.10 or higher", allow_module_level=True)
16+
1317

1418
@pytest.mark.streaming_extractors
15-
@pytest.mark.xfail(reason="We need to fix ibllib/one-api dependency")
1619
class TestDefaultIblRecordingExtractorApBand(TestCase):
1720
@classmethod
1821
def setUpClass(cls):
@@ -107,7 +110,6 @@ def test_unscaled_trace_dtype(self):
107110

108111

109112
@pytest.mark.streaming_extractors
110-
@pytest.mark.xfail(reason="We need to fix ibllib/one-api dependency")
111113
class TestIblStreamingRecordingExtractorApBandWithLoadSyncChannel(TestCase):
112114
@classmethod
113115
def setUpClass(cls):
@@ -182,7 +184,6 @@ def test_unscaled_trace_dtype(self):
182184

183185

184186
@pytest.mark.streaming_extractors
185-
@pytest.mark.xfail(reason="We need to fix ibllib/one-api dependency")
186187
class TestIblSortingExtractor(TestCase):
187188
def test_ibl_sorting_extractor(self):
188189
"""

src/spikeinterface/preprocessing/whiten.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class WhitenRecording(BasePreprocessor):
5757
The whitened recording extractor
5858
"""
5959

60+
_precomputable_kwarg_names = ["W", "M"]
61+
6062
def __init__(
6163
self,
6264
recording,

0 commit comments

Comments
 (0)