hdmf
hdmf copied to clipboard
[Bug]: Cannot overwrite mapped constructor argument
What happened?
See https://github.com/NeurodataWithoutBorders/nwb-schema/issues/630
I believe there are two issues here.
-
LatentSpaceSeries/data.unitis identified as an inherited spec and so the spec is not processed when customizing the constructor docval (it is not innot_inherited_fieldsinClassGenerator.generate_class. We should instead check whether a spec is not overridden. -
TimeSeries.unitis a custom mapped constructor argument. In the spec, "unit" is an attribute on the "data" dataset. It is not straightforward for HDMF to know that, and this is not considered when generating custom classes that extend the TimeSeries spec.
Steps to Reproduce
See https://github.com/NeurodataWithoutBorders/nwb-schema/issues/630
Traceback
Operating System
macOS
Python Version
3.13
Package Versions
No response