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

fix: NonConvex error on SiblingSubgraph::from_nodes with multiports #1295

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

aborgna-q
Copy link
Collaborator

@aborgna-q aborgna-q commented Jul 11, 2024

Fixes #1294

@aborgna-q aborgna-q requested a review from doug-q July 11, 2024 14:24
@aborgna-q aborgna-q requested a review from a team as a code owner July 11, 2024 14:24
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

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

Project coverage is 87.18%. Comparing base (a70ca87) to head (4f1f21a).

Files Patch % Lines
hugr-core/src/hugr/views/sibling_subgraph.rs 81.25% 0 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1295      +/-   ##
==========================================
- Coverage   87.19%   87.18%   -0.02%     
==========================================
  Files         107      107              
  Lines       19513    19538      +25     
  Branches    17251    17276      +25     
==========================================
+ Hits        17015    17034      +19     
  Misses       1719     1719              
- Partials      779      785       +6     
Flag Coverage Δ
rust 86.62% <81.25%> (-0.02%) ⬇️

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.

Copy link
Collaborator

@doug-q doug-q left a comment

Choose a reason for hiding this comment

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

💥

@aborgna-q aborgna-q added this pull request to the merge queue Jul 11, 2024
let func_id = {
let mut dfg = mod_builder.define_declaration(&func)?;
let [b0] = dfg.input_wires_arr();
let [b1] = dfg.add_dataflow_op(NotOp, [b0])?.outputs_arr();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think one should never use Result in tests, always unwrap. The error is better when it fails is my usual reason, but now I have another. The error path gets "partial coverage"!

Merged via the queue into main with commit 115a7d2 Jul 11, 2024
20 of 21 checks passed
@aborgna-q aborgna-q deleted the ab/convex-multiport-subgraph branch July 11, 2024 14:40
This was referenced Jul 11, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 16, 2024
## 🤖 New release
* `hugr`: 0.7.0 -> 0.8.0
* `hugr-core`: 0.4.0 -> 0.5.0
* `hugr-passes`: 0.4.0 -> 0.5.0
* `hugr-cli`: 0.1.3 -> 0.1.4

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

## `hugr`
<blockquote>

## 0.8.0 (2024-07-16)

### Bug Fixes

- [**breaking**] Force_order failing on Const nodes, add arg to rank.
([#1300](#1300))
- NonConvex error on SiblingSubgraph::from_nodes with multiports
([#1295](#1295))
- [**breaking**] Ops require their own extension
([#1226](#1226))

### Documentation

- Attempt to correct force_order docs
([#1299](#1299))

### Features

- Make `DataflowOpTrait` public
([#1283](#1283))
- Make op members consistently public
([#1274](#1274))

### Refactor

- [**breaking**] Rename builder helpers: ft1->endo_ft, ft2->inout_ft
([#1297](#1297))
</blockquote>

## `hugr-core`
<blockquote>

## 0.5.0 (2024-07-16)

### Bug Fixes

- NonConvex error on SiblingSubgraph::from_nodes with multiports
([#1295](#1295))
- [**breaking**] Ops require their own extension
([#1226](#1226))

### Features

- Make `DataflowOpTrait` public
([#1283](#1283))
- Make op members consistently public
([#1274](#1274))

### Refactor

- [**breaking**] Rename builder helpers: ft1->endo_ft, ft2->inout_ft
([#1297](#1297))
</blockquote>

## `hugr-passes`
<blockquote>

## 0.5.0 (2024-07-16)

### Bug Fixes

- [**breaking**] Ops require their own extension
([#1226](#1226))
- [**breaking**] Force_order failing on Const nodes, add arg to rank.
([#1300](#1300))

### Documentation

- Attempt to correct force_order docs
([#1299](#1299))

### Refactor

- [**breaking**] Rename builder helpers: ft1->endo_ft, ft2->inout_ft
([#1297](#1297))
</blockquote>

## `hugr-cli`
<blockquote>

## 0.1.3 (2024-07-10)

### Styling

- Change "serialise" etc to "serialize" etc.
([#1251](#1251))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
github-merge-queue bot pushed a commit to CQCL/tket2 that referenced this pull request Jul 19, 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.

NotConvex error on SiblingSubgraph with multiports
2 participants