Commit 0533ef83 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Minor adaptations of NOMAD changes.

parent d4083cda
......@@ -20,10 +20,11 @@ import numpy as np
from datetime import datetime
from nomad.parsing.parser import FairdiParser
from nomad.datamodel.metainfo.general_experimental import section_experiment as SectionExperiment
from nomad.datamodel.metainfo.general_experimental import section_data as SectionData
from nomad.datamodel.metainfo.general_experimental_method import section_method as SectionMethod
from nomad.datamodel.metainfo.general_experimental_sample import section_sample as SectionSample
from nomad.datamodel.metainfo.general_experimental import (
section_experiment as SectionExperiment,
section_data as SectionData,
section_method as SectionMethod,
section_sample as SectionSample)
class MPESParser(FairdiParser):
......
......@@ -4,14 +4,8 @@ from nomad.metainfo.legacy import LegacyMetainfoEnvironment
import mpesparser.metainfo.mpes
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['mpesparser.metainfo.mpes'].m_package) # type: ignore
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
......@@ -7,8 +7,7 @@ from nomad.metainfo import ( # pylint: disable=unused-import
from nomad.metainfo.legacy import LegacyDefinition
from nomad.datamodel.metainfo import general_experimental
from nomad.datamodel.metainfo import general_experimental_method
from nomad.datamodel.metainfo import general_experimental_sample
m_package = Package(
name='mpes_nomadmetainfo_json',
......@@ -37,7 +36,7 @@ class section_experiment(general_experimental.section_experiment):
a_legacy=LegacyDefinition(name='number_of_location_names'))
class section_method(general_experimental_method.section_method):
class section_method(general_experimental.section_method):
m_def = Section(validate=False, extends_base_section=True, a_legacy=LegacyDefinition(name='section_method'))
......@@ -521,7 +520,7 @@ class section_method(general_experimental_method.section_method):
a_legacy=LegacyDefinition(name='detector_energy_resolution'))
class section_sample(general_experimental_sample.section_sample):
class section_sample(general_experimental.section_sample):
m_def = Section(validate=False, extends_base_section=True, a_legacy=LegacyDefinition(name='section_sample'))
......
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