Skip to content
Snippets Groups Projects
Commit 8368b2f3 authored by Felix Dietrich's avatar Felix Dietrich
Browse files

Add tabulartree metaschema for tabular CSV data with user defined metaschema.

parent 1d161924
No related branches found
No related tags found
1 merge request!524Draft: Catalysis oasis - merge to v1.0.0
Pipeline #123843 passed with warnings
......@@ -39,6 +39,7 @@ from .metainfo.simulation.run import Run # noqa
from .metainfo.workflow import Workflow # noqa
from .metainfo.measurements import Measurement # noqa
from .metainfo.catalysis import ExperimentCatalysis # noqa
from nomad.datamodel.metainfo.tabulartree import TabularTree # noqa
class AuthLevel(int, Enum):
......@@ -696,5 +697,7 @@ class EntryArchive(metainfo.MSection):
experiment_catalysis = metainfo.SubSection(sub_section=ExperimentCatalysis, repeats=False)
tabular_tree = metainfo.SubSection(sub_section=TabularTree, repeats=False)
m_package.__init_metainfo__()
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD. See https://nomad-lab.eu for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import typing
from nomad.metainfo import (
MSection, Package, Quantity, SubSection)
m_package = Package(name='tabulartree')
class TabularTreeNodeInfo(MSection):
value = Quantity(type=typing.Any)
description = Quantity(type=str)
unit = Quantity(type=str)
class TabularTreeLevel3(MSection):
name = Quantity(type=str, default='<node name?>')
info = SubSection(sub_section=TabularTreeNodeInfo)
class TabularTreeLevel2(MSection):
name = Quantity(type=str, default='<node name?>')
info = SubSection(sub_section=TabularTreeNodeInfo)
nodes = SubSection(sub_section=TabularTreeLevel3, repeats=True)
class TabularTreeLevel1(MSection):
name = Quantity(type=str, default='<node name?>')
info = SubSection(sub_section=TabularTreeNodeInfo)
nodes = SubSection(sub_section=TabularTreeLevel2, repeats=True)
class TabularTree(MSection):
name = Quantity(type=str, default='<node name?>')
info = SubSection(sub_section=TabularTreeNodeInfo)
nodes = SubSection(sub_section=TabularTreeLevel1, repeats=True)
m_package.__init_metainfo__()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment