Skip to content

model

mlte/spec/model.py

Model implementation for the Spec artifact.

QACategoryModel

Bases: BaseModel

A description of a quality attribute category.

Source code in mlte/spec/model.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class QACategoryModel(BaseModel):
    """A description of a quality attribute category."""

    name: str
    """A name for the QACategory."""

    description: Optional[str] = None
    """A general description of this QACategory type."""

    rationale: Optional[str] = None
    """The rationale for this QACategory being important in this situation."""

    conditions: Dict[str, ConditionModel] = {}
    """A dictionary of conditions, keyed by measurement id, to be validated for this QACategory."""

    module: str
    """The full package and module path of the QACategory class."""

conditions = {} class-attribute instance-attribute

A dictionary of conditions, keyed by measurement id, to be validated for this QACategory.

description = None class-attribute instance-attribute

A general description of this QACategory type.

module instance-attribute

The full package and module path of the QACategory class.

name instance-attribute

A name for the QACategory.

rationale = None class-attribute instance-attribute

The rationale for this QACategory being important in this situation.

SpecModel

Bases: BaseModel

The model implementation for the Spec artifact.

Source code in mlte/spec/model.py
33
34
35
36
37
38
39
40
class SpecModel(BaseModel):
    """The model implementation for the Spec artifact."""

    artifact_type: Literal[ArtifactType.SPEC] = ArtifactType.SPEC
    """Union discriminator."""

    qa_categories: List[QACategoryModel] = []
    """A list of QACategory for this spec."""

artifact_type = ArtifactType.SPEC class-attribute instance-attribute

Union discriminator.

qa_categories = [] class-attribute instance-attribute

A list of QACategory for this spec.