Commit 3054fcd4 authored by Markus Scheidgen's avatar Markus Scheidgen

Added metainfo python code.

parent c0e93624
...@@ -21,7 +21,7 @@ from datetime import datetime ...@@ -21,7 +21,7 @@ from datetime import datetime
from nomadcore.simple_parser import SimpleMatcher from nomadcore.simple_parser import SimpleMatcher
from nomadcore.baseclasses import ParserInterface, AbstractBaseParser from nomadcore.baseclasses import ParserInterface, AbstractBaseParser
from nomad.parsing import LocalBackend from nomad.parsing import Backend
class SkeletonParserInterface(ParserInterface): class SkeletonParserInterface(ParserInterface):
......
import sys
from nomad.metainfo import Environment
from nomad.metainfo.legacy import LegacyMetainfoEnvironment
import nomad.datamodel.metainfo.general
import nomad.datamodel.metainfo.general_experimental
import nomad.datamodel.metainfo.general_experimental_method
import nomad.datamodel.metainfo.general_experimental_sample
import nomad.datamodel.metainfo.general_experimental_data
m_env = LegacyMetainfoEnvironment()
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.general'].m_package) # type: ignore
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.general_experimental'].m_package) # type: ignore
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.general_experimental_method'].m_package) # type: ignore
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.general_experimental_sample'].m_package) # type: ignore
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.general_experimental_data'].m_package) # type: ignore
import numpy as np # pylint: disable=unused-import
import typing # pylint: disable=unused-import
from nomad.metainfo import ( # pylint: disable=unused-import
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
Reference
)
from nomad.metainfo.legacy import LegacyDefinition
from nomad.datamodel.metainfo import general_experimental
m_package = Package(
name='skeleton_nomadmetainfo_json',
description='None',
a_legacy=LegacyDefinition(name='skeleton.nomadmetainfo.json'))
class section_experiment(general_experimental.section_experiment):
m_def = Section(validate=False, extends_base_section=True, a_legacy=LegacyDefinition(name='section_experiment'))
experiment_location = Quantity(
type=str,
shape=[],
description='''
Contains information relating to an archive.
''',
a_legacy=LegacyDefinition(name='experiment_location'))
m_package.__init_metainfo__()
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