From 8d9aa3b7afb47bb483d1675f0a33f19e4b68d37f Mon Sep 17 00:00:00 2001 From: Jungho Shin <jungho@physik.hu-berlin.de> Date: Fri, 8 Sep 2017 03:05:20 +0200 Subject: [PATCH] making interface to Repository --- .../normalizer-repo-tags/calculate_repo_tags.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/normalizer/normalizer-repo-tags/calculate_repo_tags.py b/normalizer/normalizer-repo-tags/calculate_repo_tags.py index 8904b7a..e2d08ca 100644 --- a/normalizer/normalizer-repo-tags/calculate_repo_tags.py +++ b/normalizer/normalizer-repo-tags/calculate_repo_tags.py @@ -6,7 +6,7 @@ from nomadcore.parser_backend import JsonParseEventsWriterBackend from nomadcore.parse_streamed_dicts import * import logging -from nomadrepo.parsers import Output +from nomadrepo.core.api import API base_path = os.path.abspath(os.path.dirname(__file__)) @@ -17,10 +17,7 @@ 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", @@ -34,6 +31,12 @@ def calculateTags(inputDict, backend, calcUri): # "repository_system_type", # "repository_xc_treatment" # add more? + #print("\n*** inputDict %s *** \n", inputDict) + + work = API() + calc, error = work._parse(inputDict, "normalizerRepo") + print("\n*** calc %s *** \n", calc) + if repoSectUri: backend.closeContext(repoSectUri) else: -- GitLab