[Feature]: Store dimension labels in DatasetBuilder for backends to write #1077
Labels
category: enhancement
improvements of code or code behavior
priority: medium
non-critical problem and/or affecting only a small set of users
Milestone
What would you like to see added to HDMF?
See hdmf-dev/hdmf-zarr#176 (comment)
On write/build, if a data type has dimension labels specified in the spec, then based on the dimensions of the data, we can infer the dimension labels for the data and store those on the DatasetBuilder. The backend (HDF5IO, ZarrIO) can then write the labels however it chooses.
On read/construct, inferring the dimension labels based on the dimensions of the data and the possible options in the spec is a bit trickier because the IO object creates the builders directly and does not have easy access to the spec for the data type. But maybe this is not needed. In the use case described above, it seems like the NWB Zarr files are being read outside of PyNWB.
Adding full support for dimension labels that link across datasets automatically is a bigger feature that requires changes to the schema language and various schema: #192. The effort could be revived but would take a lot longer than the original need.
What solution would you like?
dimension_labels
as an attribute on theDatasetBuilder
(which may be None of the labels are unknown) hdmf-dev/hdmf@5c85062/src/hdmf/build/builders.py#L321BuildManger.build
to set thedimension_labels
forDatasetBuilders
hdmf-dev/hdmf@5c85062/src/hdmf/build/manager.py#L148Do you have any interest in helping implement the feature?
Yes.
The text was updated successfully, but these errors were encountered: