Users can place NWBGroups such as TimeSeries into other specs such as NWBDatasetSpec. The .yaml files are rendered without error and when these incorrectly defined extension types are used, HDMF throws hard-to-interpret error:
TypeError: GroupBuilder.set_dataset: incorrect type for 'builder' (got 'GroupBuilder', expected 'DatasetBuilder')
Expected Behavior
It would be really nice if create_extension_spec.py automatically checked the neurodata_types that are used in the extension and ensured that the NWBSpecs are fed the appropriate neurodata_types. Ex:
TypeError: NWBDataSpec: incorrect type for 'neurodata_type_inc' (got 'NWBGroup' expected 'NWBDataset')
Current Behavior
Users can place
NWBGroups
such asTimeSeries
into other specs such asNWBDatasetSpec
. The .yaml files are rendered without error and when these incorrectly defined extension types are used, HDMF throws hard-to-interpret error:Expected Behavior
It would be really nice if
create_extension_spec.py
automatically checked theneurodata_types
that are used in the extension and ensured that theNWBSpecs
are fed the appropriateneurodata_types
. Ex: