layouttk 0.5.0

GDSII and OASIS layout toolkit for layer extraction, verification, and window clipping
Documentation
# Release and recovery

layouttk takes its version from Cargo.toml. A version tag runs the full test matrix and publishes the tested Rust and Python archives. Ordinary branch CI builds artifacts for review. PyPI displays the English package README. The searchable [Read the Docs manual](https://layouttk.readthedocs.io/) and versioned docs.rs guides use the same Markdown sources. The GitHub landing page also contains Simplified Chinese navigation.

## Prepare a version

1. Update Cargo.toml and Cargo.lock, the version in the public documentation URLs, and the English project metadata. Preserve attribution when updating dependencies or adapted material. Regenerate license notices with `python scripts/license_notices.py` when the locked dependency set changes.
2. Build the guides with `cargo doc --locked --no-deps` and run `python3 scripts/check_docs.py`. For Read the Docs, install `docs/requirements.txt`, run `python -m sphinx -W -b html docs/en target/sphinx`, then run `python scripts/build_chinese_docs.py target/sphinx` to add the Chinese manual. Install the release wheel and test the tutorial and recipes. Check the long description with `python -m twine check --strict dist/*`.
3. Require the three platform wheels, the source distribution, the Rust tests at the minimum supported version and the packaging dry run to pass on the release commit. Validate the proposed tag with `python3 scripts/release.py tag v0.2.0`, substituting the new version.
4. Push an annotated `v<VERSION>` tag for the verified commit. The tag runs the matrix again. After all three standalone CLI packages pass their tests, the Rust publish job compares its archive with the CI archive byte for byte before publishing. The Python publish job uses the wheels and sdist from that same run. It waits for the public guide links on docs.rs to serve the released documentation.
5. Once the registry artifacts have been verified, `audit-homepage` checks the live Python and CLI examples, canonical URLs, and language alternates on both homepage editions. Run `python3 scripts/check_docs.py --homepage` to check them locally. If they differ, check the site deployment and rerun the job after it completes. The `github-release` job attaches the verified Python wheels, source archives, standalone CLI packages and SHA-256 manifest. It publishes notes from `docs/release-notes/v<VERSION>.md` when supplied. A rerun reuses assets with matching SHA-256 digests. Confirm the Read the Docs `stable` build, its English and Simplified Chinese entry points, and the live homepage copy and `llms.txt` links. [Read the Docs](https://layouttk.readthedocs.io/)

Before tagging, review both READMEs and both language editions for changes to installation, public APIs, CLI flags, limitations and examples. CI builds both HTML manuals and runs the English and Simplified Chinese introductory Python examples against the built wheel. Update the project homepage and `llms.txt` in the website repository when their copy or links are affected. The homepage uses the Python and CLI examples from the Simplified Chinese quick start. [Project homepage](https://zwh42.github.io/layouttk/) · [Website repository](https://github.com/zwh42/zwh42.github.io)

After the CLI archives appear, use their SHA-256 digests to update the project's Homebrew formula on the default branch. Verify the installed CLI version from the tap. To add CLI archives to an existing release, run the **Attach CLI to an existing release** workflow for its published version tag.

## Registry authentication

Both registries use GitHub OIDC for subsequent versions. The publisher registration uses repository `zwh42/layouttk`, workflow `release.yml`, and the appropriate GitHub environment (`pypi` or `crates-io`). The environments allow release tags. Only the publish jobs request write access to an ID token. A new PyPI name can be registered through a pending publisher. A crate needs an initial upload before its owner can register its trusted publisher. [PyPI publisher setup](https://docs.pypi.org/trusted-publishers/adding-a-publisher/) · [crates.io trusted publishing](https://blog.rust-lang.org/2025/07/11/crates-io-development-update-2025-07/)

## Recover a partial publication

Check the first failing job and the registry's version-specific file list. After fixing an environment or registry configuration, rerun failed jobs in the original tagged run. The workflow accepts an existing crate only if the published digest matches the staged archive. PyPI can receive missing artifacts, and the final audit compares every expected SHA-256 with the registry. A different digest or a yanked file requires investigation. To change a public artifact or its README, increment the version. Rebuilding files for an existing version can produce a different digest. [Cargo publishing](https://doc.rust-lang.org/cargo/reference/publishing.html) · [PyPI file metadata](https://docs.pypi.org/api/json/) · [GitHub rerun behavior](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/re-run-workflows-and-jobs)