Use uv to manage our Python documentation dependencies (#18263)

I want to lock our Zig build dependencies and this is an incremental
step towards doing so via uv
This commit is contained in:
Zanie Blue
2026-03-04 09:52:15 -06:00
committed by GitHub
parent 6ddcbbf700
commit 4ff4720da5
18 changed files with 1049 additions and 201 deletions
+1 -1
View File
@@ -1111,4 +1111,4 @@ jobs:
path: wheels
merge-multiple: true
- name: "Check wheel contents"
run: uv run scripts/check_uv_wheel_contents.py wheels/*
run: uv run --no-project scripts/check_uv_wheel_contents.py wheels/*
+1 -1
View File
@@ -28,4 +28,4 @@ jobs:
cargo dev generate-env-vars-reference
- name: "Build docs"
run: uvx --with-requirements docs/requirements.txt mkdocs build --strict -f mkdocs.yml
run: uv run --only-group docs mkdocs build --strict -f mkdocs.yml
+2 -2
View File
@@ -306,7 +306,7 @@ jobs:
# Build a yet unused version of `astral-test-pypa-gh-action`
mkdir astral-test-pypa-gh-action
cd astral-test-pypa-gh-action
../uv init --package
../uv init --package --no-workspace
# Get the latest patch version
patch_version=$(curl https://test.pypi.org/simple/astral-test-pypa-gh-action/?format=application/vnd.pypi.simple.v1+json | jq --raw-output '[.files[].filename | select(endswith(".tar.gz"))] | last' | grep -oP '(?<=astral_test_pypa_gh_action-0\.1\.)\d+(?=\.tar\.gz)')
# Set the current version to one higher (which should be unused)
@@ -377,7 +377,7 @@ jobs:
- name: "Publish test packages"
# `-p 3.12` prefers the python we just installed over the one locked in `.python_version`.
run: ./uv run -p "${PYTHON_VERSION}" scripts/publish/test_publish.py --uv ./uv all
run: ./uv run --no-project -p "${PYTHON_VERSION}" scripts/publish/test_publish.py --uv ./uv all
env:
RUST_LOG: uv=debug,uv_publish=trace
UV_TEST_PUBLISH_TOKEN: ${{ secrets.UV_TEST_PUBLISH_TOKEN }}
+5 -3
View File
@@ -70,11 +70,13 @@ jobs:
echo "BRANCH_NAME=update-docs-$branch_display_name-$timestamp" >> $GITHUB_ENV
echo "TIMESTAMP=$timestamp" >> $GITHUB_ENV
- name: "Install dependencies"
run: pip install -r docs/requirements.txt
- name: "Install uv"
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
with:
version: "0.10.7"
- name: "Build docs"
run: mkdocs build --strict -f mkdocs.yml
run: uv run --only-group docs mkdocs build --strict -f mkdocs.yml
- name: "Clone docs repo"
run: |
+1 -1
View File
@@ -41,7 +41,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Update Python version constants"
run: uv run scripts/sync-python-version-constants.py
run: uv run --no-project scripts/sync-python-version-constants.py
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
+2 -2
View File
@@ -859,7 +859,7 @@ jobs:
echo "UV_TEST_GCP_TOKEN=$UV_TEST_GCP_TOKEN" >> $GITHUB_ENV
- name: "Run registry tests with environment variable backend"
run: ./uv run -p "${PYTHON_VERSION}" scripts/registries-test.py --uv ./uv --color always --all --auth-method env
run: ./uv run --no-project -p "${PYTHON_VERSION}" scripts/registries-test.py --uv ./uv --color always --all --auth-method env
env:
RUST_LOG: uv=debug
UV_TEST_ARTIFACTORY_TOKEN: ${{ secrets.UV_TEST_ARTIFACTORY_TOKEN }}
@@ -883,7 +883,7 @@ jobs:
UV_TEST_GITLAB_USERNAME: token
- name: "Run registry tests with text store backend"
run: ./uv run -p "${PYTHON_VERSION}" scripts/registries-test.py --uv ./uv --color always --all --auth-method text-store
run: ./uv run --no-project -p "${PYTHON_VERSION}" scripts/registries-test.py --uv ./uv --color always --all --auth-method text-store
env:
RUST_LOG: uv=debug
UV_TEST_ARTIFACTORY_TOKEN: ${{ secrets.UV_TEST_ARTIFACTORY_TOKEN }}
+6 -6
View File
@@ -36,7 +36,7 @@ jobs:
- name: "Smoke test"
run: |
./uv run scripts/smoke-test
./uv run --no-project scripts/smoke-test
- name: "Test shell completions"
run: |
@@ -64,7 +64,7 @@ jobs:
- name: "Smoke test"
run: |
./uv run scripts/smoke-test
./uv run --no-project scripts/smoke-test
- name: "Test shell completions"
run: |
@@ -93,7 +93,7 @@ jobs:
- name: "Smoke test"
run: |
./uv run scripts/smoke-test
./uv run --no-project scripts/smoke-test
smoke-test-macos:
name: "macos"
@@ -116,7 +116,7 @@ jobs:
- name: "Smoke test"
run: |
./uv run scripts/smoke-test
./uv run --no-project scripts/smoke-test
- name: "Test shell completions"
run: |
@@ -140,7 +140,7 @@ jobs:
- name: "Smoke test"
working-directory: ${{ env.UV_WORKSPACE }}
run: |
./uv run scripts/smoke-test
./uv run --no-project scripts/smoke-test
- name: "Test uv shell completions"
working-directory: ${{ env.UV_WORKSPACE }}
@@ -169,7 +169,7 @@ jobs:
- name: "Smoke test"
working-directory: ${{ env.UV_WORKSPACE }}
run: |
./uv run scripts/smoke-test
./uv run --no-project scripts/smoke-test
- name: "Test uv shell completions"
working-directory: ${{ env.UV_WORKSPACE }}
@@ -23,7 +23,7 @@ jobs:
- uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
- name: "Check windows crate versions match"
run: uv run scripts/check-trampoline-version-consistency.py
run: uv run --no-project scripts/check-trampoline-version-consistency.py
# Separate jobs for the nightly crate
windows-trampoline-check: