diff --git a/databaseparsers/__init__.py b/databaseparsers/__init__.py index 99e718a..21dddb1 100644 --- a/databaseparsers/__init__.py +++ b/databaseparsers/__init__.py @@ -16,10 +16,19 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from pydantic import Field + from nomad.config.models.plugins import ParserEntryPoint class EntryPoint(ParserEntryPoint): + parser_class_name: str = Field( + description=""" + The fully qualified name of the Python class that implements the parser. + This class must have a function `def parse(self, mainfile, archive, logger)`. + """ + ) + def load(self): from nomad.parsing import MatchingParserInterface from . import ( @@ -32,5 +41,8 @@ def load(self): openkim_parser_entry_point = EntryPoint( name='parsers/openkim', description='NOMAD parser for OPENKIM.', - parser_class_name='workflowparsers.openkim.OpenKIMParser', -) \ No newline at end of file + python_package='databaseparsers.openkim', + mainfile_contents_re=r'openkim|OPENKIM|OpenKIM', + mainfile_mime_re='(application/json)|(text/.*)', + parser_class_name='databaseparsers.openkim.OpenKIMParser', +) diff --git a/pyproject.toml b/pyproject.toml index 9790942..17e1658 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,8 @@ license = { file = "LICENSE" } dependencies = [ "nomad-lab>=1.3.6.dev1", "nomad-schema-plugin-simulation-workflow@git+https://github.com/nomad-coe/nomad-schema-plugin-simulation-workflow.git@develop", - "nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop" + "nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop", + "pydantic>=1.10.8,<2.0.0", ] [project.urls]