From 31c5f5f5d7e81d582f8fcafae053921c2ccebe1d Mon Sep 17 00:00:00 2001 From: bendichter Date: Mon, 27 Nov 2023 10:26:05 -0500 Subject: [PATCH] * change tutorial to use correct h5py.File object * rmv addition of RemFile as an allowed type for NWBHDF5IO --- docs/gallery/advanced_io/streaming.py | 6 +++--- src/pynwb/__init__.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/gallery/advanced_io/streaming.py b/docs/gallery/advanced_io/streaming.py index 48c6d0199..5e6ba6906 100644 --- a/docs/gallery/advanced_io/streaming.py +++ b/docs/gallery/advanced_io/streaming.py @@ -139,10 +139,10 @@ from pynwb import NWBHDF5IO import remfile -file = remfile.File(s3_url) +rem_file = remfile.File(s3_url) -with h5py.File(file, "r") as f: - with NWBHDF5IO(file=file, load_namespaces=True) as io: +with h5py.File(rem_file, "r") as h5py_file: + with NWBHDF5IO(file=h5py_file, load_namespaces=True) as io: nwbfile = io.read() print(nwbfile.acquisition["lick_times"].time_series["lick_left_times"].data[:]) diff --git a/src/pynwb/__init__.py b/src/pynwb/__init__.py index 98205fea0..53d1385aa 100644 --- a/src/pynwb/__init__.py +++ b/src/pynwb/__init__.py @@ -250,7 +250,7 @@ def can_read(path: str): {'name': 'extensions', 'type': (str, TypeMap, list), 'doc': 'a path to a namespace, a TypeMap, or a list consisting paths to namespaces and TypeMaps', 'default': None}, - {'name': 'file', 'type': [h5py.File, 'S3File', "RemFile"], 'doc': 'a pre-existing h5py.File object', + {'name': 'file', 'type': [h5py.File, 'S3File'], 'doc': 'a pre-existing h5py.File object', 'default': None}, {'name': 'comm', 'type': "Intracomm", 'doc': 'the MPI communicator to use for parallel I/O', 'default': None},