model_condition
mlte/validation/model_condition.py
Model implementation for the Validator and Condition.
ConditionModel
Bases: BaseModel
A description of a condition for a QACategory.
Source code in mlte/validation/model_condition.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
arguments = []
class-attribute
instance-attribute
The arguments used when validating the condition.
name
instance-attribute
A decriptive name for the condition, usually the method name used to call it.
validator
instance-attribute
A serialized version of the validator to execute when validating this condition.
value_class
instance-attribute
A string indicating the full module and class name of the Value used to generate this condition, if any.
args_to_json_str()
Serialize the model arguments field into a string.
Returns:
Type | Description |
---|---|
str
|
The JSON str representation of the model |
Source code in mlte/validation/model_condition.py
56 57 58 59 60 61 62 63 64 65 66 |
|
ValidatorModel
Bases: BaseModel
A description of a validator for a test.
Source code in mlte/validation/model_condition.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
bool_exp
instance-attribute
A text-encoded, dilled-serialized version of the function to execute when checking the bool condition.
bool_exp_str
instance-attribute
A string representation of the code for the bool expression to check for.
creator_args = []
class-attribute
instance-attribute
The arguments of the function used to create this validator, if any.
creator_class = None
class-attribute
instance-attribute
The name of the class used to create this validator, if any.
creator_function = None
class-attribute
instance-attribute
The name of the function used to create this validator, if any.
failure
instance-attribute
A string to be used when recording that the validation was not succesful.
info
instance-attribute
A string to be used when recording that the validation was not checked against a condition, just recorded information.
success
instance-attribute
A string to be used when recording that the validation was succesful.