Skip to content

hotfix: Apply UV to Makefile & workflows#1329

Merged
validbeck merged 3 commits into
mainfrom
beck/uv-hotfix
May 15, 2026
Merged

hotfix: Apply UV to Makefile & workflows#1329
validbeck merged 3 commits into
mainfrom
beck/uv-hotfix

Conversation

@validbeck

@validbeck validbeck commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Description

What and why?

Hotfix swapping documentation Python toolchain from Poetry + pip to uv:

373275c30 — ci: Replace Poetry install step with uv setup

  • In all four GitHub Actions workflows (deploy-docs-prod.yaml, deploy-docs-staging.yaml, publish-llm-markdown.yaml, validate-docs-site.yaml), the curl-based Poetry installer step is replaced with astral-sh/setup-uv@v5.
  • CI no longer needs Poetry at all for these workflows.

0afe9455d — Use uv for all Python script invocations

Once 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 docs step drops the separate pip install json-schema-for-humans line and runs the generator via uv run --with json-schema-for-humans python ….

Makefile (site/Makefile)

  • Every python, pip, and poetry run call is rewritten to uv run … (or uv run --with … where deps are needed). Affects add-copyright, notebooks, template-schema-docs, test-descriptions, verify-copyright, and yearly-releases.
  • Local contributors only need uv on their PATH; they no longer need a working Poetry install to run the affected make targets.

How to test

Prerequisite — UV installed locally

brew install uv
# or, cross-platform:
curl -LsSf https://astral.sh/uv/install.sh | sh

Smoke-test the Makefile targets that changed

Run these from site/. Each maps directly to a line in commit 0afe9455d:

cd site

# add_copyright.py via uv
make add-copyright

# verify_copyright_qmd.py via uv
make verify-copyright

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-source

For a deeper test (and to get rid of the Python docs render errors when you call quarto preview or quarto render locally), run the consolidated get-source target on this branch (HEAD):

cd site
make get-source

When prompted by Enter release tag (example: v2.8.10, or HEAD for latest):, enter HEAD.

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

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

validbeck and others added 2 commits May 15, 2026 11:35
Mirrors #1328 commits c8adb07 + 1bb449b
(final state: astral-sh/setup-uv@v5).

Co-authored-by: Cursor <cursoragent@cursor.com>
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>
@validbeck validbeck self-assigned this May 15, 2026
@validbeck validbeck added the internal Not to be externalized in the release notes label May 15, 2026
@validbeck validbeck requested review from nibalizer and nrichers May 15, 2026 19:11

@nrichers nrichers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :shipit:

@github-actions

Copy link
Copy Markdown
Contributor

PR Summary

This 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:

  • In the GitHub workflows (deploy-docs-prod.yaml, deploy-docs-staging.yaml, publish-llm-markdown.yaml, validate-docs-site.yaml), the step that previously installed Poetry has been replaced by a new step that uses the uv setup action (astral-sh/setup-uv@v5).
  • Commands that previously relied on invoking Python directly (including generating library docs, template schema docs, running copyright verification, and release note preparation) now use uv run to execute the associated scripts.
  • In the Makefile, all Python script executions have been updated to use uv run python ... in place of direct Python invocations. This affects several targets such as adding copyright,
    updating sidebar files, generating template schema docs, extracting test descriptions, verifying copyrights, and cleaning up yearly releases.

Overall, the changes streamline the setup process by centralizing script execution through uv, improving consistency across the repository's automation workflows.

Test Suggestions

  • Trigger the updated GitHub workflows in a staging environment to verify that the uv setup action works correctly for all documentation generation steps.
  • Run the Makefile targets locally to ensure all commands invoking Python scripts via 'uv run' execute without errors.
  • Check the generated documentation output (for Python library docs and template schema docs) to ensure no regressions were introduced.
  • Monitor the CI logs for any issues related to the new uv command usage or permissions while executing the scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Validate docs site

✓ INFO: A live preview of the docs site is available — Open the preview

@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse check results

⚠️ WARN: Average accessibility score is 0.87 (required: >0.9) — Check the workflow run

Show Lighthouse scores

Folder depth level checked: 0

Commit SHA: 6f2fa99

Modify the workflow to check a different depth:

  • 0: Top-level navigation only — /index.html, /guide/guides.html, ...
  • 1: All first-level subdirectories — /guide/.html, /developer/.html, ...
  • 2: All second-level subdirectories — /guide/attestation/*.html, ...
Page Accessibility Performance Best Practices SEO
/developer/validmind-library.html 0.85 0.72 1.00 0.82
/get-started/get-started.html 0.85 0.72 1.00 0.73
/guide/guides.html 0.85 0.69 1.00 0.82
/index.html 0.93 0.62 1.00 0.82
/releases/all-releases.html 0.86 0.69 1.00 0.73
/support/support.html 0.91 0.69 1.00 0.82
/training/training.html 0.85 0.63 0.96 0.73

@validbeck validbeck merged commit bb0f912 into main May 15, 2026
6 of 7 checks passed
@validbeck validbeck deleted the beck/uv-hotfix branch May 15, 2026 19:43
@validbeck validbeck mentioned this pull request May 26, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants