As an requirement for effective #419 (closed) and for general future proofing, we should version the metainfo.
- different versions of the metainfo can be used within the same Python runtime
- NOMAD can use archives based on different metainfo versions
- the UI (metainfo and archive browser) are aware of different metainfo version
Problems to solve:
- metainfo packages have to state their version
- specific metainfo versions can be imported, e.g. through specific import mechanism
- metainfo packages of all available versions are packaged into nomad-lab Python package
nomad.archivepackage write and read versions
- search and archive API respect versions
How can this ever work:
- Each Python module is its own namespace and imported names in different modules can come from different sources (e.g. versions).
- Python has a very flexible module and import system with lots of hooks
- Unfortunately, one can only hook into the first search for a python module/package name
- We internally add versions to the module name of metainfo packages
- Python modules can be "virtual", e.g. do not have to exist as files. We can implement finders/loaders/importers that resolve (versioned) metainfo package names