chore(build): migrate to astral tooling #87
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Migrated the project from Poetry to uv and from mypy to ty. Replaced the build backend with setuptools, added a uv lockfile, and updated all dev tooling (devbox, lefthook, Dockerfile, README, CI workflows) to use uv and ty.
Motivation and Context
This migration brings several key improvements to the project's tooling and developer experience.
uv's Rust-based resolver is significantly faster than Poetry's Python-based one, providing near-instantaneous dependency resolution and installation. This aligns the project with the official Astral tooling ecosystem, recommended by the creators of ruff. The uv lockfile format is more transparent and easier to audit than Poetry's, while uv's caching and resolution strategies ensure more consistent builds across different environments.
Switching from mypy to ty provides substantial performance improvements in type checking. ty is also part of the Astral ecosystem, creating consistency across all Python tooling (ruff, uv, ty). As a modern type checker actively developed with focus on speed and accuracy, ty represents the current state of the art in Python type checking.
The overall developer experience improves significantly with faster environment setup, unified tooling within a single ecosystem, and maintained alignment as the Astral ecosystem evolves with integrated improvements.
How Has This Been Tested?
Verified formatting with
ruff format ., linting withruff check ., and type checking withty check --no-progress. The complete test suite passes viapytest --junitxml=build/reports/junit.xml, with Docker-dependent tests automatically skipped when Docker is unavailable.Checklist: