patch
patch
¶
Private schema-aware configuration patch primitives.
Classes:
| Name | Description |
|---|---|
PatchAssignment |
One canonical configuration assignment with source precedence. |
CompiledConfigPatch |
A configuration patch compiled for one exact Pydantic model type. |
PatchAssignment(path, value, origin, precedence)
dataclass
¶
One canonical configuration assignment with source precedence.
CompiledConfigPatch(target_model, assignments)
dataclass
¶
Bases: Generic[ModelT]
A configuration patch compiled for one exact Pydantic model type.
Methods:
| Name | Description |
|---|---|
from_mapping |
Compile a mapping with an explicit policy for traversable unknown fields. |
apply_to_full_model |
Apply to full current values while retaining sparse field presence. |
from_mapping(target_model, source, *, origin, precedence, unknown_fields)
staticmethod
¶
Compile a mapping with an explicit policy for traversable unknown fields.
Collections are atomic patch leaves. Pydantic validates their contents when the patch is applied.
Source code in src/nemo_safe_synthesizer/config/patch.py
apply_to_full_model(base)
¶
Apply to full current values while retaining sparse field presence.