clone

a browser-first diagram editor with live svg previews, local drafts and encrypted, accountless sharing

main
diagramzip / renderers / python / wireviz-translator / README.md
README.md 2.1K rendered
1# WireViz translation Worker23This unit vendors the pristine `yuzutech/WireViz` v0.3.3 release tag. The tag4uses commit `837d5425e72aa002bbe9cc60604dfeffab86d29c`. Its runtime version remains50.3.2. The unit stops after the upstream parser and model produce GraphViz DOT.6It sends the DOT through the `GRAPHVIZ` service binding to the shared7GraphViz-Wasm Worker.89## License scope1011The vendored WireViz implementation is GPL-3.0-only. This Worker imports and12executes that implementation in the same Python program, so the deployable13WireViz unit is distributed as a GPL-3.0-only combined work. DiagramZip code14outside this unit remains under its own applicable license. The HTTP service15binding to the separately deployed GraphViz Worker does not place that Worker16inside this combined Python program.1718The complete unit source is this directory, including `src/`, `pyproject.toml`,19`uv.lock`, `pylock.toml`, `wrangler.jsonc`, and the build/deployment commands20below. The full GPL text and exact upstream revision are recorded in21`vendor-licenses/WireViz-LICENSE` and `THIRD_PARTY_NOTICES.md`.2223The Python `graphviz` package and external `dot` executable are intentionally absent. `src/graphviz.py` is the small DOT-builder interface required by WireViz.2425The edge contract supports SVG only. Filesystem/remote images, `tweak.append`, and `tweak.override` are rejected. BOM and HTML sidecars are not part of the rendering contract.2627Run the local and Pyodide packaging checks from this directory:2829```sh30uv sync31uv run pytest -q32uv run pywrangler sync33uv run pywrangler deploy --dry-run34```3536For an end-to-end local test, run the `graphviz-family` Wrangler dev server and37this Worker in separate terminals. Wrangler resolves the service binding by38Worker name and must report `env.GRAPHVIZ ... local [connected]`. Structural39coverage, not pixel equality, is the migration gate.4041The request parser caps bodies at 1 MiB and sources at 512 KiB. It also limits42YAML nesting, expanded nodes, components, pins, wires, connections, and numeric43ranges. YAML anchors and merge templates remain supported within those bounds.44Recursive aliases are rejected before the upstream model runs.