-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shows the function names when rendering a hugr. This should come useful when working with bigger graphs like those emitted by guppy. ```mermaid graph LR subgraph 0 ["(0) FuncDefn: #quot;test#quot;"] direction LR 1["(1) Input"] 2["(2) Output"] 1--"0:0<br>[]+[]"-->2 end ```
- Loading branch information
Showing
8 changed files
with
91 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
15 changes: 15 additions & 0 deletions
15
hugr-core/src/hugr/views/snapshots/hugr_core__hugr__views__tests__dot_func.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
source: hugr-core/src/hugr/views/tests.rs | ||
expression: h.dot_string() | ||
--- | ||
digraph { | ||
0 [shape=plain label=<<table border="1"><tr><td align="text" border="0" colspan="1">(0) FuncDefn: "test"</td></tr><tr><td port="out0" align="text" colspan="1" cellpadding="1" >0: [[]+[]] -> [[]][[]+[]]</td></tr></table>>] | ||
1 [shape=plain label=<<table border="1"><tr><td align="text" border="0" colspan="1">(1) Input</td></tr><tr><td port="out0" align="text" colspan="1" cellpadding="1" >0: []+[]</td></tr></table>>] | ||
1:out0 -> 2:in0 [style=""] | ||
2 [shape=plain label=<<table border="1"><tr><td port="in0" align="text" colspan="1" cellpadding="1" >0: []+[]</td></tr><tr><td align="text" border="0" colspan="1">(2) Output</td></tr></table>>] | ||
hier0 [shape=plain label="0"] | ||
hier0 -> hier1 [style = "dashed"] | ||
hier0 -> hier2 [style = "dashed"] | ||
hier1 [shape=plain label="1"] | ||
hier2 [shape=plain label="2"] | ||
} |
11 changes: 11 additions & 0 deletions
11
hugr-core/src/hugr/views/snapshots/hugr_core__hugr__views__tests__dot_module.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: hugr-core/src/hugr/views/tests.rs | ||
expression: h.dot_string() | ||
--- | ||
digraph { | ||
0 [shape=plain label=<<table border="1"><tr><td align="text" border="0" colspan="1">(0) Module</td></tr></table>>] | ||
1 [shape=plain label=<<table border="1"><tr><td align="text" border="0" colspan="1">(1) FuncDecl: "test"</td></tr><tr><td port="out0" align="text" colspan="1" cellpadding="1" >0: [[]+[]] -> [[]][[]+[]]</td></tr></table>>] | ||
hier0 [shape=plain label="0"] | ||
hier0 -> hier1 [style = "dashed"] | ||
hier1 [shape=plain label="1"] | ||
} |
11 changes: 11 additions & 0 deletions
11
hugr-core/src/hugr/views/snapshots/hugr_core__hugr__views__tests__mmd_func.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: hugr-core/src/hugr/views/tests.rs | ||
expression: h.mermaid_string() | ||
--- | ||
graph LR | ||
subgraph 0 ["(0) FuncDefn: #quot;test#quot;"] | ||
direction LR | ||
1["(1) Input"] | ||
2["(2) Output"] | ||
1--"0:0<br>[]+[]"-->2 | ||
end |
9 changes: 9 additions & 0 deletions
9
hugr-core/src/hugr/views/snapshots/hugr_core__hugr__views__tests__mmd_module.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
source: hugr-core/src/hugr/views/tests.rs | ||
expression: h.mermaid_string() | ||
--- | ||
graph LR | ||
subgraph 0 ["(0) Module"] | ||
direction LR | ||
1["(1) FuncDecl: #quot;test#quot;"] | ||
end |
This file contains 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
This file contains 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