-
Notifications
You must be signed in to change notification settings - Fork 8
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(hugr-py)!: user facing Extension class #1413
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1413 +/- ##
==========================================
- Coverage 87.69% 87.58% -0.12%
==========================================
Files 118 119 +1
Lines 20441 20751 +310
Branches 18045 18045
==========================================
+ Hits 17926 18174 +248
- Misses 1727 1789 +62
Partials 788 788
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ffa6021
to
879e033
Compare
"ExtensionValue", | ||
"Extension", | ||
"Package", | ||
"Version", |
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.
just so I can re-export Version
without ruff complaining
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.
LGTM, some small comments.
Co-authored-by: Alec Edgington <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [0.7.0](hugr-py-v0.6.0...hugr-py-v0.7.0) (2024-08-14) ### ⚠ BREAKING CHANGES * **hugr-py:** `AsCustomOp` replaced with `AsExtOp`, so all such operations now need to be attached to an extension. ### Features * **hugr-py:** user facing Extension class ([#1413](#1413)) ([c6473c9](c6473c9)) * **py:** Add node metadata ([#1428](#1428)) ([b229be6](b229be6)), closes [#1319](#1319) ### Bug Fixes * Equality check between `Sum` types ([#1422](#1422)) ([8dfea09](8dfea09)) * **py:** Invalid serialization of float and int constants ([#1427](#1427)) ([b89c08f](b89c08f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: Agustín Borgna <[email protected]>
Allows users to define extensions in Python, attaching operation, type and value definitions to them. Also provides utilities for then using those objects when building HUGRs.
Diff is big, but a lot of it is poetry and schema changes. Open to suggestions as to how to break up but I think it is fairly self-contained.
Closes #1374
Closes #1412
Also as a drive-by adds the missing
binary
field to serialised opdef signatures.BREAKING CHANGE:
AsCustomOp
replaced withAsExtOp
, so all such operations now need to be attached to an extension.