spec
mlte/spec/spec.py
A collection of properties and their measurements.
Spec
Bases: Artifact
The Spec class integrates QACategory, measurements, and the results of measurement evaluation and validation.
Source code in mlte/spec/spec.py
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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
qa_categories = qa_categories
instance-attribute
The collection of QACategory that compose the Spec.
__eq__(other)
Compare Spec instances for equality.
Source code in mlte/spec/spec.py
167 168 169 170 171 172 |
|
__init__(identifier=DEFAULT_SPEC_ID, qa_categories={})
Initialize a Spec instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qa_categories
|
Dict[QACategory, Dict[str, Condition]]
|
The collection of QACategory that compose the spec, with their conditions keyed by measurement id. |
{}
|
Source code in mlte/spec/spec.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
from_model(model)
classmethod
Convert a negotiation card model to its corresponding artifact.
Source code in mlte/spec/spec.py
77 78 79 80 81 82 83 84 85 |
|
get_default_id()
staticmethod
Overriden
Source code in mlte/spec/spec.py
117 118 119 120 |
|
get_qa_category(qa_category_id)
Returns a particular QACategory with the given id.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qa_category_id
|
str
|
The QACategory itself, or its identifier |
required |
Returns:
Type | Description |
---|---|
QACategory
|
The QACategory object. |
Source code in mlte/spec/spec.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
has_qa_category(qa_category)
Determine if the spec contains a particular QACategory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qa_category
|
Union[QACategory, str]
|
The QACategory itself, or its identifier |
required |
Returns:
Type | Description |
---|---|
bool
|
|
Source code in mlte/spec/spec.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
to_model()
Convert a negotation card artifact to its corresponding model.
Source code in mlte/spec/spec.py
65 66 67 68 69 70 71 72 73 74 75 |
|
to_qa_category_dict(qa_category_models)
classmethod
Converts a list of QACategory models, into a dict of properties and conditions.
Source code in mlte/spec/spec.py
103 104 105 106 107 108 109 110 111 112 113 114 115 |
|