Skip to content

Conversation

@amirhessam88
Copy link
Member

@amirhessam88 amirhessam88 commented Nov 19, 2025

Migrate from Poetry to uv

Summary

This PR migrates the project's dependency management and build system from Poetry to uv, a fast Python package installer and resolver written in Rust.

Motivation

  • Performance: uv is significantly faster than Poetry for dependency resolution and installation
  • Modern tooling: uv provides a unified interface for package management, virtual environment management, and project management
  • Better CI/CD: Faster CI runs due to improved caching and faster dependency resolution
  • Compatibility: uv maintains compatibility with existing Python packaging standards (PEP 517/518)

Changes

Removed

  • poetry.lock - Replaced with uv.lock
  • poetry.toml - No longer needed with uv

Added

  • uv.lock - New lock file generated by uv

Modified

.github/workflows/ci.yml

  • Replaced Poetry installation with astral-sh/setup-uv@v6 action
  • Added uv installation step with caching enabled
  • Updated workflow to use uv for dependency management
  • Added references to uv documentation in comments

pyproject.toml

  • Updated all poe tasks to use uv run instead of direct command execution
  • This ensures all commands run within the uv-managed virtual environment
  • Tasks affected:
    • add-trailing-comma
    • black
    • isort
    • flake8
    • mypy
    • test
    • tox

tox.ini

  • Updated test environment commands to use uv sync and uv build
  • Replaced Poetry commands with uv equivalents

Testing

  • ✅ All existing CI workflows continue to pass
  • ✅ Linting, testing, and build steps work with uv
  • ✅ All poe tasks function correctly with uv run
  • ✅ Tox environments properly use uv for dependency management

Migration Notes

For developers working on this project:

  1. Install uv:

    pipx install uv --python=$(which python) --force
  2. Migrate to uv:

    uvx migrate-to-uv 
  3. Sync dependencies:

    uv sync
  4. Install locked dependencies:

    uv sync --locked --all-extras --all-groups
  5. Run commands:

    poe check    # Linting
    poe test     # Testing
    poe format   # Formatting
  6. Run tox as uv tool:

    uv tool install tox
    poe tox

References

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8aadc30) to head (2f538d4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master        #6   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           25        25           
  Branches         1         1           
=========================================
  Hits            25        25           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amirhessam88 amirhessam88 added the enhancement New feature or request label Nov 19, 2025
@amirhessam88 amirhessam88 self-assigned this Nov 19, 2025
@amirhessam88 amirhessam88 merged commit 4f15769 into master Nov 19, 2025
7 checks passed
@amirhessam88 amirhessam88 deleted the amir/uv branch November 19, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants