load function of ODS obj is not respecting its setting
Closed this issue · 1 comments
kripnerl commented
l. 2118 of omas_core.py
:
def load(self, *args, **kw):
r"""
Load OMAS data
:param filename: filename.XXX where the extension is used to select load format method (eg. 'pkl','nc','h5','ds','json','ids')
set to `imas`, `s3`, `hdc`, `mongo` for save methods that do not have a filename with extension
:param consistency_check: perform consistency check once the data is loaded
:param \*args: extra arguments passed to load_omas_XXX() method
:param \**kw: extra keywords passed to load_omas_XXX() method
:return: ODS with loaded data
"""
# figure out format used
ext, args = _handle_extension(*args)
# manage consistency_check logic
if 'consistency_check' in kw:
consistency_check = kw['consistency_check']
else:
consistency_check = self.consistency_check
if self.location:
kw['consistency_check'] = False
else:
kw['consistency_check'] = consistency_check
# load the data
results = eval('load_omas_' + ext)(*args, **kw)
^^^^^^^^^^
is considering only self.consistency_check
, but not other args/kwargs of original ODS - like imas_version
.
If this is a design decision, it should be highlighted by documentation.
github-actions commented
Stale issue message