Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backend Configuration IIIb] Configure DynamicTable router for set_data_io #700

Merged
merged 17 commits into from
Jan 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/neuroconv/tools/nwb_helpers/_configure_backend.py
  • Loading branch information
CodyCBakerPhD authored Jan 4, 2024
commit 1d9c2348606dc57e877d0e317afb6ec280ebb057
13 changes: 7 additions & 6 deletions src/neuroconv/tools/nwb_helpers/_configure_backend.py
Original file line number Diff line number Diff line change
@@ -22,14 +22,15 @@ def configure_backend(

# TODO: update buffer shape in iterator, if present

if isinstance(nwbfile_objects[object_id], Data):
nwbfile_objects[object_id].set_data_io(data_io_class=data_io_class, data_io_kwargs=data_io_kwargs)
elif isinstance(nwbfile_objects[object_id], TimeSeries):
nwbfile_objects[object_id].set_data_io(
nwbfile_object = nwbfile_objects[object_id]
if isinstance(nwbfile_object, Data):
nwbfile_object.set_data_io(data_io_class=data_io_class, data_io_kwargs=data_io_kwargs)
elif isinstance(nwbfile_object, TimeSeries):
nwbfile_object.set_data_io(
dataset_name=dataset_name, data_io_class=data_io_class, **data_io_kwargs
)
else: # Strictly speaking, it would be odd if a backend_configuration led to this, but might as well be safe
raise NotImplementedError(
f"Unsupported object type {type(nwbfile_objects[object_id])} for backend "
f"configuration of {nwbfile_objects[object_id].name}!"
f"Unsupported object type {type(nwbfile_object)} for backend "
f"configuration of {nwbfile_object.name}!"
)
Loading