-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
…test on dynamic tables
for more information, see https://pre-commit.ci
…neuroconv into set_data_io_debug
...tools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_defaults.py
Outdated
Show resolved
Hide resolved
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Outdated
Show resolved
Hide resolved
...tools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_defaults.py
Outdated
Show resolved
Hide resolved
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Outdated
Show resolved
Hide resolved
for more information, see https://pre-commit.ci
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Outdated
Show resolved
Hide resolved
...tools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_defaults.py
Outdated
Show resolved
Hide resolved
...tools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_defaults.py
Outdated
Show resolved
Hide resolved
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Outdated
Show resolved
Hide resolved
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Alessio Buccino <[email protected]>
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Outdated
Show resolved
Hide resolved
for more information, see https://pre-commit.ci
Testing now @CodyCBakerPhD !!! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Some small comments that are questions and suggestions (all non-blocking for me).
One big point though is: are we pinning to a hdmf dev branch? What's the justication of this? is this needed with urgency?
nwbfile_objects[object_id].set_data_io(dataset_name=dataset_name, data_io_class=data_io_class, **data_io_kwargs) | ||
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens with the timestamps if they are present? Are they chunked compressed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ought to be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are they Data
or a TimeSeries
? I guess that was my question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are a dataset of the TimeSeries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(it would enter line 29 here with dataset_name="timestamps"
)
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Show resolved
Hide resolved
configure_backend(nwbfile=nwbfile, backend_configuration=backend_configuration) | ||
|
||
nwbfile_path = str(tmpdir / f"test_configure_defaults_dynamic_table.nwb.{backend}") | ||
with BACKEND_NWB_IO[backend](path=nwbfile_path, mode="w") as io: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also avoid inlining the IO class here. I think it makes the code harder to read but is marginal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add a ragged array tests. Does chunking makes sense on those cases? I guess it is very difficult to define a good chunking pattern unlesss your entries are homogeneous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would; I think we do have general configuration tests for this, just not for the configure_backend
call since in principle there's nothing at all different about those special columns that have _index
in the name (they are still just VectorData at the end of the day)
The urgency is this is a bug Alessio found when trying out the tools; unable to write something on the electrodes table Granted there are other ways to disable that detection (on our side, or the users), but it's an intended thing for this feature to support so we should fix it as quickly as we can |
All right, fine by me to merge. I am not that concerned about pinning to a specific branch or commit outside of a release. I guess that @alejoe91 will test this so he can approve it once it works. |
...tools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_defaults.py
Outdated
Show resolved
Hide resolved
...ools/test_backend_and_dataset_configuration/test_helpers/test_configure_backend_overrides.py
Outdated
Show resolved
Hide resolved
for more information, see https://pre-commit.ci
@alejoe91 If you can confirm that this allows you to proceed testing |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #700 +/- ##
==========================================
- Coverage 92.20% 92.20% -0.01%
==========================================
Files 115 115
Lines 5954 5964 +10
==========================================
+ Hits 5490 5499 +9
- Misses 464 465 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
confirmed |
@alejoe91 Sorry, 'confirm by approving' as per #700 (comment) |
Thanks for working on this @CodyCBakerPhD. And lots of love for dealing with questions as usual! |
Adds support for dynamic tables to the backend configuration tool, which previously had a bug related to hdmf-dev/hdmf#1013
@alejoe91 Do note that when testing this, you will need to use HDMF dev (
pip install git+https://github.com/hdmf-dev/hdmf.git@dev
or freshpip install -e
on this branch)