-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_class fails with recursive definition #1299
Comments
thanks @t-b. Unfortunately, I think this is a fundamental limitation of our current implementation of |
BTW, eliminating nested definitions in the schema should not change it in an incompatible way as it typically just means placing the type definitions at the top level and then using |
@bendichter I'm not sure I'll find time to write custom code for that. @oruebel This is not the usual nested spec problem. From the posted link above stimset_referenced_folder = NWBGroupSpec(doc='Folder',
neurodata_type_def='StimulusSetReferencedFolder',
datasets=[...],
groups=[NWBGroupSpec(doc='Nested Folder',
neurodata_type_inc='StimulusSetReferencedFolder',
quantity='*')
],
)
which means that the group spec contains itself recursively. And |
If this were a simple recursion where type A can contain one instance of type A, then I have a solution that involves some changes in HDMF. However, this is more complicated in that type A can contain multiple instances of type A, which results in the automatic generation of a This also reveals another bug where it is not possible to generate classes that are |
@rly Is it possible to write a custom class for StimulusSetReferencedFolder? |
I'm trying to add some get_class defaults for ndx-MIES as requested by @rly in nwb-extensions/staged-extensions#15.
But it fails on the recursive type definition:
https://github.com/t-b/ndx-MIES/blob/5e91258312b835aab87942d336081cec37192f86/src/spec/create_extension_spec.py#L55-L67
Versions:
pynwb 1.4.0
hdmf 2.2.0
Reproducable example:
Output:
Just to be clear, there is data released with this extension already, so I can not change the extension schema in an incompatible way.
The text was updated successfully, but these errors were encountered: