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!: variadic logic ops now binary #1451

Merged
merged 1 commit into from
Aug 21, 2024
Merged

feat!: variadic logic ops now binary #1451

merged 1 commit into from
Aug 21, 2024

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Aug 21, 2024

Closes #1448

BREAKING CHANGE: And, Or, Eq are all now just binary operations. NaryLogic renamed to LogicOp and NotOp has been merged in to it.

@ss2165 ss2165 requested a review from a team as a code owner August 21, 2024 10:18
@ss2165 ss2165 requested a review from croyzor August 21, 2024 10:18
@ss2165 ss2165 changed the title feat!: remove variadic logic ops in rust feat!: variadic logic ops now binary Aug 21, 2024
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

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

Project coverage is 87.51%. Comparing base (31b77e8) to head (f7b1fcc).
Report is 2 commits behind head on main.

Files Patch % Lines
hugr-core/src/hugr/views/sibling_subgraph.rs 44.44% 0 Missing and 5 partials ⚠️
hugr-core/src/std_extensions/logic.rs 96.15% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1451      +/-   ##
==========================================
- Coverage   87.55%   87.51%   -0.04%     
==========================================
  Files         119      119              
  Lines       20781    20703      -78     
  Branches    18053    17975      -78     
==========================================
- Hits        18194    18118      -76     
+ Misses       1802     1801       -1     
+ Partials      785      784       -1     
Flag Coverage Δ
python 90.61% <ø> (ø)
rust 87.04% <88.23%> (-0.05%) ⬇️

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.

for o in LogicOp::iter() {
let ext_op = o.to_extension_op().unwrap();
assert_eq!(LogicOp::from_op(&ext_op).unwrap(), o);
assert_eq!(LogicOp::from_op(&ext_op).unwrap(), o);
Copy link
Contributor

Choose a reason for hiding this comment

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

this line is duplicated

BREAKING CHANGE: And, Or, Eq are all now just binary operations.
`NaryLogic`` renamed to `LogicOp` and `NotOp` has been merged in to it.
Copy link
Contributor

@croyzor croyzor left a comment

Choose a reason for hiding this comment

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

🔥

@ss2165 ss2165 added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit 95b3949 Aug 21, 2024
22 checks passed
@ss2165 ss2165 deleted the ss/logic branch August 21, 2024 12:28
@hugrbot hugrbot mentioned this pull request Aug 21, 2024
This was referenced Aug 30, 2024
github-merge-queue bot pushed a commit that referenced this pull request Aug 30, 2024
## 🤖 New release
* `hugr`: 0.11.0 -> 0.12.0
* `hugr-core`: 0.8.0 -> 0.9.0
* `hugr-passes`: 0.7.0 -> 0.8.0
* `hugr-cli`: 0.4.0 -> 0.5.0

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

## `hugr`
<blockquote>

## 0.12.0 (2024-08-30)

### Features

- [**breaking**] Disallow opaque ops during validation
([#1431](#1431))
- [**breaking**] Add collections to serialized standard extensions
([#1452](#1452))
- [**breaking**] Variadic logic ops now binary
([#1451](#1451))
- [**breaking**] Int operations other than widen/narrow have only one
width arg ([#1455](#1455))
- Add a `FuncTypeBase::io` method
([#1458](#1458))
- Add missing ops ([#1463](#1463))
- [**breaking**] Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to
prelude ([#1475](#1475))
- `Option` / `Result` helpers
([#1481](#1481))
- [**breaking**] Add more list operations
([#1474](#1474))
- [**breaking**] Move int conversions to `conversions` ext, add to/from
usize ([#1490](#1490))
- Fill out array ops ([#1491](#1491))

### Refactor

- [**breaking**] Bring the collections ext in line with other extension
defs ([#1469](#1469))
- [**breaking**] Make Either::Right the "success" case
([#1489](#1489))
- [**breaking**] Flatten `CustomOp` in to `OpType`
([#1429](#1429))

### Testing

- Add serialization benchmarks
([#1439](#1439))
</blockquote>

## `hugr-core`
<blockquote>

## 0.9.0 (2024-08-30)

### Features

- [**breaking**] Disallow opaque ops during validation
([#1431](#1431))
- [**breaking**] Add collections to serialized standard extensions
([#1452](#1452))
- [**breaking**] Variadic logic ops now binary
([#1451](#1451))
- [**breaking**] Int operations other than widen/narrow have only one
width arg ([#1455](#1455))
- Add a `FuncTypeBase::io` method
([#1458](#1458))
- Add missing ops ([#1463](#1463))
- [**breaking**] Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to
prelude ([#1475](#1475))
- `Option` / `Result` helpers
([#1481](#1481))
- [**breaking**] Add more list operations
([#1474](#1474))
- [**breaking**] Move int conversions to `conversions` ext, add to/from
usize ([#1490](#1490))
- Fill out array ops ([#1491](#1491))

### Refactor

- [**breaking**] Flatten `CustomOp` in to `OpType`
([#1429](#1429))
- [**breaking**] Bring the collections ext in line with other extension
defs ([#1469](#1469))
- [**breaking**] Make Either::Right the "success" case
([#1489](#1489))
</blockquote>

## `hugr-passes`
<blockquote>

## 0.8.0 (2024-08-30)

### Features

- [**breaking**] Variadic logic ops now binary
([#1451](#1451))
- [**breaking**] Int operations other than widen/narrow have only one
width arg ([#1455](#1455))
- [**breaking**] Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to
prelude ([#1475](#1475))
- [**breaking**] Add more list operations
([#1474](#1474))
- [**breaking**] Move int conversions to `conversions` ext, add to/from
usize ([#1490](#1490))

### Refactor

- [**breaking**] Flatten `CustomOp` in to `OpType`
([#1429](#1429))
- [**breaking**] Bring the collections ext in line with other extension
defs ([#1469](#1469))
- [**breaking**] Make Either::Right the "success" case
([#1489](#1489))
</blockquote>

## `hugr-cli`
<blockquote>

## 0.5.0 (2024-08-30)

### Features

- [**breaking**] Add collections to serialized standard extensions
([#1452](#1452))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
@hugrbot hugrbot mentioned this pull request Sep 3, 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.

Make logic operations just binary
2 participants