chore: migrate from Poetry to uv with tox-uv#163
Conversation
- pyproject.toml: convert to PEP 621 with uv_build backend (package = false since this repo only hosts docs / scripts and isn't published). - pyproject.toml: drop the orphan `[poetry.group.dev.dependencies]` table (was empty under the wrong section header, never used). - Fix `license = "Apache-2.0 license"` typo (Poetry-era cargo-culted string) to the SPDX identifier `Apache-2.0`. - Drop poetry.lock; commit uv.lock as the source of truth. - checks.yml + deploy.yml: replace `pip install poetry && poetry install` with `astral-sh/setup-uv@v6` (pinned to 0.11.15) + `uv sync --frozen`; tox calls now run via `uv run tox -e <env>`. - tox.ini: add `uv_seed = true` so any future env that needs pip gets it for free, consistent with the rest of the Valory fleet. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`check-submodules-versions` flips red whenever any downstream cuts a release between submodule bumps — that's expected and addressed by the routine submodule-bump PRs. Reorder it to the end of the job so copyright / spelling / doc-links / markdownlint still run and report on every PR instead of being skipped behind a stale-submodule fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Heads-up: the Reordered the step (e1631c3) so it runs last, which means the other checks (copyright / spell / doc-links / markdownlint) now report on every PR instead of being skipped behind the stale-submodule fail. If you want to keep the migration green, easiest path is to either:
|
|
Adding to the prior comment: with the submodule check moved to the end, |
DIvyaNautiyal07
left a comment
There was a problem hiding this comment.
Migration is incomplete on developer docs (P1)
The CI workflows are migrated, but several developer-facing files still tell users to run Poetry. After this merges, those commands fail on a uv-only machine:
README.mdlines 8, 16, 21, 23, 29, 36 —Poetry >= 2.0.0,poetry install --no-root,poetry run tox -e docs-serve,poetry env info --path,poetry run tox -e docsCONTRIBUTING.mdlines 8, 29, 30 —Poetry for dependency management,poetry install --no-root,poetry shellCLAUDE.mdlines 35-36 —poetry shell,poetry install --no-root
(The Poetry references in docs/mech-client/index.md are about the mech-client tool itself and look intentional — left alone.)
| [tox] | ||
| envlist = docs, docs-serve, check-copyright, check-doc-links, spell-check, check-submodules-versions | ||
| ; tox-uv: seed venvs with pip so tools that import pip._internal keep working. | ||
| uv_seed = true |
There was a problem hiding this comment.
uv_seed = true is a tox-uv plugin directive, but tox-uv is not in uv.lock — the resolved tox is plain tox==3.28.0 from tomte[tox,docs]==0.2.15. Tox 3 silently ignores unknown global keys, so this is a no-op. The comment claims pip seeding is happening; it isn't. Either add tox-uv to deps (note: that requires bumping tox to 4+), or drop this directive and the comment.
There was a problem hiding this comment.
Good catch — fixed in c07078c. Dropped uv_seed = true and the comment; the dep set resolves tox==3.28.0 from tomte[tox,docs]==0.2.15, so the directive was a silent no-op. If/when we bump tomte to a version that ships tox-uv, the seed can come back along with it.
`uv_seed` is a tox-uv plugin directive, but tox-uv isn't installed for this repo — the resolved tox is plain `tox==3.28.0` pulled in by `tomte[tox,docs]==0.2.15`. Tox 3 silently ignores unknown global keys, so the line and its comment were promising a behavior that never happened. Remove both rather than leave a misleading no-op. If/when this repo bumps tomte (and therefore tox) to a version that ships tox-uv, the seed can come back along with it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LOCKhart07
left a comment
There was a problem hiding this comment.
Reviewed the Poetry → uv migration. The functional change is sound: setup-uv@v6 pinned to 0.11.15, uv sync --frozen for reproducible installs, uv run tox -e … preserves tox's own per-env isolation (tox 3.28.0 builds envs via virtualenv, which seeds pip — so dropping uv_seed is genuinely safe, not just a no-op fix). Version constraints are exact equivalents of the old Poetry ones (^3.10→>=3.10,<4, ^1.0.5→>=1.0.5,<2, tomte pin unchanged), and [tool.uv] package = false correctly replaces package-mode = false with no build-system needed. Approving.
Three non-blocking follow-ups, all on the description rather than the code:
-
Description + commit
bce35f7are inaccurate. Both say "Convertpyproject.tomlto PEP 621 with theuv_buildbackend", but the finalpyproject.tomlhas no[build-system]/uv_buildbackend at all — correctly so, sincepackage = falsemakes one unnecessary. Suggest rewording to "no build backend (package = false)" so future readers aren't misled. -
Summary is stale re:
tox.ini. It still lists "Adduv_seed = truetotox.ini… (fleet convention)", but that was reverted inc07078cafter the review above, andtox.iniis no longer in the changed files. That bullet should be dropped/replaced so the Summary matches the diff. -
Optional —
checks.ymlstep ordering. Moving the submodule check last fixes only that step blocking the others; an earlier failing step (e.g.check-copyright) still skips everything after it, since Actions stops on first failure. If the goal is "every check always reports", the steps needcontinue-on-error: trueorif: always(). Not required here.
Note: I did not line-audit uv.lock; relying on the locally-verified uv lock --check + uv sync --frozen + uv run tox -e check-copyright.
|
@LOCKhart07 — thanks for the careful review. Addressed nits 1 + 2 in the PR description above:
|
Output of `make prepare-release` (`scripts/check_submodule_release_updates.py --fix`): - mech v0.31.1 → v0.33.0 - mech-client v0.20.1 → v0.21.0 - mech-server v0.8.1 → v0.8.2 - open-aea v2.2.1 → v2.2.6 - open-autonomy v0.21.19 → v0.21.22 Unblocks the `check-submodules-versions` CI job, which was the last remaining red on this branch — pins were stale on `main` and getting flagged. hello-world (v0.4.0) and open-acn (no release tags) untouched.
`docs/index.md` links to a Google Drive doc explicitly marked "Access temporarily limited to Accelerator participants." The unauthenticated link checker always sees 401 on it by design, so the URL belongs in `URL_SKIPS` next to the other intentionally unreachable links (internal RPCs, IPFS placeholders, etc.). Unblocks the last red `check-doc-links` step on this branch.
| "http://127.0.0.1:8716/funds-status", | ||
| # Auth-gated Google Drive doc (Accelerator participants only); the | ||
| # unauthenticated link checker always sees 401 by design. | ||
| "https://drive.google.com/file/d/1YPe2RFMjf_YPsrldHuwzBHTYwCCy22C8/view", |
There was a problem hiding this comment.
wait this is supposed to be caught! It means something is wrong, pls undo it.
There was a problem hiding this comment.
You're right — URL_SKIPS is meant for links that are unreachable by design (RPC endpoints, IPFS placeholders, etc.), not for muting a content link that genuinely is broken / auth-gated. Adding the Drive URL to it defeats the check.
Reverted in 56c6f83. The check-doc-links job goes back to its pre-existing red on this branch (same red exists on main — the auth-gated https://drive.google.com/file/d/1YPe2RFMjf_YPsrldHuwzBHTYwCCy22C8/view in docs/index.md line 16, added by 2144c95 "Chore (docs): New naming convention" with the explicit "Access temporarily limited to Accelerator participants" caveat).
Two ways forward, both outside the Poetry → uv migration scope but happy to follow up:
- Replace the auth-gated Drive link in
docs/index.mdwith a public-readable alternative (does one exist for the Accelerator integration guide?), or - Remove the bullet entirely until a public version is published.
Want me to open a separate PR for one of those, or leave it for whoever owns the docs index?
There was a problem hiding this comment.
Resolved properly in 9b5de8a — the auth-gated Drive PDF was migrated to a public page at https://stack.olas.network/pearl/agent-integration-checklist, so docs/index.md:16 now points at that and drops the access-restriction caveat. check-doc-links passes locally; no URL_SKIPS change needed.
…ink" This reverts commit 6acaa3c.
The auth-gated Google Drive PDF (`Accelerator participants only`) has been migrated to a public page at https://stack.olas.network/pearl/agent-integration-checklist. Swap the link and drop the access-restriction caveat so the unauthenticated `check-doc-links` job stops 401-ing on it.
Summary
pyproject.tomlto PEP 621 with no build backend (package = false, since this repo only hosts docs / scripts and isn't published —[build-system]is intentionally omitted).poetry.lock; commituv.lockas the source of truth.pip install poetry && poetry installinchecks.yml+deploy.ymlwithastral-sh/setup-uv@v6(pinned to0.11.15) +uv sync --frozen; tox calls now route throughuv run tox -e <env>.[poetry.group.dev.dependencies]table (was under the wrong section header —[poetry.group...]instead of[tool.poetry.group...]— and was empty, so it never did anything).license = "Apache-2.0 license"typo to the SPDXApache-2.0.checks.ymlsubmodule-versions step to run last so other steps still report.Verified locally
uv lock --checkuv sync --frozenuv run tox -e check-copyright✅uv run tox -e check-submodules-versionsran cleanly (exited 1 because submodule pins are stale onmain, unrelated to this PR)Test plan
checkspasses (submodule / copyright / spell / doc-links / markdownlint)build-and-deploybuilds the site and publishes to Pages