opensampl.metrics
Functions and objects for managing openSAMPL Metric Types
METRICS
Class for storing metric types
Source code in opensampl/metrics.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
MetricType
Bases: BaseModel
Object for defining different metric types
Source code in opensampl/metrics.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
convert_to_type(value)
Convert a given value to the expected type for the Metric
Source code in opensampl/metrics.py
18 19 20 |
|
serialize_type(value)
Return the name of value_type for serializing
Source code in opensampl/metrics.py
22 23 24 25 |
|
validate_type(value)
classmethod
Ensure the value_type field is converted to a type if provided as a string
Source code in opensampl/metrics.py
27 28 29 30 31 32 33 34 35 |
|