[Bug]: Custom class generator does not account for fields refined from parent type #1101
Labels
category: bug
errors in the code or code behavior
priority: low
alternative solution already working and/or relevant to only specific user(s)
topic: extension
issues related to extensions or dynamic class generation
Milestone
What happened?
In PyNWB, the
TimeSeries
spec has a dataset spec with name "data", dtype "numeric", many possible shapes, and a docstring. If an extension typeExtracellularSeries
extendsTimeSeries
and has a dataset spec with name "data", dtype "float", one possible shape, and a different docstring, then when generatingExtracellularSeries.__init__
, the "data" keyword argument fromTimeSeries.__init__
is used instead of a new one being generated with the refined properties.Same for the attributes of the "data" dataset spec like "unit", "conversion", etc.
I don't remember why we even use the docstring arguments from
TimeSeries.__init__
rather than always regenerating them from the spec. It may have to do with fixed value and fixed name specs and how those are not part of added as keyword arguments to__init__
.Steps to Reproduce
Traceback
No response
Operating System
macOS
Python Executable
Conda
Python Version
3.12
Package Versions
No response
The text was updated successfully, but these errors were encountered: