Migrate from Poetry to uv#197
Merged
Merged
Conversation
The QC workflow's Poetry installer (snok/install-poetry@v1.3 + Poetry 2.4.0) has been broken since Feb 2026 with "Installing Poetry (2.4.0): An error occurred. Removing partial environment." Bumping the action alone didn't help — the failure is in the Poetry installer's own bootstrap, not workflow config. Rather than pinning Poetry to 1.x for forever, migrate to uv to match every other ingest in the org. - pyproject.toml: PEP 621 [project] table; dev deps moved to [dependency-groups.dev]; build backend hatchling. License normalized to BSD-3-Clause (SPDX). Added explicit setuptools<80 because eutils (transitive via oaklib) imports pkg_resources, which setuptools 80+ removed; Poetry used to bundle setuptools implicitly, uv doesn't. - .github/workflows/qc.yml: replace Poetry install + poetry install/run with astral-sh/setup-uv@v4 + uv sync + uv run. Bump matrix to ['3.10','3.11','3.12'] (3.9 is end-of-life and Poetry 2.x's Python-3.9 bootstrap was the original sticking point anyway). - Jenkinsfile: replace `python3.10 -m venv venv && pip install .` with `uv sync`; `awscli/boto3/s3cmd` install via `uv pip install` into the same venv; every `. venv/bin/activate && X` becomes `uv run X`. - Drop poetry.lock; replace with uv.lock. Local validation: `uv sync` clean, `uv run pytest` 25/25 pass, `uv run python run.py download` fetches all 4 files successfully.
The flake8<5.0.0 pin in tox.ini broke under Python 3.12 (importlib_metadata EntryPoints API change). Rather than untangle the flake8 + 8 plugin set, swap the whole linting toolchain for ruff — same checks (E/W/F/B/I) in one tool, modern, fast, and what the rest of the org uses. - pyproject.toml: add ruff to dev deps; [tool.ruff] config (line 100, E/W/F/B/I, ignore E203, target py310). - tox.ini: drop the [testenv:flake8] env (and its 8-package deps) plus the [flake8] config; add a one-line [testenv:ruff] env that runs `ruff check`. - .github/workflows/qc.yml: matrix back to ['3.10','3.11','3.12']; "Lint with flake8" → "Lint with ruff", direct `uv run ruff check`. - Code fixes ruff surfaced (5 errors total): 4 import-sort auto-fixes in tests + transform modules; 1 real `B018` useless expression in test_transform_class.py:51 (a bare attribute reference with no effect — removed). Two B905 zip()-without-strict in utils/transform_utils.py: explicit `strict=False` to preserve current truncate-to-shortest behavior.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Supersedes #196 (which tried to keep Poetry but pin to 1.8.5).
The QC workflow's Poetry installer (`snok/install-poetry` + Poetry 2.4.0) has been broken since 2026-02 with `Installing Poetry (2.4.0): An error occurred. Removing partial environment.` Bumping the action alone didn't help — the failure is in the Poetry installer's own bootstrap, not workflow config. Rather than pinning Poetry to a soon-to-be-unsupported 1.x for the long term, migrate kg-phenio to uv to match the rest of the org.
Changes
Local validation