spec_validator
mlte/spec/spec_validator.py
Class in charge of validating a Spec.
SpecValidator
Helper class to validate a spec.
Source code in mlte/validation/spec_validator.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
spec = spec
instance-attribute
The specification to be validated.
values = {}
instance-attribute
Where values will be gathered for validation.
__init__(spec)
Initialize a SpecValidator instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spec
|
Spec
|
The specification to be validated |
required |
Source code in mlte/validation/spec_validator.py
26 27 28 29 30 31 32 33 34 35 36 37 |
|
add_value(value)
Adds a value associated to a QACategory and measurements.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Value
|
The value to add to the internal list. |
required |
Source code in mlte/validation/spec_validator.py
48 49 50 51 52 53 54 55 56 57 58 |
|
add_values(values)
Adds multiple values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
values
|
List[Value]
|
The list of values to add to the internal list. |
required |
Source code in mlte/validation/spec_validator.py
39 40 41 42 43 44 45 46 |
|
validate()
Validates the internal QACategory given its requirements and the stored values, and generates a ValidatedSpec from it.
Returns:
Type | Description |
---|---|
ValidatedSpec
|
The validated specification |
Source code in mlte/validation/spec_validator.py
60 61 62 63 64 65 66 67 |
|