Plugins simulations
Adapting the new entry points mechanism for plugins in Area C - Simulations. I am initially trying the schema nomad-simulations and a parser nomad-parser-wannier90.
For only the nomad-simulations
pip installation, it works.
I had to delete the lines related with electronic-parsers/wannier90 in the source code and in the electronicparsers repo (pipeline there is not passing tho). But when adding the pip install nomad-parser-wannier90, I am getting an error with the pydantic model:
Traceback (most recent call last):
File "/home/josepizarro/nomad/.pyenv/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/mkdocs/__main__.py", line 284, in build_command
build.build(cfg, dirty=not clean)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/mkdocs/commands/build.py", line 265, in build
config = config.plugins.on_config(config)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/mkdocs/plugins.py", line 587, in on_config
return self.run_event('config', config)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/mkdocs/plugins.py", line 566, in run_event
result = method(item, **kwargs)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/mkdocs_macros/plugin.py", line 585, in on_config
self._load_modules()
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/mkdocs_macros/plugin.py", line 454, in _load_modules
module = import_local_module(self.project_dir, local_module_name)
File "/home/josepizarro/nomad/.pyenv/lib/python3.9/site-packages/mkdocs_macros/util.py", line 137, in import_local_module
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/josepizarro/nomad/nomad/mkdocs.py", line 37, in <module>
from nomad.app.v1.models import query_documentation, owner_documentation
File "/home/josepizarro/nomad/nomad/app/v1/models/__init__.py", line 19, in <module>
from .models import (
File "/home/josepizarro/nomad/nomad/app/v1/models/models.py", line 40, in <module>
from nomad import datamodel, metainfo # pylint: disable=unused-import
File "/home/josepizarro/nomad/nomad/datamodel/__init__.py", line 23, in <module>
from .datamodel import (
File "/home/josepizarro/nomad/nomad/datamodel/datamodel.py", line 29, in <module>
from nomad.datamodel.metainfo.common import FastAccess
File "/home/josepizarro/nomad/nomad/datamodel/metainfo/__init__.py", line 50, in <module>
config.load_plugins()
File "/home/josepizarro/nomad/nomad/config/models/config.py", line 1159, in load_plugins
_plugins['entry_points']['options'][key] = plugin_class.parse_obj(
File "pydantic/main.py", line 526, in pydantic.main.BaseModel.parse_obj
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 2 validation errors for Parser
name
field required (type=value_error.missing)
parser_class_name
field required (type=value_error.missing)
@himanel1 @ahmil we can use this to test if this setup works.
Edited by Jose Pizarro