Commit aee4be74 authored by Markus Scheidgen's avatar Markus Scheidgen

Added packages to metainfo objects.

parent 58d45d16
......@@ -15,13 +15,13 @@ import nomad_meta_info
class InfoKindEl(object):
"""Info kind (tipically from a file, without shas but with locally unique names)"""
__slots__ = ["name","description","kindStr","units","superNames","dtypeStr", "repeats", "shape", "extra_args"]
__slots__ = ["name","description","kindStr","units","superNames","dtypeStr", "repeats", "shape", "extra_args", "package"]
IGNORE_EXTRA_ARGS = 1
ADD_EXTRA_ARGS = 2
RAISE_IF_EXTRA_ARGS = 3
def __init__(self, name, description, kindStr = "type_document_content", units = None, superNames = None,
dtypeStr = None, shape = None, extraArgsHandling = ADD_EXTRA_ARGS, repeats = None, **extra_args):
dtypeStr = None, shape = None, package = None, extraArgsHandling = ADD_EXTRA_ARGS, repeats = None, **extra_args):
if superNames is None:
superNames = []
self.name = name
......@@ -30,6 +30,7 @@ class InfoKindEl(object):
self.superNames = superNames
self.units = units
self.dtypeStr = dtypeStr
self.package = package
if dtypeStr in ["None", "null"]:
self.dtypeStr = None
self.shape = shape
......@@ -529,6 +530,7 @@ class InfoKindEnv(object):
gidToCheck[ii["name"]] = toCheck
del val['superGids']
val['extraArgsHandling'] = extraArgsHandling
val['package'] = self.name
ikEl = InfoKindEl(**val)
if not oldVal is None and ikEl != oldVal:
overwritten.append((oldVal, ikEl))
......
Markdown is supported
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