-
Notifications
You must be signed in to change notification settings - Fork 2
Migrate dependency management from Poetry to uv #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…nd update README Co-authored-by: mihow <158175+mihow@users.noreply.github.com>
|
@copilot run some commands to test if it works |
Tested the migration successfully! Here's what I verified: ✅ All commands from the updated README work as expected. The migration is fully functional! Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
mihow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising! Add a git workflow to install the package and test a command. Make a placeholder step for running our test suite (uv test, etc)
Co-authored-by: mihow <158175+mihow@users.noreply.github.com>
Added GitHub Actions CI workflow in commit 76e46e3. The workflow includes: ✅ Multi-version Python testing (3.9, 3.10, 3.11, 3.12) The workflow runs on pushes and PRs to main branch. The test suite step includes a TODO comment and falls back gracefully if tests aren't fully configured yet. |
mihow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the required python version >py10. update the test matrix, just test py12 in the workflows. How does this project manage optional dependencies, if there are any? do the workflows test any optional deps?
…3.12, and add research extras testing Co-authored-by: mihow <158175+mihow@users.noreply.github.com>
Updated in commit f43ff1c: ✅ Python requirement changed to
The workflow now runs |
Migrates project from Poetry to uv, adopting PEP 621 standard format for modern Python packaging.
Changes
pyproject.toml
poetry-core→hatchling[tool.poetry]→[project](PEP 621)^1.0) → minimum version constraints (>=1.0)[project.optional-dependencies]>=3.10README.md
poetry install→uv syncpoetry shell→source .venv/bin/activatepoetry run→uv runGitHub Actions CI Workflow
.github/workflows/ci.ymlfor continuous integrationuv sync --extra dev --extra researchami-dataset,ami-classification)uv run pytestMigration Example
Before:
After:
Original prompt
Objective
Migrate the project from Poetry to uv for dependency management, following modern Python packaging standards and best practices.
Background
uv is a modern, extremely fast Python package manager from Astral (creators of Ruff). It offers:
Tasks
1. Convert pyproject.toml to PEP 621 Format
Current file location:
pyproject.tomlConvert from Poetry-specific format to modern PEP 621 standard:
2. Update README.md
Update the Setup and Usage sections to reflect uv instead of Poetry:
Changes needed in README.md:
Replace the Setup section (lines 22-37) with:
.envor copy.env.exampleand update the values[Optional] Conda + uv
An optional way to setup the environment is to use Conda for creating and managing the Python environment, while using uv for managing the packages and dependencies.
environment.yml:conda env create -f environment.ymlconda activate ami-mluv syncExample for running a script (in the activated environment):
Alternatively, one can run scripts without activating the environment:
The
uv runcommand automatically uses the project's virtual environment.