Skip to content

fix: Escape html-like labels in DotRenderer #2383

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

Merged
merged 3 commits into from
Jun 30, 2025
Merged

Conversation

aborgna-q
Copy link
Collaborator

@aborgna-q aborgna-q commented Jun 30, 2025

fixes #2286

Graphviz Online

It looks like there's a graphviz bug that causes nodes to be too narrow when using the monospace font. I'll open a separate issue to make a workaround for that. (#2385)

@aborgna-q aborgna-q requested a review from a team as a code owner June 30, 2025 09:52
@aborgna-q aborgna-q requested a review from mark-koch June 30, 2025 09:52
Copy link

codecov bot commented Jun 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.17%. Comparing base (aa45448) to head (e8bfa82).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2383   +/-   ##
=======================================
  Coverage   82.16%   82.17%           
=======================================
  Files         244      244           
  Lines       44759    44762    +3     
  Branches    40541    40541           
=======================================
+ Hits        36775    36781    +6     
+ Misses       5984     5981    -3     
  Partials     2000     2000           
Flag Coverage Δ
python 85.26% <100.00%> (+0.08%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@mark-koch mark-koch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

We should probably do the same for edge labels as well?

@aborgna-q aborgna-q added this pull request to the merge queue Jun 30, 2025
Merged via the queue into main with commit eaa7dfe Jun 30, 2025
30 checks passed
@aborgna-q aborgna-q deleted the ab/fix-pyrender-html branch June 30, 2025 10:33
ss2165 pushed a commit that referenced this pull request Jul 3, 2025
fixes #2286 

![Graphviz
Online](https://github.com/user-attachments/assets/6100474a-3a37-4c5f-9bfa-48f641f122aa)

It looks like there's a graphviz bug that causes nodes to be too narrow
when using the monospace font. I'll open a separate issue to make a
workaround for that.
ss2165 pushed a commit that referenced this pull request Jul 3, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.12.3](hugr-py-v0.12.2...hugr-py-v0.12.3)
(2025-07-03)


### Features

* add toposort to HUGR-py
([#2367](#2367))
([ba8988e](ba8988e))
* **core, llvm:** add array unpack operations
([#2339](#2339))
([74b25aa](74b25aa)),
closes [#1947](#1947)
* **py:** Helper methods to get the neighbours of a node
([#2370](#2370))
([1ed6440](1ed6440))


### Bug Fixes

* Escape html-like labels in DotRenderer
([#2383](#2383))
([c7a43a6](c7a43a6))
* Fixed invalid extension name in test.
([#2319](#2319))
([fbe1d9c](fbe1d9c))
* **py:** correct ConstString JSON encoding
([#2325](#2325))
([325168b](325168b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
ss2165 pushed a commit that referenced this pull request Jul 3, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.12.3](hugr-py-v0.12.2...hugr-py-v0.12.3)
(2025-07-03)


### Features

* add toposort to HUGR-py
([#2367](#2367))
([ba8988e](ba8988e))
* **core, llvm:** add array unpack operations
([#2339](#2339))
([74b25aa](74b25aa)),
closes [#1947](#1947)
* **py:** Helper methods to get the neighbours of a node
([#2370](#2370))
([1ed6440](1ed6440))


### Bug Fixes

* Escape html-like labels in DotRenderer
([#2383](#2383))
([c7a43a6](c7a43a6))
* Fixed invalid extension name in test.
([#2319](#2319))
([fbe1d9c](fbe1d9c))
* **py:** correct ConstString JSON encoding
([#2325](#2325))
([325168b](325168b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

render_dot() throws error when called from Jupyter Notebook
2 participants