I think there is a small bug in add_extra_structures
If the structure is already loaded and then extended the extension doesn't properly show up.
See below, where test_field is missing from the output of the second imas_structure call.
This means that e.g. a ODS().load() call will fail because the structure caches for limiter.unit will not contain test_filed.
This PR adds omas.omas_utils._ods_structure_cache = {} to the other resets in add_extra_structures to fix this behaviour.
Thanks for the instant reply @orso82 😊
Any chance we can get a new PyPi release soon? There have been a couple of things merged that we are looking forward too.
I think there is a small bug in
add_extra_structures
If the structure is already loaded and then extended the extension doesn't properly show up. See below, where
test_field
is missing from the output of the secondimas_structure
call.This means that e.g. a
ODS().load()
call will fail because the structure caches forlimiter.unit
will not containtest_filed
.This PR adds
omas.omas_utils._ods_structure_cache = {}
to the other resets inadd_extra_structures
to fix this behaviour.I've also added a test for this.