hotfix: Apply UV to Makefile & workflows#1329
Merged
Merged
Conversation
Workflows: replace `pip install json-schema-for-humans` + bare `python` call with a single `uv run --with` invocation in deploy-docs-prod, deploy-docs-staging, and validate-docs-site. Makefile: switch every `python`, `pip`, and `poetry run` call to `uv run` (or `uv run --with` where deps are needed). Affects add-copyright, notebooks (sidebar updaters), template-schema-docs, test-descriptions, verify-copyright, and yearly-releases targets. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
PR SummaryThis PR replaces the installation and use of Poetry with the uv tool across multiple GitHub workflows and within the Makefile. The changes primarily modify steps for documentation deployment and script execution:
Overall, the changes streamline the setup process by centralizing script execution through uv, improving consistency across the repository's automation workflows. Test Suggestions
|
Contributor
Validate docs site✓ INFO: A live preview of the docs site is available — Open the preview |
Contributor
Lighthouse check resultsShow Lighthouse scoresFolder depth level checked: 0 Commit SHA: 6f2fa99 Modify the workflow to check a different depth:
|
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.
Pull Request Description
What and why?
Hotfix swapping
documentationPython toolchain from Poetry + pip to uv:373275c30— ci: Replace Poetry install step with uv setupdeploy-docs-prod.yaml,deploy-docs-staging.yaml,publish-llm-markdown.yaml,validate-docs-site.yaml), the curl-based Poetry installer step is replaced withastral-sh/setup-uv@v5.0afe9455d— Use uv for all Python script invocationsOnce uv is the installer, every Python entry point should also go through uv so that CI and local dev both get reproducible, ephemeral envs without polluting system Python or relying on Poetry being present:
Workflows
Generate template schema docsstep drops the separatepip install json-schema-for-humansline and runs the generator viauv run --with json-schema-for-humans python ….Makefile (
site/Makefile)python,pip, andpoetry runcall is rewritten touv run …(oruv run --with …where deps are needed). Affectsadd-copyright,notebooks,template-schema-docs,test-descriptions,verify-copyright, andyearly-releases.uvon their PATH; they no longer need a working Poetry install to run the affectedmaketargets.How to test
Prerequisite — UV installed locally
Smoke-test the Makefile targets that changed
Run these from
site/. Each maps directly to a line in commit0afe9455d:The two above are the safest standalone targets — no source clone required. If they exit cleanly, the
uv run python …rewrites are working.Full end-to-end check via
make get-sourceFor a deeper test (and to get rid of the Python docs render errors when you call
quarto previeworquarto renderlocally), run the consolidatedget-sourcetarget on this branch (HEAD):cd site make get-sourceWhen prompted by
Enter release tag (example: v2.8.10, or HEAD for latest):, enterHEAD.What needs special review?
Can someone smarter than me actually confirm this fix is best practice for the security issue we've been dealing w/ pls & ty!!
Dependencies, breaking changes, and deployment notes
Without this PR, other PR workflows/local branches will throw weird errors on render.
Release notes
n/a
Checklist