Skip to content

Conversation

@mridang
Copy link
Collaborator

@mridang mridang commented Dec 20, 2025

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 with ruff check ., and type checking with ty check --no-progress. The complete test suite passes via pytest --junitxml=build/reports/junit.xml, with Docker-dependent tests automatically skipped when Docker is unavailable.

Checklist:

  • I have updated the documentation accordingly.
  • I have assigned the correct milestone or created one if non-existent.
  • I have correctly labeled this pull request.
  • I have linked the corresponding issue in this description.
  • I have requested a review from at least 2 reviewers
  • I have checked the base branch of this pull request
  • I have checked my code for any possible security vulnerabilities

@mridang mridang self-assigned this Dec 20, 2025
Replaced Poetry with uv for dependency management and mypy with ty for type checking. Updated build backend to setuptools with uv lockfile support. Modified all development tooling including devbox, lefthook, Dockerfile, README, and CI workflows to use the new Astral ecosystem tools.

uv's Rust-based resolver provides significantly faster dependency resolution and installation compared to Poetry. ty offers substantial performance improvements over mypy while maintaining type safety. This migration creates consistency across all Python tooling (ruff, uv, ty) within the Astral ecosystem.
@mridang mridang force-pushed the chore/uv-ty-migration branch from b5ba3a7 to bb65dc7 Compare December 20, 2025 23:30
@mridang mridang merged commit 4e61b0d into beta Dec 21, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants