propagate cache folder to each ONE
@@ -63,7 +63,7 @@ class StreamingIblExtractor(BaseRecording):
name = "stream_ibl"
@classmethod
- def get_stream_names(cls, session: str) -> List[str]:
+ def get_stream_names(cls, session: str, cache_folder: Optional[Union[Path, str]] = None) -> List[str]:
"""
Convenient retrieval of available stream names.
@@ -86,7 +86,7 @@ class StreamingIblExtractor(BaseRecording):
List of stream names as expected by the `stream_name` argument for the class initialization.
"""
assert HAVE_BRAINBOX_ONE, cls.installation_mesg
- one = ONE(base_url="https://openalyx.internationalbrainlab.org", password="international", silent=True)
+ one = ONE(base_url="https://openalyx.internationalbrainlab.org", password="international", silent=True, cache_dir=cache_folder)
dataset_contents = one.list_datasets(eid=session, collection="raw_ephys_data/*")
raw_contents = [dataset_content for dataset_content in dataset_contents if not dataset_content.endswith(".npy")]
@@ -117,9 +117,9 @@ class StreamingIblExtractor(BaseRecording):
from one.api import ONE
from neo.rawio.spikeglxrawio import read_meta_file, extract_stream_info
- one = ONE(base_url="https://openalyx.internationalbrainlab.org", password="international", silent=True)
+ one = ONE(base_url="https://openalyx.internationalbrainlab.org", password="international", silent=True, cache_dir=cache_folder)
- session_names = self.get_stream_names(session=session)
+ session_names = self.get_stream_names(session=session, cache_folder=cache_folder)
assert stream_name in session_names, (
f"The `stream_name` '{stream_name}' was not found in the available listing for session '{session}'! "
f"Please choose one of {session_names}."
