Commit a13eefc4 authored by Jungho Shin's avatar Jungho Shin

Adding some new files

parent 98d2b7aa
(1) New modlue added by Jungho
NomadRepositoryParser: Entire python module of Repository parser from 'git@gitlab.mpcdf.mpg.de:NoMaD/NomadRepositoryParser.git'. This can be considered as submodule.
(2) New file added by Jungho
convert_2to3.sh: Python 2.7 scripts from the NomadRepositoryParser module needs to conver to that of Python 3.0. Only need to excute when the related files are updated from the git repository.
(3) New file added by Jungho
requirements.txt: Requirements to import NomadRepositoryParser.
NomadRepositoryParser @ cb1fc51a
Subproject commit cb1fc51a3e9c1312b7a0de942e94e6af7225a0b4
......@@ -6,6 +6,8 @@ from nomadcore.parser_backend import JsonParseEventsWriterBackend
from nomadcore.parse_streamed_dicts import *
import logging
from nomadrepo.parsers import Output
base_path = os.path.abspath(os.path.dirname(__file__))
def calculateTags(inputDict, backend, calcUri):
......@@ -15,6 +17,10 @@ def calculateTags(inputDict, backend, calcUri):
else:
backend.openContext(calcUri)
repoSect = backend.openSection("section_repository_info")
print ("< ##### inputDict ##### ", inputDict, "##### >")
print ("***", inputDict.keys(), "***")
print ("Output:", Output)
#help(backend.addValue)
# fill out i.e. backend.addValue unsing input Dict
# "repository_checksum",
# "repository_chemical_formula",
......@@ -51,7 +57,8 @@ def main():
calcUri,
parserInfo = {'name':'RepoTagsNormalizer', 'version': '1.0'})
dictReader=ParseStreamedDicts(sys.stdin)
#dictReader=ParseStreamedDicts(sys.stdin)
dictReader=ParseStreamedDicts(open("/u/jungho/myscratch/nomad-lab-base/normalizers/repo-tags/test/examples/scalaOut1.txt", 'r'))
while True:
inputDict=dictReader.readNextDict()
......
2to3 -w NomadRepositoryParser/python/nomadrepo/core/settings.py
import sys, os, os.path
baseDir = os.path.dirname(os.path.abspath(__file__))
commonDir = os.path.normpath(os.path.join(baseDir,"../../../../python-common/common/python"))
repoParserDir = os.path.normpath(os.path.join(baseDir,"NomadRepositoryParser/python/"))
if not commonDir in sys.path:
sys.path.insert(0, commonDir)
if not repoParserDir in sys.path:
sys.path.insert(0, repoParserDir)
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