Skip to content

Add python_version input to doc build workflows#808

Open
FabienDanieau wants to merge 1 commit into
huggingface:mainfrom
pollen-robotics:add-python-version-input
Open

Add python_version input to doc build workflows#808
FabienDanieau wants to merge 1 commit into
huggingface:mainfrom
pollen-robotics:add-python-version-input

Conversation

@FabienDanieau

Copy link
Copy Markdown
Contributor

What

Adds an optional python_version input to both reusable build workflows (build_main_documentation.yml and build_pr_documentation.yml). When set, the build venv is created with that Python:

uv venv ${{ inputs.python_version && format('--python {0}', inputs.python_version) || '' }}

Unset by default → bare uv venv, i.e. no behavior change for any existing caller.

Why

The build venv is currently created with a bare uv venv, which picks the runner's system Python — 3.10 on ubuntu-22.04. A documented package that requires a newer Python then can't be installed, and the build fails during "Setup environment":

× No solution found when resolving dependencies:
╰─▶ Because the current Python version (3.10.12) does not satisfy Python>=3.11
    and reachy-mini==1.9.0 depends on Python>=3.11 ...

There's no way for a caller to select the interpreter today: pre_command runs after the venv is created, and a reusable workflow can't inherit env like UV_PYTHON from the caller. This surfaced building the pollen-robotics/reachy_mini docs (requires-python = ">=3.11").

uv provisions the requested version automatically (the job already exports UV_PYTHON_INSTALL_DIR), so callers just pass e.g. python_version: "3.11".

The build venv is created with a bare `uv venv`, which picks the
runner's system Python (3.10 on ubuntu-22.04). Packages that require a
newer Python (e.g. reachy_mini needs >=3.11) then fail to install:
"current Python version (3.10.x) does not satisfy Python>=3.11".

Add an optional `python_version` input, passed to `uv venv --python`
so uv provisions that version. Unset by default, preserving current
behavior for every other caller.

Assisted-by: Claude:claude-opus-4-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant