Annotations as definition properties
Annotations are additional key-value pairs that can be added to any metainfo object. In practice however, there are predominantly used on definitions. Them not being definition properties seems to be confusion and creates more issues than it solves.
Topic was changed from the following, based on the discussion below:
Adding ELN Annotation in Inheriting Section Fails
Trying to add a ELN annotation to an inheriting section using m_copy()
fails (the NumberEditQuantity is not showing up for entries of type B
):
class A(EntryData):
some_property = Quantity(type=float)
class B(A):
some_property = A.some_property.m_copy()
some_property.a_eln = ELNAnnotation(component=ELNComponentEnum.NumberEditQuantity)
This does work for specifying the type of a sub section.