Searching for quantities in MI2
The Backend
class that is currently used to glue parsers to the new metainfo system provides a get_value(name, index)
function. This function can be used to query the value for a metainfo with the given name
in its parent section with index
.
The way it is implemented is that the backend keeps track of each opened section by using a dictionary (__open_sections
) that maps metainfo names and indices to opened sections with these values. Is there an implementation for a similar mechanism in the new metainfo?
I'm asking this because I'm running into some issues with the old tests that use the get_value
function. This causes some tests to break if values are stored to the metainfo tree directly with m_create
, which does not touch __open_sections
. I'm using m_create
directly in the normalizers as I assumed that the Backend object should no longer be used to store metainfo. For now, I will fix the issues simply by using the backend to create any new sections (with openSection
).