Docs and Release
Commands and contracts for docs generation and release validation.
Implementation and distribution model
Distribution contract:
- canonical package index: PyPI
- canonical package name:
tqlint - canonical command:
tq - canonical install flows:
uv add,uv tool install,uvx --from tqlint tq
The build backend is maturin targeting the Rust CLI crate. Published artifacts install the compiled tq executable.
Docs generation
Reference artifacts are generated by tq-docsgen. CLI and config docs use narrow JSON manifests; rules docs are generated from Rust-owned metadata in tq-rules.
cargo run -p tq-docsgen --locked -- generate allcargo run -p tq-docsgen --locked -- generate clicargo run -p tq-docsgen --locked -- generate configcargo run -p tq-docsgen --locked -- generate rules
These commands regenerate:
docs/reference/cli.mddocs/reference/configuration.mddocs/guide/quickstart.mddocs/.vitepress/generated/rules-sidebar.tsdocs/reference/rules/index.mdand per-rule pages
Docs site build
mise run docs-bootstrapmise run docs-build
The local docs tasks bootstrap npm dependencies on demand when node_modules/.bin/vitepress is missing.
The docs site build runs the Rust docs generator first through package.json and then builds VitePress.
Repository and release verification
Repository-policy and release artifact checks are enforced by tq-release.
cargo run -p tq-release --locked -- verify-release-policy --repo-root .cargo package --workspace --lockedmise run release-buildcargo run -p tq-release --locked -- verify-artifact-contents --dist-dir dist
The release-policy verifier checks workspace versioning policy and the GitHub Actions Dependabot coverage policy together.
The artifact verifier inspects built wheels and sdists for repository-only paths such as scripts/, tests/, docs/, tmp/, and .github/. Wheel installer script locations under .data/scripts/ are allowed because that is where the packaged tq executable lives.
Release artifact shape
mise run release-build builds the source distribution plus a wheel for the current host platform.
The CI release wheel matrix builds the source distribution on Linux, then builds publishable wheels for Linux x86_64, macOS x86_64, macOS arm64, and Windows x86_64. The Linux wheel is built explicitly through maturin build --release --locked --compatibility pypi --zig so the platform tag is PyPI-compatible instead of a native linux_* tag. On SemVer tags, a separate CI attestation job promotes those validated build artifacts into the final validated-dist artifact that the publish workflow consumes without rebuilding.
Current artifacts are:
- wheels:
dist/tqlint-<version>-py3-none-manylinux_*.whldist/tqlint-<version>-py3-none-macosx_*_x86_64.whldist/tqlint-<version>-py3-none-macosx_*_arm64.whldist/tqlint-<version>-py3-none-win_amd64.whl
- source distribution:
dist/tqlint-<version>.tar.gz