-
Notifications
You must be signed in to change notification settings - Fork 7
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!: remove the Eq
type bound.
#1364
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1364 +/- ##
=======================================
Coverage 87.65% 87.65%
=======================================
Files 113 113
Lines 20027 20030 +3
Branches 17760 17764 +4
=======================================
+ Hits 17554 17557 +3
Misses 1698 1698
Partials 775 775
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The schema version update is missing things (updating the version tags in the generated jsons, both in the hugr def and in hugr-py). This will probably fail in ci due to the mismatched schema file version vs hugr.get_serialisation_version()
.
Is this PR meant to complement #1352?
hugr-core/src/hugr/serialize/test.rs
Outdated
@@ -79,7 +79,7 @@ macro_rules! include_schema { | |||
static ref $name: NamedSchema = | |||
NamedSchema::new("$name", { | |||
let schema_val: serde_json::Value = serde_json::from_str(include_str!( | |||
concat!("../../../../specification/schema/", $path, "_v2.json") | |||
concat!("../../../../specification/schema/", $path, "_v4.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v3
is not even merged (#1352) and we are pushing for v4
already? :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this is assuming 1352 goes in first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we just include this in the v3 change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have reverted schema version bump pending #1352
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
If this goes in the same release we should do a single version bump.
@@ -381,18 +381,17 @@ def deserialize(self) -> tys.PolyFuncType: | |||
|
|||
|
|||
class TypeBound(Enum): | |||
Eq = "E" | |||
Copyable = "C" | |||
Any = "A" | |||
|
|||
@staticmethod | |||
def join(*bs: TypeBound) -> TypeBound: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not covered by tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably pulled in from guppy, new issue : #1365
Co-authored-by: Agustín Borgna <[email protected]>
This reverts commit 8be7b9c.
This is a patch release including only some non-breaking changes since 0.9.0. ## New release * `hugr`: 0.9.0 -> 0.9.1 * `hugr-core`: 0.6.0 -> 0.6.1 * `hugr-passes`: 0.6.0 -> 0.6.1 * `hugr-cli`: 0.2.0 -> 0.2.1 <details><summary><i><b>Changelog</b></i></summary><p> ## `hugr` <blockquote> ## 0.9.1 (2024-07-25) ### Bug Fixes - Dfg wrapper build handles incorrect output wire numbers ([#1332](#1332)) - Sibling extension panics while computing signature with non-dataflow nodes ([#1350](#1350)) </blockquote> ## `hugr-core` <blockquote> ## 0.6.1 (2024-07-25) ### Bug Fixes - Dfg wrapper build handles incorrect output wire numbers ([#1332](#1332)) - Sibling extension panics while computing signature with non-dataflow nodes ([#1350](#1350)) </blockquote> ## `hugr-passes` <blockquote> ## 0.6.1 (2024-07-25) Nothing here. </blockquote> ## `hugr-cli` <blockquote> ## 0.2.1 (2024-07-25) Nothing here. </blockquote> </p></details> --- This PR was generated by a human. --------- Co-authored-by: Seyon Sivarajah <[email protected]>
Updates the instructions to use `release-plz` locally. This is easier and less error prone, since it can reuse the configuration used for normal releases.
Closes #248 There are still some visual glitches, but it should be more readable now. Adds two invisible order edges to the input nodes, changing this ```mermaid flowchart subgraph CFG direction TB subgraph Entry direction TB EntryIn["Input"] -- "P" --> Entry_["P?1"] Entry_ -- "[()|(P)]" --> EntryOut["Output"] F end subgraph BB1 direction TB BB1In["Input"] BB1_["Const"] -- "[()]" --> BB1Out["Output"] G -- "angle" --> BB1Out end subgraph BB2 direction TB BB2In["Input"] -- "P" --> H -- "P" --> BB2_["P?2"] BB2_ -- "[()|()]" --> BB2Out["Output"] end subgraph BB3 direction TB BB3In["Input"] BB3_["Const"] -- "[()]" --> BB3Out["Output"] C -- "angle" --> BB3Out end subgraph Exit end Entry -- "0" --> BB1 Entry -- "1" --> BB2 BB2 -- "0" --> BB1 BB2 -- "1" --> BB3 BB1 -- "0" --> Exit BB3 -- "0" --> Exit end A -- "P" --> CFG A -- "qubit" --> Rz_out["Rz"] CFG -- "angle" --> Rz_out Rz_out -- "qubit" --> B A == "angle" ==> F F == "angle" ==> G linkStyle 12,13,14,15,16,17 stroke:#ff3,stroke-width:4px; ``` into this ```mermaid flowchart subgraph CFG direction TB subgraph Entry direction TB EntryIn["Input"] -- "P" --> Entry_["P?1"] Entry_ -- "[()|(P)]" --> EntryOut["Output"] F end subgraph BB1 direction TB BB1In["Input"] BB1_["Const"] -- "[()]" --> BB1Out["Output"] G -- "angle" --> BB1Out BB1In ~~~ G end subgraph BB2 direction TB BB2In["Input"] -- "P" --> H -- "P" --> BB2_["P?2"] BB2_ -- "[()|()]" --> BB2Out["Output"] end subgraph BB3 direction TB BB3In["Input"] BB3_["Const"] -- "[()]" --> BB3Out["Output"] C -- "angle" --> BB3Out BB3In ~~~ C end subgraph Exit end Entry -- "0" --> BB1 Entry -- "1" --> BB2 BB2 -- "0" --> BB1 BB2 -- "1" --> BB3 BB1 -- "0" --> Exit BB3 -- "0" --> Exit end A -- "P" --> CFG A -- "qubit" --> Rz_out["Rz"] CFG -- "angle" --> Rz_out Rz_out -- "qubit" --> B A == "angle" ==> F F == "angle" ==> G linkStyle 12,13,14,15,16,17 stroke:#ff3,stroke-width:4px; ```
Since we are breaking serialisation I edited most test cases to use v3. The single test case which I deleted was testing that we were able to l deserialise from an older version, so is now redundant. This should have been done when removing `CustomTypeArg`. BREAKING CHANGE: All Hugrs serialised with earlier versions will fail to deserialise --------- Co-authored-by: Agustín Borgna <[email protected]> Co-authored-by: Seyon Sivarajah <[email protected]>
## 🤖 New release * `hugr`: 0.9.1 -> 0.10.0 * `hugr-core`: 0.6.1 -> 0.7.0 * `hugr-passes`: 0.6.1 -> 0.6.2 * `hugr-cli`: 0.2.1 -> 0.3.0 <details><summary><i><b>Changelog</b></i></summary><p> ## `hugr` <blockquote> ## 0.10.0 (2024-07-26) ### Bug Fixes (#1350)) - [**breaking**] Bump serialisation version with no upgrade path ([#1352](#1352)) ### Features - Add `nonlocal_edges` and `ensure_no_nonlocal_edges` ([#1345](#1345)) - Serialization upgrade path ([#1327](#1327)) - [**breaking**] Replace opaque type arguments with String ([#1328](#1328)) - Add `impl Hash for Type` ([#1347](#1347)) - `HasDef` and `HasConcrete` traits for def/concrete op design pattern ([#1336](#1336)) - Add pointer standard extension ([#1337](#1337)) - [**breaking**] Remove the `Eq` type bound. ([#1364](#1364)) ### Refactor - [**breaking**] Use JSON rather than YAML in opaque fields. ([#1338](#1338)) - [**breaking**] Declarative module behind optional feature flag ([#1341](#1341)) ### Testing - Miri gate serialization upgrades ([#1349](#1349)) </blockquote> ## `hugr-core` <blockquote> ## 0.7.0 (2024-07-26) ### Bug Fixes (#1350)) - [**breaking**] Bump serialisation version with no upgrade path ([#1352](#1352)) ### Features - Serialization upgrade path ([#1327](#1327)) - [**breaking**] Replace opaque type arguments with String ([#1328](#1328)) - Add `impl Hash for Type` ([#1347](#1347)) - `HasDef` and `HasConcrete` traits for def/concrete op design pattern ([#1336](#1336)) - Add pointer standard extension ([#1337](#1337)) - [**breaking**] Remove the `Eq` type bound. ([#1364](#1364)) ### Refactor - [**breaking**] Use JSON rather than YAML in opaque fields. ([#1338](#1338)) - [**breaking**] Declarative module behind optional feature flag ([#1341](#1341)) ### Testing - Miri gate serialization upgrades ([#1349](#1349)) </blockquote> ## `hugr-passes` <blockquote> ## 0.6.2 (2024-07-26) ### Features - Add `nonlocal_edges` and `ensure_no_nonlocal_edges` ([#1345](#1345)) </blockquote> ## `hugr-cli` <blockquote> ## 0.3.0 (2024-07-26) ### Features - [**breaking**] Created `validate` CLI subcommand. ([#1312](#1312)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). --------- Co-authored-by: Douglas Wilson <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [0.5.0](hugr-py-v0.4.0...hugr-py-v0.5.0) (2024-07-29) ### ⚠ BREAKING CHANGES * Eq type bound removed. References to `Eq` in serialized HUGRs will be treated as `Copyable`. * **hugr-core:** All Hugrs serialised with earlier versions will fail to deserialise * opaque type parameters replaced with string parameters. ### Features * **hugr-py:** `AsCustomOp` protocol for user-defined custom op types. ([#1290](#1290)) ([1db43eb](1db43eb)) * remove the `Eq` type bound. ([#1364](#1364)) ([1218d21](1218d21)) * replace opaque type arguments with String ([#1328](#1328)) ([24b2217](24b2217)), closes [#1308](#1308) * Serialization upgrade path ([#1327](#1327)) ([d493139](d493139)) ### Bug Fixes * add op's extension to signature check in `resolve_opaque_op` ([#1317](#1317)) ([01da7ba](01da7ba)) * **hugr-core:** bump serialisation version with no upgrade path ([#1352](#1352)) ([657cbb0](657cbb0)) * **hugr-py:** ops require their own extensions ([#1303](#1303)) ([026bfcb](026bfcb)), closes [#1301](#1301) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Closes #1351
BREAKING CHANGE: Eq type bound removed. References to
Eq
in serialized HUGRs will be treated asCopyable
.