Open lawrence-mbf opened 6 years ago
@ln-vidrio thanks for documenting this. Do you have any ideas for what would be the best approach to address this?
@bendichter Open to other suggestions but here are my thoughts: 1) All generated classes inherit dynamicprops: https://www.mathworks.com/help/matlab/ref/dynamicprops-class.html Probably the simplest method but would require logic at runtime to determine if a given MATLAB property is an attribute, dataset, group or something else and how it should be converted.
2) Generated classes "accumulate" all possible hardcoded changes and add them to the class implementation as optional parameters. This would cause problems if one schema adds hardcoded restrictions that are overridden by another. Hopefully that's not common but I'm not sure what can be assumed given custom extensions.
a pressure point comment: is there a progress to get this old issue which exhibits itself widely to be addressed?
There was one more solution proposed aside from the ones above:
Open to suggestions though!
I have no clue in matlab and only superficially in NWB structures etc. This issue seems to be the blocker for others (e.g. #238) and seems to be almost 5 years old -- sounds like a good candidate to storm to fix. @rly @oruebel - may be you have feedback on the ideas on how to solve which @lawrence-mbf presented above within the last 3 years?
Main example being the
trials
Group under NWBFile.Expected behavior should be that NWBFile checks for the class along with any additions to the class itself. At the current moment, only the class validation occurs. This isn't necessarily breaking but validation is weaker, and this allows users to break from schema because matnwb never properly checks for these context-dependent values on export.