silx
silx copied to clipboard
Nexus: mygroup@default must be a name in mygroup
https://github.com/nexusformat/definitions/issues/1063
I believe we got this wrong in silx: we expect the default group to be an NXdata group, except for the default of NXroot don't we?
For example here: https://github.com/silx-kit/silx/blob/360f890a617676a92f0bed6a28b718d09e70ec03/src/silx/io/nxdata/parse.py#L973
That's in fact wrong. What we should do is recurse through the group defaults until we get the final NXdata.
As far as I have understod:
- default points to a NXentry in case of NXroot
- default can only point to an NXdata (in the underlying hierachy) in any other case
If that is not the case, the NIAC 2018 got it wrong.
I guess you propose we should check if the target group contains a default attribute in case of the target not being an NXdata but another type of group to support the step-by-step approach.
Probably we should take an example with a relative path down the hierarchy going beyond just the inmediate level. If that is already supported but NeXpy, I would not expect any trouble.
I guess you propose we should check if the target group contains a default attribute in case of the target not being an NXdata but another type of group.
Indeed. I will double check again with the NIAC before doing that though. Thanks for the input!
IMO as a reader we should follow the specification, but also be permissive. The recursive approach supports a wider range of situation, so it sounds better.
True, but currently we don't support the step-by-step interpretation of the @default
attribute which seems to be the intended interpretation as far as I understand.
Yes we missing the recursive way.