archetypal.template.umi_base.UmiBase
- class archetypal.template.umi_base.UmiBase(Name, Category='Uncategorized', Comments='', DataSource=None, allow_duplicates=False, **kwargs)[source]
Base class for template objects.
The UmiBase class handles common properties to all Template objects.
- Parameters
Name (str) – Unique, the name of the object.
Category (str) – Group objects by assigning the same category identifier. Thies can be any string.
Comments (str) – A comment displayed in the UmiTemplateLibrary.
DataSource (str) – A description of the datasource of the object. This helps identify from which data is the current object created.
allow_duplicates (bool) – If True, this object can be equal to another one if it has a different name.
**kwargs –
- property Name
Get or set the name of the object.
- property id
Get or set the id.
- property DataSource
Get or set the datasource of the object.
- property Category
Get or set the Category attribute.
- property Comments
Get or set the object comments.
- property allow_duplicates
Get or set the use of duplicates [bool].
- property predecessors
Get or set the predecessors of self.
Of which objects is self made of. If from nothing else then self, return self.
- float_mean(other, attr, weights=None)[source]
Calculates the average attribute value of two floats. Can provide weights.