-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Migrate Project from Poetry to uv for Dependency Management
This initiative aims to replace Poetry with uv for all dependency management within the Python project. This includes updating the project's dependency definition, ensuring a smooth transition for local development, and crucially, updating our GitHub Actions workflows to leverage astral-sh/setup-uv for streamlined setup.
Problem
Currently, our Python project uses Poetry for dependency management. While functional, this setup presents several challenges, particularly within our CI/CD pipelines:
- Manual Poetry Installation in CI: Our GitHub Actions workflows currently require a manual
pipx install poetrystep. setup-pythonLimitations: Theactions/setup-pythonaction doesn't natively support installing package managers like Poetry.- Performance:
uvoffers significantly faster dependency resolution and installation. - Simplified Workflows: Transitioning to
astral-sh/setup-uvwill provide a single, optimized action for setup.
Impact
Migrating to uv will result in:
- Faster Dependency Operations: Reduced installation and resolution times for both local development and CI/CD.
- Simplified CI/CD Workflows: Elimination of manual Poetry installation steps.
- Improved Maintainability: A more modern and efficient dependency management tool.
- Consistent Environment Setup: A more reliable and predictable environment across development and CI.
Solution / Tasks
- Convert
pyproject.toml: Adjustpyproject.tomlforuvcompatibility and generateuv.lockusinguv sync. - Update Local Development: Document and instruct developers to use
uvfor dependency management. - Migrate GitHub Actions: Replace
actions/setup-pythonand manual Poetry installs withastral-sh/setup-uv@v1. Configure it to install dependencies. - Update CI/CD Scripts: Adjust any custom scripts to use
uv runor executables within theuv-managed virtual environment. - Testing: Thoroughly test local dependency management and all CI/CD pipelines to ensure correct functionality and caching.
Expected Outcomes
- All project dependencies are managed by
uv. - Local development setup is streamlined with
uv. - GitHub Actions workflows are simplified, faster, and more robust by using
astral-sh/setup-uv. - Reduced CI/CD build times.
- Removal of manual Poetry installation steps in CI.
Robby3St
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request