alunduil / alunduil/zfs-replicate

uv replaces Poetry as the package manager, lockfile, and build backend

Aberta
#619 0 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement python
Linguagem predominante
Python
Estrelas
24
Forks
6
Merge médio
3h 11min
PRs com merge (30d)
49

Descrição

## Summary

Replace Poetry with `uv` throughout: `uv.lock` for `poetry.lock`, `uv sync` for
`poetry install`, `[project.dependencies]` for `[tool.poetry.dependencies]`, and
a `uv`-native build backend for `poetry-core`. Leave no Poetry behind.

## Motivation

Found while resolving #430.

This project already runs `uv` in CI. `ci.yml:25` uses
`tox-dev/action-pre-commit-uv`, so every pull request installs `uv` and then
separately installs Poetry through `.github/actions/setup-poetry`. Two Python
tool stacks cover one job.

The cost is concentrated in CI time. `python-tests` and `cli-entry-point` are
four-leg matrices apiece, so a pull request pays for eight `poetry install` runs
(`ci.yml:52`, `ci.yml:89`) before any test executes. Resolution and installation
are the slowest part of those jobs and the part `uv` improves most. #616 covers
folding those matrices together and reduces but does not remove the duplication.

Metadata gets simpler rather than harder. `pyproject.toml:10` currently declares
`dynamic = ["classifiers", "dependencies"]` so Poetry can generate classifiers
and keep its own dependency syntax. Under `uv`, dependencies become static
`[project.dependencies]` and the test group becomes a PEP 735
`[dependency-groups]` table, which drops the indirection and the comment
explaining it.

Set against that, the current setup works, and this touches CI, the
devcontainer, the release path, and the docs at once. It is worth doing when
there is appetite for the churn, not urgently.

## Scope

- `pyproject.toml`: static `[project.dependencies]`, `[dependency-groups]` for
the test group, drop `dynamic`, move `packages` (`pyproject.toml:43`) to the
chosen backend's equivalent so the sdist keeps carrying `zfs_test`.
- Generate `uv.lock`; delete `poetry.lock` and `poetry.toml`.
- Pick a build backend (`uv_build` or `hatchling`) and retire `poetry-core`.
- CI: replace `.github/actions/setup-poetry` with `astral-sh/setup-uv`, and
every `poetry install` / `poetry run` call in `ci.yml` and `release.yml`.
- `.devcontainer/devcontainer.json` and `.devcontainer/post-create.sh`: swap the
Poetry feature for `uv`.
- Docs: `README.md:62-63`, `CONTRIBUTING.md`, `CLAUDE.md`'s tool inventory, and
the Poetry reference in `.github/ISSUE_TEMPLATE/bug-report.yml`.
- `.claude/settings.json`: the pre-approved `poetry run pytest` permission.

## Acceptance criteria

- [ ] No file outside `CHANGELOG.md` mentions Poetry
- [ ] `uv sync` and `uv run pytest` reproduce the current suite result
- [ ] `uv build` produces an sdist containing both `zfs/` and `zfs_test/`, which
#498 checks
- [ ] Release publishing still works end to end

## Additional context

#618 tracks the nixpkgs derivation, which sets `build-system = [poetry-core]`
and needs updating with the backend change.

#616 and #558 both restructure the CI jobs this touches, so sequencing matters.

Dropping this project's Nix expressions in #617 removed the other argument for
moving, namely that `poetry2nix` is unmaintained while `uv2nix` is the maintained
path. That reasoning no longer applies; the case here is tooling count and CI
time.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start with pyproject.toml, ci.yml, release.yml, and the devcontainer files, then run the current test and build workflows for comparison. Check the listed README.md, CONTRIBUTING.md, CLAUDE.md, issue template, and settings files for Poetry references. Done means uv sync and uv run pytest reproduce the suite, uv build includes zfs/ and zfs_test/, release publishing works, and no file except CHANGELOG.md mentions Poetry.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
github-actions, python
Domínio
build-system, ci-cd, documentation, release
Tipo de issue
Refatoração
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
38/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.