Skip to content

Conversation

@mendymm
Copy link
Contributor

@mendymm mendymm commented Jul 22, 2025

Description

Migrate from poetry to uv
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. If this change fixes any issues please put "Fixes #XX" in the description. Please also ensure to add the appropriate labels to the PR.

Guidelines

  • My code follows the style guidelines of this project (formatted with Ruff)

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation if needed

  • My changes generate no new warnings

  • I have tested this change

  • Any dependent changes have been merged and published in downstream modules

  • I have added all appropriate labels to this PR

  • I have followed all of these guidelines.

How Has This Been Tested? (if applicable)

  • I built the docker image, and it worked. (it was very fast!!)

Additional Information

IIRC I still need to switch the version script.

I also want to post this PR and test to see if I broke CI, and fix anything I might have missed.

Summary by Sourcery

Migrate the project’s dependency management and build tooling from Poetry to Uv (using Hatchling) and update all related configurations, scripts, and documentation to use uv run instead of poetry run.

Enhancements:

  • Replace Poetry-specific pyproject.toml sections with PEP 621-compliant dependencies, dependency-groups, Hatchling build backend, and tool.uv configuration.
  • Update Dockerfile to install Uv, sync dependencies via uv sync, and replace Poetry install steps with Uv commands.
  • Adjust Nix shell configuration to use Uv instead of Poetry.

CI:

  • Modify GitHub Actions workflows to invoke tests and commands via uv run pytest and uv run tux instead of Poetry.

Documentation:

  • Revise all documentation, READMEs, and CLI help to reference uv run and the new uv.lock file in place of Poetry.
  • Update Docker usage docs and examples to use uv run tux for container commands.

Tests:

  • Update testing READMEs and scripts to run tests and coverage through Uv.
  • Rename lock file references from poetry.lock to uv.lock across project.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 22, 2025

Reviewer's Guide

This PR migrates the project’s dependency management from Poetry to Uv (hatchling), replacing all Poetry configurations, lockfiles, and CLI invocations with Uv equivalents. It updates pyproject.toml and build backends, swaps out lockfiles, revises the Docker build and development pipelines to use uv sync/uv run, and refreshes documentation and CI workflows to reference uv run instead of poetry run.

File-Level Changes

Change Details Files
Replace Poetry config with Uv/hatchling in pyproject.toml
  • Remove all [tool.poetry] sections and Poetry build-system entries
  • Add hatchling build-backend and Uv default-groups and dependency-groups
  • Introduce uv.lock, remove poetry.lock and poetry.toml
pyproject.toml
uv.lock
poetry.lock
poetry.toml
Update Dockerfile to install and use Uv
  • Install Uv via pip instead of Poetry
  • Swap poetry install steps for uv sync --locked and uv sync --locked --no-install-project
  • Adjust Docker cache mounts to target Uv caches
Dockerfile
Bulk replace CLI invocations from poetry to Uv
  • Switch all poetry run tux to uv run tux across docs and READMEs
  • Update direct pytest and subcommands to uv run pytest where used
docs/content/dev/coverage.md
docs/content/dev/docker_development.md
docs/content/dev/database.md
docs/content/dev/cli/index.md
DOCKER.md
README.md
tests/README.md
tux/cli/README.md
docker-compose.yml
docker-compose.dev.yml
Adjust GitHub Actions to use Uv in CI
  • Replace poetry run pytest and poetry run commands with uv run ... in test workflow
.github/workflows/tests.yml
Update developer shell environment to Uv
  • Replace Poetry with Uv package in shell.nix
shell.nix

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@kzndotsh kzndotsh self-assigned this Aug 10, 2025
@kzndotsh kzndotsh changed the base branch from main to v0.1.0 August 10, 2025 12:09
@kzndotsh kzndotsh added this to the 0.1.0 milestone Aug 10, 2025
@kzndotsh kzndotsh merged commit eae4987 into allthingslinux:v0.1.0 Aug 10, 2025
11 of 13 checks passed
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.

3 participants