Commit 0865874d authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Adapted to nomad-fair.

parent 6656ac16
...@@ -19,12 +19,13 @@ from nomadcore.caching_backend import CachingLevel ...@@ -19,12 +19,13 @@ from nomadcore.caching_backend import CachingLevel
from nomadcore.simple_parser import mainFunction from nomadcore.simple_parser import mainFunction
from nomadcore.simple_parser import SimpleMatcher as SM from nomadcore.simple_parser import SimpleMatcher as SM
from .AMBERDictionary import get_unitDict, get_nameListDict, get_fileListDict, set_excludeList, set_includeList from .AMBERDictionary import get_unitDict, get_nameListDict, get_fileListDict, set_excludeList, set_includeList
from .MetaInfoStorage import COMMON_META_INFO_PATH, PUBLIC_META_INFO_PATH from MetaInfoStorage import COMMON_META_INFO_PATH, PUBLIC_META_INFO_PATH
from . import MetaInfoStorage as mStore import MetaInfoStorage as mStore
import logging import logging
import json import json
import os import os
import re import re
import metainfo
PARSERNAME = "AMBER" PARSERNAME = "AMBER"
PROGRAMNAME = "amber" PROGRAMNAME = "amber"
...@@ -38,8 +39,8 @@ PARSER_INFO_DEFAULT = { ...@@ -38,8 +39,8 @@ PARSER_INFO_DEFAULT = {
} }
META_INFO_PATH = os.path.normpath(os.path.join( META_INFO_PATH = os.path.normpath(os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.path.dirname(os.path.abspath(metainfo.__file__)),
"../../../../nomad-meta-info/meta_info/nomad_meta_info/amber.nomadmetainfo.json")) "amber.nomadmetainfo.json"))
LOGGER = logging.getLogger("nomad.AMBERParser") LOGGER = logging.getLogger("nomad.AMBERParser")
......
...@@ -1063,6 +1063,7 @@ class AMBERParserInterface(): ...@@ -1063,6 +1063,7 @@ class AMBERParserInterface():
backend = self.backend_factory("amber.nomadmetainfo.json") backend = self.backend_factory("amber.nomadmetainfo.json")
parserInfo = {'name': 'amber-parser', 'version': '1.0'} parserInfo = {'name': 'amber-parser', 'version': '1.0'}
context = AMBERParser() context = AMBERParser()
context.coverageIgnore = re.compile(r"^(?:" + r"|".join(context.coverageIgnoreList) + r")$")
with patch.object(sys, 'argv', ['<exe>', '--uri', 'nmd://uri', mainfile]): with patch.object(sys, 'argv', ['<exe>', '--uri', 'nmd://uri', mainfile]):
mainFunction( mainFunction(
mainFileDescription=context.mainFileDescription(), mainFileDescription=context.mainFileDescription(),
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment