FAIRmat-NFDI / nexus_definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
5 stars 8 forks source link

Fix that attributes are found as fields #222

Closed domna closed 1 month ago

domna commented 1 month ago

Fix that attributes are found as fields if they have there are fields with the same name.

sanbrock commented 1 month ago

Line 327 is still makes a preferred assignment to fields rather than to attributes. The code here should also check for type of the concept.

domna commented 1 month ago

Line 327 is still makes a preferred assignment to fields rather than to attributes. The code here should also check for type of the concept.

I think it's fine because line 351 already avoids calling get_own_nxdl_child_base_types if nexus_type does not match: https://github.com/FAIRmat-NFDI/nexus_definitions/blob/4991e2f103dbd359910e0b2e66fba89e2a041e7d/dev_tools/utils/nxdl_utils.py#L351-L355

sanbrock commented 1 month ago

Indeed, but only if it was provided by the caller