Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Render function names in mermaid/dot #1583

Merged
merged 4 commits into from
Oct 17, 2024
Merged

Conversation

aborgna-q
Copy link
Collaborator

@aborgna-q aborgna-q commented Oct 15, 2024

Shows the function names when rendering a hugr.
This should come useful when working with bigger graphs like those emitted by guppy.

graph LR
    subgraph 0 ["(0) FuncDefn: #quot;test#quot;"]
        direction LR
        1["(1) Input"]
        2["(2) Output"]
        1--"0:0<br>[]+[]"-->2
    end
Loading

@aborgna-q aborgna-q requested a review from a team as a code owner October 15, 2024 14:33
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.

Project coverage is 85.79%. Comparing base (a66c4b9) to head (6204324).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
hugr-core/src/types/poly_func.rs 44.44% 5 Missing ⚠️
hugr-core/src/hugr/views/render.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1583      +/-   ##
==========================================
- Coverage   85.79%   85.79%   -0.01%     
==========================================
  Files         135      135              
  Lines       24691    24708      +17     
  Branches    21627    21644      +17     
==========================================
+ Hits        21184    21198      +14     
- Misses       2405     2408       +3     
  Partials     1102     1102              
Flag Coverage Δ
python 92.68% <ø> (ø)
rust 84.81% <68.42%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aborgna-q aborgna-q requested review from mark-koch and removed request for croyzor October 17, 2024 09:22
@aborgna-q aborgna-q added this pull request to the merge queue Oct 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 17, 2024
@aborgna-q aborgna-q added this pull request to the merge queue Oct 17, 2024
Merged via the queue into main with commit 0f6c25a Oct 17, 2024
20 of 21 checks passed
@aborgna-q aborgna-q deleted the ab/render-func-names branch October 17, 2024 14:21
@hugrbot hugrbot mentioned this pull request Oct 17, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 22, 2024
## 🤖 New release
* `hugr`: 0.13.1 -> 0.13.2 (✓ API compatible changes)
* `hugr-core`: 0.13.1 -> 0.13.2 (✓ API compatible changes)
* `hugr-model`: 0.13.1 -> 0.13.2 (✓ API compatible changes)
* `hugr-passes`: 0.13.1 -> 0.13.2 (✓ API compatible changes)
* `hugr-cli`: 0.13.1 -> 0.13.2 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

## `hugr`
<blockquote>

##
[0.13.2](hugr-v0.13.1...hugr-v0.13.2)
- 2024-10-22

### Bug Fixes

- Allocate ports on root nodes
([#1585](#1585))

### New Features

- Render function names in `mermaid`/`dot`
([#1583](#1583))
- Add filter_edge_kind to PortIterator
([#1593](#1593))
- make errors more readable with Display impls
([#1597](#1597))
- Ensure packages always have modules at the root
([#1589](#1589))
- Add `Package` definition on `hugr-core`
([#1587](#1587))
</blockquote>

## `hugr-core`
<blockquote>

##
[0.13.2](hugr-core-v0.13.1...hugr-core-v0.13.2)
- 2024-10-22

### Bug Fixes

- Allocate ports on root nodes
([#1585](#1585))

### New Features

- Add `Package` definition on `hugr-core`
([#1587](#1587))
- Render function names in `mermaid`/`dot`
([#1583](#1583))
- Add filter_edge_kind to PortIterator
([#1593](#1593))
- make errors more readable with Display impls
([#1597](#1597))
- Ensure packages always have modules at the root
([#1589](#1589))
</blockquote>

## `hugr-model`
<blockquote>

##
[0.13.2](hugr-model-v0.13.1...hugr-model-v0.13.2)
- 2024-10-22

### New Features

- make errors more readable with Display impls
([#1597](#1597))
</blockquote>

## `hugr-passes`
<blockquote>

##
[0.13.2](hugr-passes-v0.13.1...hugr-passes-v0.13.2)
- 2024-10-22

### New Features

- make errors more readable with Display impls
([#1597](#1597))
</blockquote>

## `hugr-cli`
<blockquote>

##
[0.13.2](hugr-cli-v0.13.1...hugr-cli-v0.13.2)
- 2024-10-22

### New Features

- Add `Package` definition on `hugr-core`
([#1587](#1587))
- Ensure packages always have modules at the root
([#1589](#1589))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
@hugrbot hugrbot mentioned this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants