From 77cad28c95b17622e1602e6a0c33c01895c3b226 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Wed, 10 Jul 2024 16:23:11 -0400 Subject: [PATCH 1/2] Update nwbextractors.py use latest tooling for streaming data --- src/spikeinterface/extractors/nwbextractors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spikeinterface/extractors/nwbextractors.py b/src/spikeinterface/extractors/nwbextractors.py index 7164afeac6..0141f13fc2 100644 --- a/src/spikeinterface/extractors/nwbextractors.py +++ b/src/spikeinterface/extractors/nwbextractors.py @@ -498,11 +498,11 @@ class NwbRecordingExtractor(BaseRecording, _BaseNWBExtractor): >>> >>> # get s3 path >>> dandiset_id, filepath = "101116", "sub-001/sub-001_ecephys.nwb" - >>> with DandiAPIClient("https://api-staging.dandiarchive.org/api") as client: + >>> with DandiAPIClient() as client: >>> asset = client.get_dandiset(dandiset_id, "draft").get_asset_by_path(filepath) >>> s3_url = asset.get_content_url(follow_redirects=1, strip_query=True) >>> - >>> rec = NwbRecordingExtractor(s3_url, stream_mode="fsspec", stream_cache_path="cache") + >>> rec = NwbRecordingExtractor(s3_url, stream_mode="remfile") """ installation_mesg = "To use the Nwb extractors, install pynwb: \n\n pip install pynwb\n\n" From b6c8046ea6d296a1e583e2fbb45f738ef7d54af2 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 15 Jul 2024 14:55:29 +0200 Subject: [PATCH 2/2] Use a non-draft dataset in NWB streaming docstring --- src/spikeinterface/extractors/nwbextractors.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spikeinterface/extractors/nwbextractors.py b/src/spikeinterface/extractors/nwbextractors.py index 0141f13fc2..d797e64910 100644 --- a/src/spikeinterface/extractors/nwbextractors.py +++ b/src/spikeinterface/extractors/nwbextractors.py @@ -497,9 +497,10 @@ class NwbRecordingExtractor(BaseRecording, _BaseNWBExtractor): >>> from dandi.dandiapi import DandiAPIClient >>> >>> # get s3 path - >>> dandiset_id, filepath = "101116", "sub-001/sub-001_ecephys.nwb" + >>> dandiset_id = "001054" + >>> filepath = "sub-Dory/sub-Dory_ses-2020-09-14-004_ecephys.nwb" >>> with DandiAPIClient() as client: - >>> asset = client.get_dandiset(dandiset_id, "draft").get_asset_by_path(filepath) + >>> asset = client.get_dandiset(dandiset_id).get_asset_by_path(filepath) >>> s3_url = asset.get_content_url(follow_redirects=1, strip_query=True) >>> >>> rec = NwbRecordingExtractor(s3_url, stream_mode="remfile")