Skip to content

Commit

Permalink
chore(main): release hugr-py 0.8.0 (#1430)
Browse files Browse the repository at this point in the history
🤖 I have created a release *beep* *boop*
---


##
[0.8.0](hugr-py-v0.7.0...hugr-py-v0.8.0)
(2024-08-30)


### ⚠ BREAKING CHANGES

* Moved `itobool`/`ifrombool`/`itostring_{u,s}` to the conversions
extension.
* Binary sums representing fallible values now use tag `1` for the
successful variant
* **hugr-py:** rename `Custom.name` to `Custom.op_name` and
`Func(Defn/Decl).name` to `f_name` to allow for new `name` method
* `ListOp::pop` now returns an option.
* Moved all builder definitions into the `hugr.build` module. Moved
`node_port` and `render` into the `hugr.hugr` module.
* Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` from core
operations to prelude. Rename `ops::leaf` module to `ops::sum`.
* **hugr-py:** `hugr.serialization` module and `to_serial` methods are
now internal only.
* Renamed `_DfBase` to `DfBase` and `_DefinitionBuilder` to
`DefinitionBuilder`
* `idivmod_checked`, `idivmod`, `idiv`, `idiv_checked`, `imod`, `ishl`,
`ishr`, `irotl`, `irotr` operations now only have one width argument for
all inputs and outputs rather than two.
* HUGRs containing opaque operations that don't point to an extension in
the registry will fail to validate. Use `Package` to pack extensions
with HUGRs for serialisation.
* `CustomOp` removed, `OpType` now contains `ExtensionOp` and `OpaqueOp`
directly. `CustomOpError` renamed to`OpaqueOpError`.

### Features

* `Option` / `Result` helpers
([#1481](#1481))
([9698420](9698420))
* Add missing ops ([#1463](#1463))
([841f450](841f450))
* Add more list operations
([#1474](#1474))
([037005f](037005f))
* Bring in the pure-python renderer from guppy
([#1462](#1462))
([001e66a](001e66a))
* disallow opaque ops during validation
([#1431](#1431))
([fbbb805](fbbb805))
* fill out array ops ([#1491](#1491))
([26ec57a](26ec57a))
* **hugr-py:** pretty printing for ops and types
([#1482](#1482))
([aca403a](aca403a))
* **hugr-py:** use serialized extensions in python
([#1459](#1459))
([a61f4df](a61f4df)),
closes [#1450](#1450)
* int operations other than widen/narrow have only one width arg
([#1455](#1455))
([c39ed15](c39ed15))
* Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to prelude
([#1475](#1475))
([b387505](b387505))
* Move int conversions to `conversions` ext, add to/from usize
([#1490](#1490))
([88913f2](88913f2))


### Bug Fixes

* **hugr-py:** record node children correctly when deserializing
([#1480](#1480))
([331125a](331125a)),
closes [#1479](#1479)
* **py:** Invalid node indexing
([#1457](#1457))
([d6edcd7](d6edcd7))
* schema for array inner types
([#1494](#1494))
([d43cbb2](d43cbb2)),
closes [#1471](#1471)
* Sum value equality. Add unit tests
([#1484](#1484))
([a7b2718](a7b2718))


### Code Refactoring

* flatten `CustomOp` in to `OpType`
([#1429](#1429))
([8e8bba5](8e8bba5))
* **hugr-py:** make serialization (module/methods) private
([#1477](#1477))
([49a5bad](49a5bad))
* Make `_DfBase` and `_DefinitionBuilder` public
([#1461](#1461))
([ea9cca0](ea9cca0))
* Make Either::Right the "success" case
([#1489](#1489))
([8caa572](8caa572))
* Organise the hugr-py modules
([#1460](#1460))
([3ca56f4](3ca56f4))

---
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 <121866228+aborgna-q@users.noreply.github.com>
Co-authored-by: Agustin Borgna <agustin.borgna@quantinuum.com>
  • Loading branch information
3 people authored Aug 30, 2024
1 parent 3213063 commit a38e58c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"hugr-py": "0.7.0"
"hugr-py": "0.8.0"
}
48 changes: 48 additions & 0 deletions hugr-py/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Changelog

## [0.8.0](https://github.com/CQCL/hugr/compare/hugr-py-v0.7.0...hugr-py-v0.8.0) (2024-08-30)


### ⚠ BREAKING CHANGES

* Moved `itobool`/`ifrombool`/`itostring_{u,s}` to the conversions extension.
* Binary sums representing fallible values now use tag `1` for the successful variant
* Renamed `Custom.name` to `Custom.op_name` and `Func(Defn/Decl).name` to `f_name` to allow for new `name` method
* `ListOp::pop` now returns an option.
* Moved all builder definitions into the `hugr.build` module. Moved `node_port` and `render` into the `hugr.hugr` module.
* Moved `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` from core operations to prelude. Rename `ops::leaf` module to `ops::sum`.
* `hugr.serialization` module and `Hugr.to_serial` methods are now internal only.
* Renamed `_DfBase` to `DfBase` and `_DefinitionBuilder` to `DefinitionBuilder`
* `idivmod_checked`, `idivmod`, `idiv`, `idiv_checked`, `imod`, `ishl`, `ishr`, `irotl`, `irotr` operations now only have one width argument for all inputs and outputs rather than two.
* HUGRs containing opaque operations that don't point to an extension in the registry will fail to validate. Use `Package` to pack extensions with HUGRs for serialisation.
* Removed `CustomOp`, `OpType` now contains `ExtensionOp` and `OpaqueOp` directly. `CustomOpError` renamed to`OpaqueOpError`.

### Features

* `Option` / `Result` helpers ([#1481](https://github.com/CQCL/hugr/issues/1481)) ([9698420](https://github.com/CQCL/hugr/commit/969842091e06d1482c8bc77965847865cb9f77a0))
* Add missing ops ([#1463](https://github.com/CQCL/hugr/issues/1463)) ([841f450](https://github.com/CQCL/hugr/commit/841f450dab3b50bb3fa7d0da75902608ff7165e7))
* Add more list operations ([#1474](https://github.com/CQCL/hugr/issues/1474)) ([037005f](https://github.com/CQCL/hugr/commit/037005f27520511401b4c116244435fbbdbe0b60))
* Bring in the pure-python renderer from guppy ([#1462](https://github.com/CQCL/hugr/issues/1462)) ([001e66a](https://github.com/CQCL/hugr/commit/001e66a49ae2cbd0b49a7c2ed0b73eae8ab07379))
* Disallow opaque ops during validation ([#1431](https://github.com/CQCL/hugr/issues/1431)) ([fbbb805](https://github.com/CQCL/hugr/commit/fbbb805b9d25d5219e1081d015c67422225d7f79))
* Fill out array ops ([#1491](https://github.com/CQCL/hugr/issues/1491)) ([26ec57a](https://github.com/CQCL/hugr/commit/26ec57ac006ab6c44902c68dbf354f8f8e0933f1))
* Pretty printing for ops and types ([#1482](https://github.com/CQCL/hugr/issues/1482)) ([aca403a](https://github.com/CQCL/hugr/commit/aca403a2f3eef5dd6a1fd614079d8eee1243fdde))
* Use serialized extensions in python ([#1459](https://github.com/CQCL/hugr/issues/1459)) ([a61f4df](https://github.com/CQCL/hugr/commit/a61f4df66cb6ce11b342103af705145441ea9b5c)), closes [#1450](https://github.com/CQCL/hugr/issues/1450)
* Int operations other than widen/narrow have only one width arg ([#1455](https://github.com/CQCL/hugr/issues/1455)) ([c39ed15](https://github.com/CQCL/hugr/commit/c39ed151f413284091f0d861f926541dfed8a1ef))
* Move `Lift`, `MakeTuple`, `UnpackTuple` and `Lift` to prelude ([#1475](https://github.com/CQCL/hugr/issues/1475)) ([b387505](https://github.com/CQCL/hugr/commit/b38750585c19b41cc486095186f72d70ff11980c))
* Move int conversions to `conversions` ext, add to/from usize ([#1490](https://github.com/CQCL/hugr/issues/1490)) ([88913f2](https://github.com/CQCL/hugr/commit/88913f29287efafc5303e91dd4677582348ee2f7))


### Bug Fixes

* Fixed deserialization panic while extracting node children ([#1480](https://github.com/CQCL/hugr/issues/1480)) ([331125a](https://github.com/CQCL/hugr/commit/331125a6ca9d05e58b30c8593257126d68a02bc7)), closes [#1479](https://github.com/CQCL/hugr/issues/1479)
* Fixed errors while indexing on a `ToNode` ([#1457](https://github.com/CQCL/hugr/issues/1457)) ([d6edcd7](https://github.com/CQCL/hugr/commit/d6edcd77e7679791ae5ab910d13ccccf9f8ca914))
* Fixed schema for array inner types ([#1494](https://github.com/CQCL/hugr/issues/1494)) ([d43cbb2](https://github.com/CQCL/hugr/commit/d43cbb2c3035f49e4ea7a7769fd1a51db31806ce)), closes [#1471](https://github.com/CQCL/hugr/issues/1471)
* Fixed `val.Sum` equality. Add unit tests ([#1484](https://github.com/CQCL/hugr/issues/1484)) ([a7b2718](https://github.com/CQCL/hugr/commit/a7b27180cbb85490c09f8e24f46eeb4d5fd5eb21))


### Code Refactoring

* Flattened `CustomOp` in to `OpType` ([#1429](https://github.com/CQCL/hugr/issues/1429)) ([8e8bba5](https://github.com/CQCL/hugr/commit/8e8bba55a5d2a0a421a835b80c8aea07eae28e65))
* Made serialization (module/methods) private ([#1477](https://github.com/CQCL/hugr/issues/1477)) ([49a5bad](https://github.com/CQCL/hugr/commit/49a5bad5399eef248aba0b74b14ac23546324b14))
* Made `_DfBase` and `_DefinitionBuilder` public ([#1461](https://github.com/CQCL/hugr/issues/1461)) ([ea9cca0](https://github.com/CQCL/hugr/commit/ea9cca001bff3fff41d84e861f8b2b7ee26645d1))
* Made Either::Right the "success" case ([#1489](https://github.com/CQCL/hugr/issues/1489)) ([8caa572](https://github.com/CQCL/hugr/commit/8caa572d01aac59715480827eaf568d8488ff542))
* Reorganised the python module structure ([#1460](https://github.com/CQCL/hugr/issues/1460)) ([3ca56f4](https://github.com/CQCL/hugr/commit/3ca56f43c9499c629307b0a52aabee6661e22c99))

## [0.7.0](https://github.com/CQCL/hugr/compare/hugr-py-v0.6.0...hugr-py-v0.7.0) (2024-08-14)


Expand Down
2 changes: 1 addition & 1 deletion hugr-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hugr"
version = "0.7.0"
version = "0.8.0"
requires-python = ">=3.10,<3.13"
description = "Quantinuum's common representation for quantum programs"
license = { file = "LICENCE" }
Expand Down
2 changes: 1 addition & 1 deletion hugr-py/src/hugr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

# This is updated by our release-please workflow, triggered by this
# annotation: x-release-please-version
__version__ = "0.7.0"
__version__ = "0.8.0"

0 comments on commit a38e58c

Please sign in to comment.