Skip to content

ci: Use uv instead of poetry#322

Merged
einarwar merged 1 commit into
mainfrom
use-uv-instead-of-poetry
Jun 13, 2025
Merged

ci: Use uv instead of poetry#322
einarwar merged 1 commit into
mainfrom
use-uv-instead-of-poetry

Conversation

@einarwar
Copy link
Copy Markdown
Contributor

Why is this pull request needed?

uv is quickly becoming the de-facto tool for everything package related. Its also much faster than poetry

What does this pull request change?

Replaces usage of poetry with uv. This applies to both dependency management, package installations and CI. Also updated docs

This pull request introduces significant changes to the project, primarily focusing on migrating from Poetry to uv for dependency and environment management, as well as updating the Docker setup and CI workflows. These changes aim to modernize the tooling, improve caching, and streamline dependency management.

Migration to uv:

  • Replaced Poetry with uv for dependency management in api/Dockerfile and api/pyproject.toml. Updated commands to use uv sync, uv add, and uv remove for managing dependencies. [1] [2] [3]
  • Updated the development guide to reflect the use of uv instead of Poetry for dependency installation and management. [1] [2]

CI Workflow Updates:

  • Updated .github/workflows/linting-and-checks.yaml to replace setup-python with setup-uv, enabling caching and using uv commands for dependency installation and running checks. [1] [2]

Docker Configuration Changes:

  • Replaced the base Python image with ghcr.io/astral-sh/uv:bookworm-slim in api/Dockerfile. Introduced multi-stage builds to optimize the final image by excluding development dependencies.
  • Simplified docker-compose.override.yml by removing the build section for the api service.

Project Configuration Updates:

  • Refactored pyproject.toml to use the project table format and updated dependency definitions to align with uv requirements.
  • Added build configuration to radixconfig.yaml to enable BuildKit and caching for improved build performance.

Issues related to this change:

Closes #321

@einarwar einarwar requested a review from a team as a code owner June 10, 2025 08:29
Copy link
Copy Markdown
Contributor

@sindre-nistad sindre-nistad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good,
We may need to test it on ARM64-based architectures in case the builder stage needs to install some compilers

Comment thread api/Dockerfile Outdated
Comment thread api/Dockerfile Outdated
Comment thread .github/workflows/tests.yaml
Copy link
Copy Markdown
Collaborator

@eoaksnes eoaksnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good 😄

Kudos for description of the changes done in PR overview 👍

Comment thread api/Dockerfile
@einarwar
Copy link
Copy Markdown
Contributor Author

Kudos for description of the changes done in PR overview 👍

Ehh, yeah i totally did that myself ... 😅
image

@eoaksnes
Copy link
Copy Markdown
Collaborator

Kudos for description of the changes done in PR overview 👍

Ehh, yeah i totally did that myself ... 😅 image

Ment the conversation :)

Copy link
Copy Markdown
Contributor

@mariuswinger mariuswinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvements! Would prefer still having dev and prod targets for api/Dockerfile, so maybe add that back again using the feedback?

Comment thread api/Dockerfile Outdated
Comment thread api/pyproject.toml Outdated
@einarwar einarwar requested a review from mariuswinger June 10, 2025 11:48
@einarwar einarwar force-pushed the use-uv-instead-of-poetry branch from 3b7514f to c18601e Compare June 13, 2025 11:24
@einarwar einarwar changed the title Use uv instead of poetry ci: Use uv instead of poetry Jun 13, 2025
@einarwar einarwar force-pushed the use-uv-instead-of-poetry branch from c18601e to 20b993a Compare June 13, 2025 11:36
Copy link
Copy Markdown
Contributor

@mariuswinger mariuswinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@einarwar einarwar merged commit 5920fdd into main Jun 13, 2025
10 checks passed
@einarwar einarwar deleted the use-uv-instead-of-poetry branch June 13, 2025 11:44
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.

Migrate from poetry to uv

4 participants