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.
| PARAMETER | DESCRIPTION |
|---|---|
source
|
The earlier Model class.
TYPE:
|
target
|
The later Model class.
TYPE:
|
stringency
|
One of
TYPE:
|
| RETURNS | 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.
| PARAMETER | DESCRIPTION |
|---|---|
lens
|
A panproto lens object. Treat as opaque; pass to didactic.api.register_migration wrapped in a didactic.api.Lens subclass that delegates to it.
TYPE:
|
score
|
Alignment quality in
TYPE:
|
proposals
|
Auxiliary coercion proposals emitted under
TYPE:
|