From 436c438a7301b3c216d002e789a8b6203f86d91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:45:16 +0200 Subject: [PATCH] chore: release v0.3.0-alpha.1 (#916) With the rename of the crate from `hugr_quantinuum` to `hugr` (#914) we broke `release-plz`' automatic changelog generation (since it cannot find the crate anymore), and all links to crate-related urls. This alpha release should fix those issues, in addition to letting us claim the new crate name. I added the partial changelog bits from #898, #893, and #840 since they won't be included in the new package's PRs. drive-by: Move CHANGELOG and README from the root to the `hugr` dir to be more consistent with other packages in the workspace, and symlink them instead. --- CHANGELOG.md | 30 +----------------- README.md | 55 +-------------------------------- hugr/CHANGELOG.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++ hugr/Cargo.toml | 2 +- hugr/README.md | 55 ++++++++++++++++++++++++++++++++- release-plz.toml | 18 ++++++++--- 6 files changed, 148 insertions(+), 90 deletions(-) mode change 100644 => 120000 CHANGELOG.md mode change 100644 => 120000 README.md create mode 100644 hugr/CHANGELOG.md mode change 120000 => 100644 hugr/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index c5c336c7e..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,29 +0,0 @@ -# Changelog - -## 0.2.0 (2024-02-20) - -### Documentation - -- Fix crates.io badge in README ([#809](https://github.com/CQCL/hugr/pull/809)) -- Use absolute links in the README ([#811](https://github.com/CQCL/hugr/pull/811)) -- Remove input->const order edges from spec diagrams ([#812](https://github.com/CQCL/hugr/pull/812)) -- Remove incorrect indentation in spec ([#813](https://github.com/CQCL/hugr/pull/813)) -- Tweaks to main example ([#825](https://github.com/CQCL/hugr/pull/825)) -- Add example to `CFGBuilder` ([#826](https://github.com/CQCL/hugr/pull/826)) - -### Features - -- Add InlineDFG rewrite ([#828](https://github.com/CQCL/hugr/pull/828)) -- [**breaking**] Impls of CustomConst must be able to report their type ([#827](https://github.com/CQCL/hugr/pull/827)) -- Minimal implementation for YAML extensions ([#833](https://github.com/CQCL/hugr/pull/833)) - -## 0.1.0 (2024-01-15) - -This is the initial release of the Hierarchical Unified Graph Representation. -See the representation specification available at [hugr.md](https://github.com/CQCL/hugr/blob/main/specification/hugr.md). - -This release includes an up-to-date implementation of the spec, including the core definitions (control flow, data flow and module structures) as well as the Prelude extension with support for basic classical operations and types. - -HUGRs can be loaded and stored using the versioned serialization format, or they can be constructed programmatically using the builder utility. -The modules `hugr::hugr::view` and `hugr::hugr::rewrite` provide an API for querying and mutating the HUGR. -For more complex operations, some algorithms are provided in `hugr::algorithms`. diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 120000 index 000000000..729dc652a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +hugr/CHANGELOG.md \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 63ba16bf0..000000000 --- a/README.md +++ /dev/null @@ -1,54 +0,0 @@ -hugr -=============== - -[![build_status][]](https://github.com/CQCL/hugr/actions) -[![crates][]](https://crates.io/crates/hugr) -[![msrv][]](https://github.com/CQCL/hugr) -[![codecov][]](https://codecov.io/gh/CQCL/hugr) - -The Hierarchical Unified Graph Representation (HUGR, pronounced _hugger_) is the -common representation of quantum circuits and operations in the Quantinuum -ecosystem. - -It provides a high-fidelity representation of operations, that facilitates -compilation and encodes runnable programs. - -The HUGR specification is [here](https://github.com/CQCL/hugr/blob/main/specification/hugr.md). - -## Usage - -Add the dependency to your project: - -```bash -cargo add hugr -``` - -Please read the [API documentation here][]. - -## Experimental Features - -- `extension_inference`: - Experimental feature which allows automatic inference of extension usages and - requirements in a HUGR and validation that extensions are correctly specified. - Not enabled by default. - -## Recent Changes - -See [CHANGELOG][] for a list of changes. The minimum supported rust -version will only change on major releases. - -## Development - -See [DEVELOPMENT.md](https://github.com/CQCL/hugr/blob/main/DEVELOPMENT.md) for instructions on setting up the development environment. - -## License - -This project is licensed under Apache License, Version 2.0 ([LICENSE][] or http://www.apache.org/licenses/LICENSE-2.0). - - [API documentation here]: https://docs.rs/hugr/ - [build_status]: https://github.com/CQCL/hugr/actions/workflows/ci-rs.yml/badge.svg?branch=main - [msrv]: https://img.shields.io/badge/rust-1.75.0%2B-blue.svg - [crates]: https://img.shields.io/crates/v/hugr - [codecov]: https://img.shields.io/codecov/c/gh/CQCL/hugr?logo=codecov - [LICENSE]: https://github.com/CQCL/hugr/blob/main/LICENCE - [CHANGELOG]: https://github.com/CQCL/hugr/blob/main/CHANGELOG.md diff --git a/README.md b/README.md new file mode 120000 index 000000000..240a3ef77 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +hugr/README.md \ No newline at end of file diff --git a/hugr/CHANGELOG.md b/hugr/CHANGELOG.md new file mode 100644 index 000000000..2c3f93f42 --- /dev/null +++ b/hugr/CHANGELOG.md @@ -0,0 +1,78 @@ +# Changelog + +## Unreleased (xxxx-xx-xx) + +This release includes multiple breaking changes to the API, including the rename of the crate from `quantinuum_hugr` to `hugr`. + +### New Contributors + +* @Cobord made their first contribution in [#889](https://github.com/CQCL/hugr/pull/889) +* @qartik made their first contribution in [#843](https://github.com/CQCL/hugr/pull/843) + +### Bug Fixes + +- [**breaking**] Polymorphic calls ([#901](https://github.com/CQCL/hugr/pull/901)) + +### Documentation + +- HUGR spec copyediting ([#843](https://github.com/CQCL/hugr/pull/843)) +- Add builder module docs + example ([#853](https://github.com/CQCL/hugr/pull/853)) +- Add note on serialized hugr node order ([#849](https://github.com/CQCL/hugr/pull/849)) + +### Features + +- Arbitrary types in the yaml extension definition ([#839](https://github.com/CQCL/hugr/pull/839)) +- Make all core types serializable ([#850](https://github.com/CQCL/hugr/pull/850)) +- Don't include empty type args in Display ([#857](https://github.com/CQCL/hugr/pull/857)) +- Mermaid renderer for hugrs ([#852](https://github.com/CQCL/hugr/pull/852)) +- Add impl TryFrom<&OpType> for ops::* ([#856](https://github.com/CQCL/hugr/pull/856)) +- [**breaking**] Infallible `HugrMut` methods ([#869](https://github.com/CQCL/hugr/pull/869)) +- Ancilla support in CircuitBuilder ([#867](https://github.com/CQCL/hugr/pull/867)) +- `CircuitBuilder::append_with_output_arr` ([#871](https://github.com/CQCL/hugr/pull/871)) +- [**breaking**] Make some `Container` methods infallible ([#872](https://github.com/CQCL/hugr/pull/872)) +- [**breaking**] Cleaner error on wiring errors while building ([#873](https://github.com/CQCL/hugr/pull/873)) +- [**breaking**] Change sums to be over TypeRows rather than Types ([#863](https://github.com/CQCL/hugr/pull/863)) +- Make various data publicly accessible ([#875](https://github.com/CQCL/hugr/pull/875)) +- [**breaking**] CustomConst is not restricted to being CustomType ([#878](https://github.com/CQCL/hugr/pull/878)) +- [**breaking**] Return the type of FuncDecl in `HugrView::get_function_type` ([#880](https://github.com/CQCL/hugr/pull/880)) +- [**breaking**] Merge `Value` into `Const` ([#881](https://github.com/CQCL/hugr/pull/881)) +- Replace `Tuple` with unary sums ([#891](https://github.com/CQCL/hugr/pull/891)) + +### Performance + +- Add some simple benchmarks ([#892](https://github.com/CQCL/hugr/pull/892)) + +### Refactor + +- Add `From` conversion from ExtensionId to ExtensionSet ([#855](https://github.com/CQCL/hugr/pull/855)) +- Remove clone in `ExtensionSet::union` ([#859](https://github.com/CQCL/hugr/pull/859)) +- Extension Inference: make fewer things public, rm Meta::new ([#883](https://github.com/CQCL/hugr/pull/883)) +- [**breaking**] Return impl trait in Rewrite trait ([#889](https://github.com/CQCL/hugr/pull/889)) + +## 0.2.0 (2024-02-20) + +### Documentation + +- Fix crates.io badge in README ([#809](https://github.com/CQCL/hugr/pull/809)) +- Use absolute links in the README ([#811](https://github.com/CQCL/hugr/pull/811)) +- Remove input->const order edges from spec diagrams ([#812](https://github.com/CQCL/hugr/pull/812)) +- Remove incorrect indentation in spec ([#813](https://github.com/CQCL/hugr/pull/813)) +- Tweaks to main example ([#825](https://github.com/CQCL/hugr/pull/825)) +- Add example to `CFGBuilder` ([#826](https://github.com/CQCL/hugr/pull/826)) + +### Features + +- Add InlineDFG rewrite ([#828](https://github.com/CQCL/hugr/pull/828)) +- [**breaking**] Impls of CustomConst must be able to report their type ([#827](https://github.com/CQCL/hugr/pull/827)) +- Minimal implementation for YAML extensions ([#833](https://github.com/CQCL/hugr/pull/833)) + +## 0.1.0 (2024-01-15) + +This is the initial release of the Hierarchical Unified Graph Representation. +See the representation specification available at [hugr.md](https://github.com/CQCL/hugr/blob/main/specification/hugr.md). + +This release includes an up-to-date implementation of the spec, including the core definitions (control flow, data flow and module structures) as well as the Prelude extension with support for basic classical operations and types. + +HUGRs can be loaded and stored using the versioned serialization format, or they can be constructed programmatically using the builder utility. +The modules `hugr::hugr::view` and `hugr::hugr::rewrite` provide an API for querying and mutating the HUGR. +For more complex operations, some algorithms are provided in `hugr::algorithms`. diff --git a/hugr/Cargo.toml b/hugr/Cargo.toml index d59cb1a41..bfea1df1d 100644 --- a/hugr/Cargo.toml +++ b/hugr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hugr" -version = "0.2.0" +version = "0.3.0-alpha.1" edition = { workspace = true } rust-version = { workspace = true } diff --git a/hugr/README.md b/hugr/README.md deleted file mode 120000 index 32d46ee88..000000000 --- a/hugr/README.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/hugr/README.md b/hugr/README.md new file mode 100644 index 000000000..63ba16bf0 --- /dev/null +++ b/hugr/README.md @@ -0,0 +1,54 @@ +hugr +=============== + +[![build_status][]](https://github.com/CQCL/hugr/actions) +[![crates][]](https://crates.io/crates/hugr) +[![msrv][]](https://github.com/CQCL/hugr) +[![codecov][]](https://codecov.io/gh/CQCL/hugr) + +The Hierarchical Unified Graph Representation (HUGR, pronounced _hugger_) is the +common representation of quantum circuits and operations in the Quantinuum +ecosystem. + +It provides a high-fidelity representation of operations, that facilitates +compilation and encodes runnable programs. + +The HUGR specification is [here](https://github.com/CQCL/hugr/blob/main/specification/hugr.md). + +## Usage + +Add the dependency to your project: + +```bash +cargo add hugr +``` + +Please read the [API documentation here][]. + +## Experimental Features + +- `extension_inference`: + Experimental feature which allows automatic inference of extension usages and + requirements in a HUGR and validation that extensions are correctly specified. + Not enabled by default. + +## Recent Changes + +See [CHANGELOG][] for a list of changes. The minimum supported rust +version will only change on major releases. + +## Development + +See [DEVELOPMENT.md](https://github.com/CQCL/hugr/blob/main/DEVELOPMENT.md) for instructions on setting up the development environment. + +## License + +This project is licensed under Apache License, Version 2.0 ([LICENSE][] or http://www.apache.org/licenses/LICENSE-2.0). + + [API documentation here]: https://docs.rs/hugr/ + [build_status]: https://github.com/CQCL/hugr/actions/workflows/ci-rs.yml/badge.svg?branch=main + [msrv]: https://img.shields.io/badge/rust-1.75.0%2B-blue.svg + [crates]: https://img.shields.io/crates/v/hugr + [codecov]: https://img.shields.io/codecov/c/gh/CQCL/hugr?logo=codecov + [LICENSE]: https://github.com/CQCL/hugr/blob/main/LICENCE + [CHANGELOG]: https://github.com/CQCL/hugr/blob/main/CHANGELOG.md diff --git a/release-plz.toml b/release-plz.toml index 9a76d7519..c6396384f 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -1,11 +1,19 @@ [workspace] -changelog_config = "cliff.toml" # use a custom git-cliff configuration -# disable the changelog for all packages +# Open the release PR as a draft +pr_draft = true + +# Use a custom git-cliff configuration +changelog_config = "cliff.toml" + +# Disable the changelog generation by default changelog_update = false +# Enforce adding the project name in the git tag, to avoid collisions with python. +# (This would normally only be enabled once there are multiple packages in the workspace) +git_tag_name = "{{ package }}-v{{ version }}" + [[package]] name = "hugr" -# enable the changelog for this package + +# Enable the changelog for this package changelog_update = true -# set the path of the changelog to the root of the repository -changelog_path = "./CHANGELOG.md"