Commit 3d225e68 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Adapted to nomad-fair.

parent aec0fda5
# Copyright 2018-2018 Berk Onat, Fawzi Mohamed
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......@@ -14,6 +14,7 @@
import logging
import os
import metainfo
PARSERNAME = "NAMD"
PROGRAMNAME = "namd"
......@@ -22,13 +23,13 @@ PARSERMETANAME = PARSERNAME.lower()
PARSERTAG = 'x_' + PARSERMETANAME
PARSER_INFO_DEFAULT = {
'name' : PARSERMETANAME+'-parser',
'name' : PARSERMETANAME+'-parser',
'version': PARSERVERSION
}
META_INFO_PATH = os.path.normpath(os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"../../../../nomad-meta-info/meta_info/nomad_meta_info/"+PARSERMETANAME+".nomadmetainfo.json"))
os.path.dirname(os.path.abspath(metainfo.__file__)),
PARSERMETANAME+".nomadmetainfo.json"))
LOGGER = logging.getLogger("nomad."+PROGRAMNAME+"Parser")
......
......@@ -34,6 +34,7 @@ import re
import sys
import datetime
import io
from nomadcore.simple_parser import mainFunction
############################################################
# This is the parser for the main file of NAMD.
......@@ -1269,6 +1270,7 @@ class NamdParserInterface():
backend = self.backend_factory("namd.nomadmetainfo.json")
parserInfo = {'name': 'namd-parser', 'version': '1.0'}
context = NAMDParser()
context.coverageIgnore = re.compile(r"^(?:" + r"|".join(context.coverageIgnoreList) + r")$")
with patch.object(sys, 'argv', ['<exe>', '--uri', 'nmd://uri', mainfile]):
mainFunction(
mainFileDescription=context.mainFileDescription(),
......
Markdown is supported
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