feat: draw quivers with GraphViz via to_dot and a package extension#42
Open
pbelmans wants to merge 1 commit into
Open
feat: draw quivers with GraphViz via to_dot and a package extension#42pbelmans wants to merge 1 commit into
pbelmans wants to merge 1 commit into
Conversation
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.
What
Adds quiver visualization to QuiverTools. Parallel arrows and loops (a quiver's defining features) are drawn as themselves rather than collapsed to a single labelled edge.
API
to_dot(Q)returns a Graphviz DOT string. It is dependency-free and lives in the core package: onei -> jline per arrow, self-loops spread around their vertex with compass ports, and isolated vertices emitted explicitly.using GraphVizactivates a package extension that makes aQuiverdisplay as an SVG drawing inline in notebooks (Pluto, IJulia) and VS Code.draw(Q), from the REPL, renders the quiver and opens it in the system's default viewer, returning the temporary file path.Design
ext/QuiverToolsGraphVizExt.jl) mirrors the existing Oscar extension.GraphVizis a weak dependency, so a plainusing QuiverToolsnever loads a graphics binary;to_dotis always available, while the SVGshowmethod anddrawactivate only once GraphViz is loaded.Graphviz_jllis pinned to>= 2.50. Without the pin the resolver can select an older build whoselibgvcbinding is undefined, which crashesusing GraphVizwith a cryptic error.Tests and docs
to_dottestset covers arrow bookkeeping, port-spaced loops, and the no-arrow (isolated vertices) edge case; the exact output is locked by doctests.to_dotanddraware added to the Quivers manual page.