Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
parser-big-dft
Commits
54931005
Commit
54931005
authored
Dec 07, 2016
by
Lauri Himanen
Browse files
Added the JSON header and footer.
parent
faa46a62
Pipeline
#8869
passed with stage
in 5 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
parser/parser-big-dft/bigdftparser/versions/bigdft18/mainparser.py
View file @
54931005
...
...
@@ -38,6 +38,7 @@ class BigDFTMainParser(AbstractBaseParser):
directly into memory.
"""
self
.
prepare
()
self
.
print_json_header
()
with
open
(
self
.
file_path
,
"r"
)
as
fin
:
try
:
# Open default sections and output default information
...
...
@@ -70,6 +71,8 @@ class BigDFTMainParser(AbstractBaseParser):
except
YAMLError
:
raise
Exception
(
"There was a syntax error in the BigDFT YAML output file."
)
self
.
print_json_footer
()
def
generate_root_nodes
(
self
,
loader
):
# Ignore the first two events
loader
.
get_event
()
# StreamStarEvetn
...
...
Write
Preview
Markdown
is supported
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