-
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(py): Parametric int type helper, and arbitrary width int constants #1406
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1406 +/- ##
=======================================
Coverage 87.67% 87.68%
=======================================
Files 118 118
Lines 20423 20438 +15
Branches 18042 18042
=======================================
+ Hits 17906 17921 +15
Misses 1726 1726
Partials 791 791
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
croyzor
reviewed
Aug 12, 2024
croyzor
approved these changes
Aug 12, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 12, 2024
🤖 I have created a release *beep* *boop* --- ## [0.6.0](hugr-py-v0.5.0...hugr-py-v0.6.0) (2024-08-12) ### ⚠ BREAKING CHANGES * **hugr-py:** Moved `hugr.get_serialization_version` to `hugr.serialization.serial_hugr.serialization_version` * **hugr-cli:** Cli validate command no longer has a mermaid option, use `mermaid` sub-command instead. * `TypeDefBound` uses struct-variants for serialization. `SignatureFunc` now has variants for missing binary functions, and serializes in to a new format that indicates expected binaries. ### Features * `Package` pydantic model for modules + extensions ([#1387](#1387)) ([68cfac5](68cfac5)), closes [#1358](#1358) * Define `Const` inline by default, and add a parameter to change the parent ([#1404](#1404)) ([3609736](3609736)) * **hugr-cli:** move mermaid to own sub-command ([#1390](#1390)) ([77795b9](77795b9)) * **hugr-py:** add type_bound method to `Type` ([#1410](#1410)) ([bd5ba47](bd5ba47)), closes [#1365](#1365) * **hugr-py:** Allow defining functions, consts, and aliases inside DFGs ([#1394](#1394)) ([d554072](d554072)) * **hugr-py:** Reexport commonly used classes from the package root ([#1393](#1393)) ([69925d0](69925d0)) * **py:** `Hugr.to_json` and `.load_json` helpers ([#1403](#1403)) ([e7f9f4c](e7f9f4c)) * **py:** Allow pre-declaring a `Function`'s output types ([#1417](#1417)) ([fa0f5a4](fa0f5a4)) * **py:** implement `iter` on `ToNode` ([#1399](#1399)) ([e88910b](e88910b)) * **py:** Parametric int type helper, and arbitrary width int constants ([#1406](#1406)) ([abd70c9](abd70c9)) * Serialised extensions ([#1371](#1371)) ([31be204](31be204)) ### Bug Fixes * **py:** `Hugr.__iter__` returning `NodeData | None` instead of `Node`s ([#1401](#1401)) ([c134584](c134584)) * **py:** Set output cont for Conditionals ([#1415](#1415)) ([67bb8a0](67bb8a0)) ### Documentation * **hugr-py:** expand toctree ([#1411](#1411)) ([aa81c9a](aa81c9a)) * **hugr-py:** remove multiversion + add justfile command ([#1381](#1381)) ([dd1dc48](dd1dc48)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
int_tv
method to create parametric integer typeswidth
member toIntVal
, so we can define constants for other integer widths