Python defined sections cannot be used as quantity types in yaml schemas
Me and @hnaesstroem realized that the "section" quantity in the following schema is working in python but not in yaml, if I drag and drop a yaml schema, I'm getting the reference broken.
If the "section" quantity has as type, e.g., Entity (or whatever else defined in the yaml file) the reference is working
class Link(ArchiveSection):
name = Quantity(type=str,
a_eln=dict(component='StringEditQuantity'))
section = Quantity(type=ArchiveSection,
a_eln=dict(component='ReferenceEditQuantity'))
definitions:
name: Workflow Base sections
sections:
Entity:
m_annotations:
eln:
base_sections:
- nomad.datamodel.data.EntryData
quantities:
comment:
type: str
m_annotations:
eln:
component: StringEditQuantity
Link:
base_section: nomad.datamodel.data.ArchiveSection
quantities:
name:
type: str
m_annotations:
eln:
component: StringEditQuantity
section:
type: nomad.datamodel.data.ArchiveSection # '#/Entity' this would work
m_annotations:
eln:
component: ReferenceEditQuantity