layouttk 0.5.0

GDSII and OASIS layout toolkit for layer extraction, verification, and window clipping
Documentation
# Verifying the Python wheels

Each release rebuilds and installs its own wheels on three GitHub-hosted platforms. The wheel uses the CPython 3.11 stable ABI. The matrix exercises the oldest supported interpreter and a newer interpreter. Wheels target GIL-enabled CPython.

| Runner | Wheel target | Install test | Independent readers | Array libraries |
| --- | --- | --- | --- | --- |
| Ubuntu 24.04 | x86-64, manylinux_2_28 | CPython 3.11 | gdstk 1.0.2, KLayout 0.30.14, gdspy 1.6.13 | NumPy 1.26.4, PyTorch 2.15.0 CPU |
| macOS 15 | Apple Silicon arm64 | CPython 3.13 | gdstk 1.0.2, KLayout 0.30.14 | NumPy 2.4.6, PyTorch 2.15.0 |
| Windows Server 2025 | x86-64 | CPython 3.13 | gdstk 1.0.2, KLayout 0.30.14 | NumPy 2.4.6, PyTorch 2.15.0 CPU |

## What a pass verifies

1. pip installs the just-built wheel by its local pathname. The verifier matches the installed distribution and its recorded SHA-256 to that artifact and imports the native module from the installed package.
2. The Python suite runs from a temporary directory in isolated mode. Layouts written in gdstk and KLayout are read and rewritten, then checked with independent readers. The reverse direction starts with layouttk. Cases cover properties, irregular repetitions, transforms, names, geometry and units.
3. NumPy and PyTorch tests cover CPU array ownership, mutation, explicit copies, DLPack and geometry operations. Device-copy tests run when CUDA or MPS is present. Raster tests check OASIS layer geometry with KLayout and read the PNG output using Pillow. Linux also runs historical comparisons against gdspy. The job summary lists platform-specific skips.
4. Beginner and workflow examples run directly from the Markdown supplied with the release. The verifier requires the independent readers and core tensor cases on every platform.
5. A distribution job checks the combined set of three platform wheels and one source archive, including ABI tags, package metadata, README rendering and third-party notices. The source distribution is built and imported independently. Rust jobs also check the minimum supported toolchain, format, lints, tests, advisories and package assembly.

## Reproduce a wheel check

Download the wheel for your platform and the matching source distribution from the [PyPI file list](https://pypi.org/project/layouttk/0.5.0/#files). Unpack the source distribution for the tests and guides. Create an empty virtual environment, activate it, and run the following from the unpacked source root. Set the wheel pathname to the file you downloaded.

```sh
python -m pip install --no-index --no-deps --force-reinstall "$wheel"
python -m pip install pytest gdstk==1.0.2 klayout==0.30.14 numpy==2.4.6 torch==2.15.0 Pillow==13.0.0
python -I scripts/check_wheel.py "$wheel"
```

For the precise Linux configuration use NumPy 1.26.4 and the CPU PyTorch index. Install gdspy 1.6.13 with its build dependencies and pass `--require-gdspy` to require the legacy comparisons. In PowerShell assign the pathname to `$wheel`. Each platform summary reports the actual dependency versions, native extension, artifact digest, pass count and reasons for skips.

## Review documentation before committing code

Run `git config --local core.hooksPath .githooks` once per clone to enable the tracked `commit-msg` hook. It uses Python 3.11 or newer and reviews staged code and packaging changes. It lists changes to the English and Simplified Chinese manuals and READMEs, and checks that both READMEs contain the staged quick-start examples. It also checks the two published homepage editions and `llms.txt`.

After reviewing the affected APIs, CLI options, installation instructions and examples, add a commit-message trailer after a blank line.

```text
Docs-Review: manuals=updated readmes=updated site=release New mask API documented in both languages. Add the gallery links with the website release.
```

Use `updated` when staging a manual or README edit and `unchanged` when the code change needs no edit there. Use `site=unchanged` when the published content can stay as it is, or `site=release` with the follow-up when site changes or an offline check need to wait. Before publishing, check the website repository's `_pages/layouttk.md`, `_pages/layouttk-en.md` and `_pages/layouttk-llms.txt`. [Release verification](https://docs.rs/layouttk/0.5.0/layouttk/guides/releasing/)