Skip to content

Commit

Permalink
add category
Browse files Browse the repository at this point in the history
  • Loading branch information
schumannj committed Jun 21, 2024
1 parent de53d99 commit 9de0700
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/nomad_unisyscat/schema_packages/mypackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
Measurement,
MeasurementResult,
)
from nomad.datamodel.metainfo.eln import ELNSample, ELNInstrument
from nomad.datamodel.metainfo.eln import ELNInstrument, ELNSample
from nomad.datamodel.metainfo.plot import PlotlyFigure, PlotSection
from nomad.metainfo import Datetime, Quantity, SchemaPackage, Section
from nomad.metainfo.metainfo import SubSection
from nomad.metainfo.metainfo import Category, MCategory, SubSection
from nomad.metainfo.util import MEnum

configuration = config.get_plugin_entry_point(
Expand All @@ -34,7 +34,10 @@

m_package = SchemaPackage()

class UniSysCatExampleSample(ELNSample, Schema):
class UniSysCatElnCategory(MCategory):
m_def = Category(label='UniSysCat', categories=[MCategory])

class UniSysCatSample(ELNSample, Schema):
'''
Class autogenerated from yaml schema.
'''
Expand All @@ -45,7 +48,10 @@ class UniSysCatExampleSample(ELNSample, Schema):
"description",
"datetime"
]
},)
},
label='Sample',
categories=[UniSysCatElnCategory],)

creation_time = Quantity(
type=Datetime,
a_eln={
Expand Down

0 comments on commit 9de0700

Please sign in to comment.