Commit 8d9aa3b7 authored by Jungho Shin's avatar Jungho Shin
Browse files

making interface to Repository

parent a13eefc4
...@@ -6,7 +6,7 @@ from nomadcore.parser_backend import JsonParseEventsWriterBackend ...@@ -6,7 +6,7 @@ from nomadcore.parser_backend import JsonParseEventsWriterBackend
from nomadcore.parse_streamed_dicts import * from nomadcore.parse_streamed_dicts import *
import logging import logging
from nomadrepo.parsers import Output from nomadrepo.core.api import API
base_path = os.path.abspath(os.path.dirname(__file__)) base_path = os.path.abspath(os.path.dirname(__file__))
...@@ -17,10 +17,7 @@ def calculateTags(inputDict, backend, calcUri): ...@@ -17,10 +17,7 @@ def calculateTags(inputDict, backend, calcUri):
else: else:
backend.openContext(calcUri) backend.openContext(calcUri)
repoSect = backend.openSection("section_repository_info") 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 # fill out i.e. backend.addValue unsing input Dict
# "repository_checksum", # "repository_checksum",
# "repository_chemical_formula", # "repository_chemical_formula",
...@@ -34,6 +31,12 @@ def calculateTags(inputDict, backend, calcUri): ...@@ -34,6 +31,12 @@ def calculateTags(inputDict, backend, calcUri):
# "repository_system_type", # "repository_system_type",
# "repository_xc_treatment" # "repository_xc_treatment"
# add more? # add more?
#print("\n*** inputDict %s *** \n", inputDict)
work = API()
calc, error = work._parse(inputDict, "normalizerRepo")
print("\n*** calc %s *** \n", calc)
if repoSectUri: if repoSectUri:
backend.closeContext(repoSectUri) backend.closeContext(repoSectUri)
else: else:
......
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