qat.experimental.system_data.materialisers.model.materialise module
Default materialiser for canonical system data.
Reconstitutes a CanonicalSystemData
from a payload produced by
build_payload().
Version integrity is verified via the structural hash embedded in the payload.
- materialise_model(source_payload)
Materialise canonical system data from a model source payload.
The model materialiser is a zero-transform materialiser: it reconstructs a
CanonicalSystemDatadirectly from a payload whose keys and values mirror the dataclass fields. UseCanonicalSystemDataBuilder.build_payload()to produce a conforming payload.- Parameters:
source_payload¶ (
dict[str,Any]) – Dict with amodelkey containing theCanonicalSystemDatafield values and a_versionstructural hash entry, as produced bybuild_payload().- Return type:
- Returns:
A validated
CanonicalSystemDataconstructed fromsource_payload.- Raises:
UnsupportedSourceVersionError – If the
_versionkey is absent or does not match the current structural hash.SourceValidationError – If
source_payloadcontains keys incompatible with theCanonicalSystemDataconstructor.