Migration synthesis¶
didactic.api.synthesise_migration ¶
synthesise_migration(
source: type[Model],
target: type[Model],
*,
stringency: str | None = None,
) -> SynthesisResult
Auto-generate a candidate migration lens from source to target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
type[Model]
|
The earlier Model class. |
required |
target
|
type[Model]
|
The later Model class. |
required |
stringency
|
str | None
|
One of |
None
|
Returns:
| Type | Description |
|---|---|
SynthesisResult
|
The generated lens, its quality score, and any coercion
proposals (only at |
Notes
The synthesiser's output is a candidate, not a guaranteed correct migration. Always review before registering. For high-stakes migrations, prefer authoring the lens by hand and using the synthesiser only as a starting point.
didactic.api.SynthesisResult
dataclass
¶
The output of synthesise_migration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lens
|
object
|
A panproto lens object. Treat as opaque; pass to didactic.api.register_migration wrapped in a didactic.api.Lens subclass that delegates to it. |
required |
score
|
float
|
Alignment quality in |
required |
proposals
|
tuple[JsonObject, ...]
|
Auxiliary coercion proposals emitted under
|
required |