quantcore_circuits.assembly.last_good¶
Last good routes: what a route looked like the last time it built.
A qcc build --keep-going (the KLayout plugin’s builds) leaves a failed route out of the layout. So that nothing
downstream loses it, every successful keep-going build stores each route’s polyline and length in
<name>.last_good_routes.json next to the layout; a route that builds again replaces its entry, a route that fails
keeps the old one. The sidecar’s failed_routes carries the entry of each failed route, the plugin draws it, and the
LOM (lom_from_design) uses it, with a warning, instead of the missing route.
Strict builds (scripts, notebooks, tests, fab export) never read or write this file.
Attributes¶
Functions¶
|
Where the plugin's builds of a design file keep it: |
|
What is stored of a built route: its sharp polyline, length and CPW, enough to stand in for it. |
|
|
|
The build plan the LOM reads. A design file whose plugin builds stored last good routes beside the layout |
|
|
|
A |
|
|
|
Write the store after a keep-going build: the routes of the design, as they built now, or as they last built |
Module Contents¶
- quantcore_circuits.assembly.last_good.design_store_path(design_path: str | pathlib.Path) pathlib.Path¶
Where the plugin’s builds of a design file keep it:
<design dir>/build/<design stem>....
- quantcore_circuits.assembly.last_good.entry_of(rp: quantcore_circuits.route.router.RoutePlan, route) dict¶
What is stored of a built route: its sharp polyline, length and CPW, enough to stand in for it.
- quantcore_circuits.assembly.last_good.load(path: str | pathlib.Path | None) dict¶
{route: entry}of a store file; empty when there is none (or it cannot be read).
- quantcore_circuits.assembly.last_good.plan_for_lom(design, source=None)¶
The build plan the LOM reads. A design file whose plugin builds stored last good routes beside the layout (
build/<stem>.last_good_routes.json) is planned withkeep_going: a failed route is replaced by its last good one with a warning (resolve()). Everything else is the strict plan, which raises on a failed route.
- quantcore_circuits.assembly.last_good.resolve(plan)¶
planwith each failed route replaced by its last good route (a copy;planitself is not changed), for the LOM and other readers of route lengths. Each replacement is named inplan.warningsand in a Python warning. A failed route without a last good one raisesRoutingErrornaming it. Plans without failures come back as they are.
- quantcore_circuits.assembly.last_good.standin(name: str, entry: dict, defaults: dict | None = None) quantcore_circuits.route.router.RoutePlan¶
A
RoutePlanrebuilt from a stored entry (not drawn: used where a length / width is needed).
- quantcore_circuits.assembly.last_good.store_path(layout_path: str | pathlib.Path) pathlib.Path¶
<layout stem>.last_good_routes.jsonbeside the layout.
- quantcore_circuits.assembly.last_good.update(path: str | pathlib.Path, plan, previous: dict | None = None) dict¶
Write the store after a keep-going build: the routes of the design, as they built now, or as they last built (
previous, or what the file holds) when they failed now. Returns the new{route: entry}.
- quantcore_circuits.assembly.last_good.SCHEMA = 'qcc-last-good-routes/0.1'¶