Commit 14255323 authored by Mikkel Strange's avatar Mikkel Strange
Browse files

estimating program version from the fileversion number

parent 3bd2e794
......@@ -9,7 +9,7 @@ from nomadcore.local_meta_info import loadJsonFile, InfoKindEl
from nomadcore.parser_backend import JsonParseEventsWriterBackend
from tar import Reader
from libxc_names import get_libxc_xc_names
from versions import get_prog_version
def open_section(p, name):
......@@ -43,7 +43,7 @@ def parse(filename):
with o(p, 'section_run'):
p.addValue('program_name', 'GPAW')
p.addValue('program_version', '1.0.0')
p.addValue('program_version', get_prog_version(r.version))
if r.Mode == 'pw':
p.addValue('program_basis_set_type', 'plane waves')
with o(p, 'section_basis_set_cell_dependent'):
f2p_version = {6: '1.1.0',
5: '0.11.0',
3: '0.10.0'}
def get_prog_version(version):
if isinstance(version, int):
return f2p_version[version]
return '0.9.0'
if __name__ == '__main__':
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