Commit 68bf2b9c authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Moved the baseclasses to nomadcore, updated files accordingly. Fixed some old documentation.

parent 4fc00e8b
This diff is collapsed.
import os
import re
import logging
from cp2kparser.generic.baseclasses import ParserInterface
from nomadcore.baseclasses import ParserInterface
from cp2kparser.versions.versionsetup import get_main_parser
logger = logging.getLogger(__name__)
......@@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
class CP2KParser(ParserInterface):
"""This class handles the initial setup before any parsing can happen. It
determines which version of CP2K was used to generate the output and then
sets up a correct implementation.
sets up a correct main parser.
After the implementation has been setup, you can parse the files with
parse().
......
"""
Setups the python-common lirary in the PYTHONPATH system variable.
Setups the python-common library in the PYTHONPATH system variable.
"""
import sys
import os
......
......@@ -2,7 +2,7 @@ import os
import logging
import cPickle as pickle
import numpy as np
from cp2kparser.generic.baseclasses import BasicParser
from nomadcore.baseclasses import BasicParser
from cp2kparser.generic.inputparsing import *
logger = logging.getLogger("nomad")
......
import re
from nomadcore.simple_parser import SimpleMatcher as SM
from nomadcore.caching_backend import CachingLevel
from cp2kparser.generic.baseclasses import MainParser
from nomadcore.baseclasses import MainHierarchicalParser
from inputparser import CP2KInputParser
import numpy as np
import logging
......@@ -9,7 +9,7 @@ logger = logging.getLogger("nomad")
#===============================================================================
class CP2KMainParser(MainParser):
class CP2KMainParser(MainHierarchicalParser):
"""The main parser class.
"""
def __init__(self, file_path, parser_context):
......
"""Returns the implementation classes based on the given version identifier.
The different version are grouped into subpackages.
"""Returns the main parser class based on the given version identifier. The
different version are grouped into subpackages.
"""
import importlib
import logging
logger = logging.getLogger(__name__)
logger = logging.getLogger("nomad")
def get_main_parser(version_id):
......
......@@ -13,7 +13,7 @@ def main():
version="0.1",
include_package_data=True,
package_data={
'': ['*.json', '*.pickle'],
'': ['*.pickle'],
},
description="NoMaD parser implementation for CP2K",
author="Lauri Himanen",
......
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