Nones in metainfo
I find myself writing a lot of these kind of statements in the parser:
if out["program_name"] is not None:
section_run.program_name = out["program_name"]
This prevents me from saving None
into the metainfo (this is allowed, but will cause problems when the archive is serialized as JSON+msgpack don't like these values).
Is there a valid use case for explicitly storing None
into some metainfo value? Or could we modify the metainfo so that if a None
is given as a section or quantity, nothing is by default inserted? We can of course also define some helper insertion function that will skip saving None
s, but I think it would be cleaner if this can be solved on the metainfo-package level.