Draft: Schematic graph export - #296
Draft
gpeairs wants to merge 3 commits into
Draft
Conversation
Add `save_schematic(dir, ::SchematicGraph)` and `save_schematic(dir, ::Schematic)`, writing a read-only YAML bundle (topology.yml, parameters.yml, and floorplan.yml for planned schematics) for consumption by external tooling. The new SchematicGraphYAMLExt extension is triggered by YAML.jl and reuses the ParameterSetYAMLExt serialization dialect; fingerprint and timestamp helpers live in SchematicDrivenLayout so the extension does not depend on parent strong dependencies. All bundle files share an identity block with the design name, a SHA-256 source fingerprint over the topology and parameters documents, the generating package version, and a UTC timestamp.
Cover topology export (recursive composite subgraphs, additional hooks from bare-Hook fuse! and attach!, vertex/edge properties, skipped edges, route endpoint hooks, duplicate component instances), parameters.yml round trip and bundle namespace, floorplan transformations/hooks/bounds, resolved routes, nested_nodes paths, fingerprint determinism, stable IDs after rem_node!, and topology-only export for a plan-failing graph.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
gpeairs
marked this pull request as draft
August 26, 2026 15:51
Member
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a draft for YAML export of graph topology, complementing
ParameterSetexport, which I'm opening for visibility/discussion. This version is scoped for read-only consumption by external tooling. Graph generation from YAML is out of scope (maybe could be convenient for part of authoring, but actual designs will have arbitrary Julia code in graph construction, requiring a full Julia project and manifest for reproducibility anyway).The design produces a three-file bundle alongside any DL design project:
Implementation is a new
SchematicGraphYAMLExtpackage extension paired withsave_parameter_setfromParameterSetYAMLExt.Example
topology.yml:There is no geometry or parameter information here. The one potential exception is if a node has
additional_hooks, they need to be present here, with their type and geometry. This arguably could be a graph-native format but right now it's YAML for consistency with ParameterSet.Example
floorplan.yml:This is flat while
topology.ymlis nested on the assumption that most floorplan consumers are interested in a global view of the design.Also adds a "bundle" entry to each of the three files:
If we ever go through a major redesign, it's worth considering different models of reproducibility/authoring, e.g. with component parameterized geometry as data along with as many manual-code finishing touches as possible (e.g. autofill). The
additional_hooksin the SchematicGraph are also a bit impure if we really want to separate connectivity and placement. But I think we value the flexibility too much.