-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Currently, if any schema specifies a scalar*, unnamed* and typed* dataset or group, these are mapped to a types.untyped.Anon class. In contrast, non-scalar, unnamed and typed datasets or groups are mapped to a types.untyped.Set class.
*scalar: the quantity key of a specification has a value of 1, ? or zero_or_one
*unnamed: the name key in the specification does not have a value
*typed: the neurodata_type_inc or neurodata_type_def key of a spec has a value
Schema example:
matnwb/+tests/test-schema/anonSchema/anon.anonymous.yaml
Lines 1 to 9 in 2c1b738
| groups: | |
| - neurodata_type_def: AnonGroup | |
| neurodata_type_inc: NWBDataInterface | |
| groups: | |
| - neurodata_type_inc: AnonGroup | |
| quantity: '?' | |
| datasets: | |
| - neurodata_type_def: AnonData | |
| quantity: '?' |
It is unclear why these cases are handled by two different classes. Possibly to enforce the quantity specifier, as there is currently no proper validation of quantities in MatNWB (See for example Issue 697 and Issue 679).
Proposal: implement proper quantity validation and then unify types.untyped.Anon and types.untyped.Set.
This was recently brought to light through the work on PR 732 where support for unnamed (scalar & non-scalar) Links is added