artifact
Artifact implementation for negotiation card.
NegotiationCard
Bases: Artifact
The negotiation card contains information produced at MLTE negotiation points.
Source code in mlte/negotiation/artifact.py
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 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 | |
data = data
instance-attribute
A collection of descriptors for relevant datasets.
level = ArtifactLevel.MODEL
instance-attribute
Indicate that this type of artifact will exist at the model level.
model = model
instance-attribute
A descriptor for the model.
quality_scenarios = quality_scenarios
instance-attribute
A list of quality attribute scenarios.
system = system
instance-attribute
A descriptor for the system into which the model is integrated.
type = ArtifactType.NEGOTIATION_CARD
class-attribute
instance-attribute
Class attribute indicating type.
from_model(model)
classmethod
Convert a negotiation card model to its corresponding artifact.
Source code in mlte/negotiation/artifact.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
load(identifier=None)
classmethod
Load a NegotiationCard from the configured global session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
Optional[str]
|
The identifier for the artifact. If None, the default id is used. |
None
|
Source code in mlte/negotiation/artifact.py
94 95 96 97 98 99 100 101 102 | |
pre_save_hook(context, store)
Override Artifact.pre_save_hook(). Ensures that QAS that done have ids are assigned them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
Context
|
The context in which to save the artifact |
required |
store
|
ArtifactStore
|
The store in which to save the artifact |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
On broken invariant |
Source code in mlte/negotiation/artifact.py
105 106 107 108 109 110 111 112 113 | |
print_quality_scenarios()
Prints the scenarios in a user-friendly way.
Source code in mlte/negotiation/artifact.py
125 126 127 128 | |
to_model()
Convert a negotation card artifact to its corresponding model.
Source code in mlte/negotiation/artifact.py
62 63 64 65 66 67 68 69 70 71 72 | |