You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a group spec contains a subgroup, dataset, or link spec with a container data type, and the subspec has a name, the auto-generated class for that group spec should set "required_name": name for the corresponding subspec field in the class __fields__ variable. Currently, users can specify a different name for the subgroup/dataset/link object and add that object to the parent object without error. Writing the parent object will not write the child object, resulting in a file with missing data and possibly even an invalid file. This has caused problems with several extensions in the past, both for auto-generated classes and custom classes. For auto-generated classes, we can fix the custom class generator. For custom classes, we need to provide guidance in the documentation for writing extensions to avoid this gotcha.
What happened?
Similar to #798
When a group spec contains a subgroup, dataset, or link spec with a container data type, and the subspec has a name, the auto-generated class for that group spec should set
"required_name": name
for the corresponding subspec field in the class__fields__
variable. Currently, users can specify a different name for the subgroup/dataset/link object and add that object to the parent object without error. Writing the parent object will not write the child object, resulting in a file with missing data and possibly even an invalid file. This has caused problems with several extensions in the past, both for auto-generated classes and custom classes. For auto-generated classes, we can fix the custom class generator. For custom classes, we need to provide guidance in the documentation for writing extensions to avoid this gotcha.Steps to Reproduce
Traceback
No response
Operating System
macOS
Python Executable
Conda
Python Version
3.11
Package Versions
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: