Skip to content

Commit a9ed838

Browse files
committed
Merge branch 'curation-pydantic' of github.com:alejoe91/spikeinterface into curation-pydantic
2 parents 317f87c + d7633bf commit a9ed838

6 files changed

Lines changed: 20 additions & 11 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

pyproject.toml

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

7776
streaming_extractors = [
78-
"ONE-api>=2.7.0,<3.0.0", # alf sorter and streaming IBL
79-
"ibllib>=2.36.0,<3.0.0", # streaming IBL
77+
"ibllib", # streaming IBL
8078
# Following dependencies are for streaming with nwb files
8179
"pynwb>=2.6.0",
8280
"fsspec",
@@ -141,7 +139,7 @@ test_extractors = [
141139
]
142140

143141
test_preprocessing = [
144-
# "ibllib>=2.36.0", # for IBL
142+
"ibllib", # for IBL
145143
"torch",
146144
]
147145

@@ -155,7 +153,7 @@ test = [
155153
"huggingface_hub",
156154

157155
# preprocessing
158-
"ibllib>=2.36.0", # for IBL
156+
"ibllib", # for IBL
159157

160158
# streaming templates
161159
"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/zarrextractors.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def super_zarr_open(folder_path: str | Path, mode: str = "r", storage_options: d
6363
storage_options_to_test = (storage_options,)
6464

6565
root = None
66+
exception = None
6667
if is_path_remote(str(folder_path)):
6768
for open_func in open_funcs:
6869
if root is not None:
@@ -72,6 +73,7 @@ def super_zarr_open(folder_path: str | Path, mode: str = "r", storage_options: d
7273
root = open_func(str(folder_path), mode=mode, storage_options=storage_options)
7374
break
7475
except Exception as e:
76+
exception = e
7577
pass
7678
else:
7779
if not Path(folder_path).is_dir():
@@ -81,9 +83,12 @@ def super_zarr_open(folder_path: str | Path, mode: str = "r", storage_options: d
8183
root = open_func(str(folder_path), mode=mode, storage_options=storage_options)
8284
break
8385
except Exception as e:
86+
exception = e
8487
pass
8588
if root is None:
86-
raise ValueError(f"Cannot open {folder_path} in mode {mode} with storage_options {storage_options}")
89+
raise ValueError(
90+
f"Cannot open {folder_path} in mode {mode} with storage_options {storage_options}.\nException: {exception}"
91+
)
8792
return root
8893

8994

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)