CQCL / hugr

Hierarchical Unified Graph Representation
https://crates.io/crates/hugr
Apache License 2.0
15 stars 4 forks source link

fix: `extract_hugr` not removing root node ports #1239

Closed aborgna-q closed 1 week ago

aborgna-q commented 1 week ago

Closes #1238

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.00%. Comparing base (80b8a85) to head (4635273).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1239 +/- ## ========================================== + Coverage 86.97% 87.00% +0.02% ========================================== Files 100 100 Lines 18998 19000 +2 Branches 17013 17015 +2 ========================================== + Hits 16524 16530 +6 + Misses 1696 1693 -3 + Partials 778 777 -1 ``` | [Flag](https://app.codecov.io/gh/CQCL/hugr/pull/1239/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | Coverage Δ | | |---|---|---| | [rust](https://app.codecov.io/gh/CQCL/hugr/pull/1239/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | `86.47% <100.00%> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

doug-q commented 1 week ago

I think this is technically a breaking change? Or would anyone who was using extract_hugr on a node with ports have found themselves with an invalid Hugr?

aborgna-q commented 1 week ago

Yep, this doesn't change the behaviour except for the actual validation calls, that would have failed.