Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
normalizer-repo-tags
Commits
8d9aa3b7
Commit
8d9aa3b7
authored
Sep 08, 2017
by
Jungho Shin
Browse files
making interface to Repository
parent
a13eefc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
normalizer/normalizer-repo-tags/calculate_repo_tags.py
View file @
8d9aa3b7
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment