fix: #402 display state reads and writes on separate lines in graph visualization#805
Open
adawang1210 wants to merge 1 commit into
Open
fix: #402 display state reads and writes on separate lines in graph visualization#805adawang1210 wants to merge 1 commit into
adawang1210 wants to merge 1 commit into
Conversation
…raph visualization Signed-off-by: adawang <adawang12101210@gmail.com>
Contributor
Author
|
The documentation workflow failure is a pre-existing issue in the repo — it fails due to hasura/comment-progress@v2.2.0 being blocked by the Apache enterprise action policy. This is unrelated to my changes. I confirmed the same failure appears on other recent PRs. All 577 unit tests pass locally and pre-commit checks are clean. |
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.
Summary
When visualizing a graph with
include_state=True, the action name,reads, andwriteswere all rendered on a single line (name(read_1, read_2): write_1), which rapidly widens the figure and hurts readability. Node labels now displayreads:andwrites:as separate, left-justified sections with one state field per line, following the format proposed in the issue.Rendered result for an action with reads
count, user_inputand writescount:Related issue
Closes #402
Changes made
burr/core/graph.py: added a_get_state_label()helper that builds the multi-line label (using graphviz's\lescape for left justification, so indentation stays visible);Graph.visualize()now uses it wheninclude_state=True. Actions with no reads and no writes keep a plain name label.tests/core/test_graphviz_display.py: parametrized test covering all four cases from the issue spec (no reads/writes, only reads, only writes, both).How to test
Checklist
pytest tests/ --ignore=tests/integration_tests: 577 passed, 5 skipped)git commit -s)