-
Notifications
You must be signed in to change notification settings - Fork 1
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
Continue migration to uv #705
Open
tomwillis608
wants to merge
5
commits into
main
Choose a base branch
from
chore/692/migrate-to-uv
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2ccc40a
Update CONTRIBUTING for uv
tomwillis608 d58f836
Update README with uv instructions.
tomwillis608 abedf70
Add poetry to uv ADR
tomwillis608 1b00ab8
Merge branch 'main' into chore/692/migrate-to-uv
tomwillis608 1a5442a
Merge branch 'main' into chore/692/migrate-to-uv
tomwillis608 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
docs/architectural_decision_records/016-use-uv-instead-of-poetry.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Replace Poetry with uv for Dependency Management | ||
|
||
## Context | ||
|
||
Our project previously used **Poetry** for dependency management, packaging, and versioning. While Poetry provides a comprehensive toolset for Python projects, we identified several pain points: | ||
|
||
- **Performance**: Poetry can be slow, particularly in resolving dependencies and managing lockfiles. | ||
- **Complexity**: The Poetry CLI has a large feature set, but we were primarily using it for dependency management and builds, making some features redundant. | ||
- **Compatibility**: Our project needs fast, reliable dependency management with reproducible builds, and we are looking for a more minimalistic and modern solution. | ||
|
||
**uv** from **astal.sh** is a new Python packaging tool designed to simplify dependency management, improve performance, and provide reproducible builds with a straightforward workflow. | ||
|
||
## **Decision** | ||
|
||
We will replace **Poetry** with **uv** for managing dependencies, creating lockfiles, and building the project. | ||
|
||
## Alternatives Considered | ||
|
||
1. **Continue Using Poetry** | ||
|
||
- Pros: | ||
- Well-established and widely adopted in the Python community. | ||
- Comprehensive feature set. | ||
- Cons: | ||
- Slower dependency resolution and build times. | ||
- More complex than needed for our current workflow. | ||
|
||
2. **Switch to pip-tools** | ||
|
||
- Pros: | ||
- Lightweight toolset for managing dependencies. | ||
- Works well with native `pip`. | ||
- Cons: | ||
- No built-in support for project metadata (PEP 621). | ||
- Requires additional tools to handle building and packaging. | ||
|
||
3. **Adopt uv** (Chosen) | ||
- Pros: | ||
- Faster dependency resolution and lockfile creation. | ||
- Native support for `pyproject.toml` and PEP 621. | ||
- Minimalistic and modern toolchain. | ||
- Cons: | ||
- Newer tool with a smaller community compared to Poetry. | ||
- Requires some workflow adjustments (e.g., versioning). | ||
|
||
## Consequences | ||
|
||
### Positive Impacts | ||
|
||
- **Faster Builds**: uv provides faster dependency resolution and package builds. | ||
- **Simplified Workflow**: The tool is more aligned with our goal of a lean, efficient build process. | ||
- **Reproducible Builds**: uv generates a `uv.lock` file to ensure consistent environments across installations. | ||
|
||
### Negative Impacts | ||
|
||
- **Learning Curve**: Team members need to become familiar with uv’s CLI. | ||
- **Ecosystem**: uv is a newer tool, so it may have fewer third-party resources and integrations compared to Poetry. | ||
|
||
## Status | ||
|
||
Approved | ||
|
||
## **Consequences of Not Making This Change** | ||
|
||
- Continued slow builds and dependency resolution times. | ||
- Complexity in maintaining our dependency management workflows. | ||
- Potential frustration with overly complex tooling for our use case. |
Oops, something went wrong.
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.
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.
Should this be
pip install tomlq
?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.
Basilio, we are experimenting with
uv
to speed things up.uv
has a pip compatibility mode, which we are using in this row. The use ofuv
is deliberateThere 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.
Good to know. I'm not familiar with
uv
, I'll check it out