Skip to content

Commit 450f06a

Browse files
aborgna-qcqc-alec
andauthored
feat!: Rename tket2* libs to tket* (#987)
This affects both rust and python libraries. Since we are renaming the main packages, I just renamed all the sub-crates / libs too to keep thing consistent and reduce confusion. Extension names have **not** been updated, as I worry about further breakage. Should we update them (in a separate PR)? ### Project breakage - For dependents, the breakage should be limited to having to update the dependency names and some types like `Tk2Op` to `TketOp`, `TKET2_EXTENSION` to `TKET_EXTENSION`, etc. - For the local automation, I tried to update the workflows as much as possible, but we can only test them once merged. - `release-please`'s manifest has been updated. I'll recreate the last python release tags without the `2`, and the workflow should pick up from there. We'll need to swap some pypi API keys before merging the release PR. - `release-plz` will probably get confused with which commits should be picked. - ~It also does not have permission to publish new crates, so we'll need to manually push `tket-hseries` and update the API keys.~ - Both the `tket` and `tket-qsystem` crates have been created and setup for trusted publishing, so the release should work correctly. ### Follow up and deprecation. We'll need to make patch releases for the `tket2*` libraries adding a deprecation warning to the README and directing users to the new libraries. - Por python, take a look at the `pypi-rename` [README template](https://github.com/simonw/pypi-rename/blob/main/%7B%7Bcookiecutter.old_package_name%7D%7D/README.md). - For rust, make sure to update both the README and `lib.rs` rusdocs. - Rustdoc recently added support for warning boxes: [rust-lang/rust#106561](https://www.github.com/rust-lang/rust/pull/106561) BREAKING CHANGES: Yes BREAKING CHANGE: Libraries renamed from `tket2*` to `tket*` --------- Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
1 parent db5351b commit 450f06a

File tree

317 files changed

+4404
-4506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+4404
-4506
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# for syntax see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax
22

3-
# base rule, tket2 team is codeowner for whole repo
3+
# base rule, tket team is codeowner for whole repo
44
* @CQCL/tket2
55

66
# Add specific rules below.

.github/change-filters.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
# to detect changes in each subproject, and only run the corresponding jobs.
33

44
rust-core: &rust-core
5-
- "tket2/**"
5+
- "tket/**"
66
- "Cargo.toml"
77
- "Cargo.lock"
88

99
rust:
1010
- *rust-core
11-
- "tket2-hseries/**"
11+
- "tket-qsystem/**"
1212
- "badger-optimiser/**"
1313
- "compile-rewriter/**"
1414
- "tket1-passes/**"
1515

1616
python:
1717
- *rust-core
18-
- "tket2-py/**"
19-
- "tket2-eccs/**"
20-
- "tket2-exts/**"
18+
- "tket-py/**"
19+
- "tket-eccs/**"
20+
- "tket-exts/**"
2121
- "pyproject.toml"
2222
- "uv.lock"
2323

2424
extensions:
25-
- "tket2-exts/src/tket2_exts/data/tket2/**"
25+
- "tket-exts/src/tket_exts/data/tket/**"

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ updates:
2727
- package-ecosystem: "pip"
2828
directories: # Location of package manifests
2929
- "/"
30-
- "/tket2-py"
31-
- "/tket2-eccs"
32-
- "/tket2-exts"
30+
- "/tket-py"
31+
- "/tket-eccs"
32+
- "/tket-exts"
3333
schedule:
3434
interval: "weekly"
3535
commit-message:

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
- name: Install cargo-codspeed
122122
run: cargo binstall cargo-codspeed --force
123123
- name: Override criterion with the CodSpeed harness
124-
run: cargo add --dev codspeed-criterion-compat --rename criterion --package tket2
124+
run: cargo add --dev codspeed-criterion-compat --rename criterion --package tket
125125
- name: Build benchmarks
126126
run: cargo codspeed build --profile bench --features portmatching,binary-eccs,rewrite-tracing
127127
- name: Run benchmarks
@@ -146,9 +146,9 @@ jobs:
146146
- name: Configure default rust toolchain
147147
run: rustup override set ${{steps.toolchain.outputs.name}}
148148
- name: Build with no features
149-
run: cargo test --verbose -p tket2 -p tket2-py -p tket2-hseries --no-default-features --no-run
149+
run: cargo test --verbose -p tket -p tket-py -p tket-qsystem --no-default-features --no-run
150150
- name: Tests with no features
151-
run: cargo test --verbose -p tket2 -p tket2-py -p tket2-hseries --no-default-features
151+
run: cargo test --verbose -p tket -p tket-py -p tket-qsystem --no-default-features
152152

153153
# Run tests on Rust stable
154154
tests-rs-stable-all-features:
@@ -291,7 +291,7 @@ jobs:
291291
token: ${{ secrets.CODECOV_TOKEN }}
292292

293293
# Ensure that serialized extensions match rust implementation
294-
tket2-extensions:
294+
tket-extensions:
295295
needs: [changes, tests-rs-stable-all-features]
296296
if: ${{ needs.changes.outputs.rust == 'true' && github.event_name != 'merge_group' }}
297297
name: Check standard extensions
@@ -306,11 +306,11 @@ jobs:
306306
run: just gen-extensions
307307
- name: Check if the declarations are up to date
308308
run: |
309-
git diff --exit-code --name-only tket2-exts/src/tket2_exts/data
309+
git diff --exit-code --name-only tket-exts/src/tket_exts/data
310310
if [ $? -ne 0 ]; then
311311
echo "The serialized standard extensions are not up to date"
312312
echo "Please run 'just gen-extensions' and commit the changes.
313-
Bump the version of tket2-exts according to semver.
313+
Bump the version of tket-exts according to semver.
314314
"
315315
exit 1
316316
fi
@@ -348,7 +348,7 @@ jobs:
348348
# even if they are skipped due to no changes in the relevant files.
349349
required-checks:
350350
name: Required checks 🦀+🐍
351-
needs: [changes, check-rs, check-py, tests-rs-stable-no-features, tests-rs-stable-all-features, tests-py, tket2-extensions, extension-versions]
351+
needs: [changes, check-rs, check-py, tests-rs-stable-no-features, tests-rs-stable-all-features, tests-py, tket-extensions, extension-versions]
352352
if: ${{ !cancelled() }}
353353
runs-on: ubuntu-latest
354354
steps:

.github/workflows/python-pure-wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Pure Python wheels 🐍
22
# Builds and publishes the pure wheels on pypi.
33
#
4-
# This does not include the main `tket2-py` package, which is built using maturin.
4+
# This does not include the main `tket-py` package, which is built using maturin.
55
# See `python-wheels.yml` for that workflow.
66
#
77
# When running on a release event or as a workflow dispatch for a tag,
@@ -33,8 +33,8 @@ jobs:
3333
strategy:
3434
matrix:
3535
target:
36-
- { dir: tket2-eccs, name: tket2_eccs}
37-
- { dir: tket2-exts, name: tket2_exts}
36+
- { dir: tket-eccs, name: tket_eccs}
37+
- { dir: tket-exts, name: tket_exts}
3838
steps:
3939
# Check the release tag against the package name
4040
#

.github/workflows/python-wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121
contents: read
2222

2323
env:
24-
MODULE_DIR: tket2-py
24+
MODULE_DIR: tket-py
2525

2626
jobs:
2727
# Check if the tag matches the package name,
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
echo "run=$SHOULD_RUN" >> $GITHUB_OUTPUT
3939
env:
40-
SHOULD_RUN: ${{ github.event_name != 'release' || ( github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) }}
40+
SHOULD_RUN: ${{ github.event_name != 'release' || ( github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket-py-v') ) }}
4141

4242
linux:
4343
needs: check-tag
@@ -192,7 +192,7 @@ jobs:
192192
name: Release
193193
runs-on: ubuntu-latest
194194
needs: [linux, musllinux, windows, macos, sdist]
195-
if: ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) || (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket2-py-v') ) }}
195+
if: ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket-py-v') ) || (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket-py-v') ) }}
196196
steps:
197197
- uses: actions/download-artifact@v4
198198
- name: Publish to PyPI

.github/workflows/release-checks.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# A check that ensures that `tket2-py` works correctly with the latest release of `tket2-exts` and `tket2-eccs`.
1+
# A check that ensures that `tket-py` works correctly with the latest release of `tket-exts` and `tket-eccs`.
22
#
3-
# If this fails, it is likely that the packages require a release before we can release the `tket2` python lib.
3+
# If this fails, it is likely that the packages require a release before we can release the `tket` python lib.
44

5-
name: tket2-py Release checks
5+
name: tket-py Release checks
66

77
on:
88
pull_request:
99
branches:
10-
- release-please--branches--main--components--tket2-py
10+
- release-please--branches--main--components--tket-py
1111
workflow_dispatch: {}
1212

1313
env:
@@ -21,7 +21,7 @@ env:
2121

2222
jobs:
2323
py-release:
24-
name: Check `tket2-py` release compatibility
24+
name: Check `tket-py` release compatibility
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v4
@@ -37,8 +37,8 @@ jobs:
3737
run: |
3838
uv sync --no-sources --no-install-workspace \
3939
--python ${{ env.PYTHON_HIGHEST }}
40-
uv pip install --no-sources tket2-exts
41-
uv pip install --no-sources tket2-eccs
40+
uv pip install --no-sources tket-exts
41+
uv pip install --no-sources tket-eccs
4242
uv run --no-sync maturin develop
4343
echo "\nDone! Installed dependencies:"
4444
uv pip list

.github/workflows/semver-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
TKET_C_API_PATH: ${{ github.workspace }}/tket-c-api
2929
LD_LIBRARY_PATH: ${{ github.workspace }}/tket-c-api/lib
3030
steps:
31-
- name: Checkout tket2
31+
- name: Checkout tket
3232
uses: actions/checkout@v4
3333
- name: Install tket-c-api library
3434
uses: ./.github/actions/tket-c-api

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build artifacts
22
/target
3-
tket2-py/target/
3+
tket-py/target/
44
/dist
55

66
# Python caches

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ repos:
9393
- id: py-test
9494
name: pytest
9595
description: Run python tests
96-
# Ensure that we are using the local version of `tket2-eccs` and not the one from PyPI
96+
# Ensure that we are using the local version of `tket-eccs` and not the one from PyPI
9797
entry: uv run -- sh -c "maturin develop && pytest --cov=./ --cov-report=html"
9898
language: system
9999
files: \.py$

0 commit comments

Comments
 (0)