Skip to content

pixi: add a docs environment for the cuda_python metapackage - #2444

Open
rparolin wants to merge 1 commit into
NVIDIA:mainfrom
rparolin:pixi/cuda-python-docs-env
Open

pixi: add a docs environment for the cuda_python metapackage#2444
rparolin wants to merge 1 commit into
NVIDIA:mainfrom
rparolin:pixi/cuda-python-docs-env

Conversation

@rparolin

Copy link
Copy Markdown
Collaborator

What

cuda_python is the only sub-package without a pixi.toml, yet it owns the top-level documentation — the landing page and the release-notes index that the per-package docs hang off of. Building those locally meant hand-rolling a conda environment with toolshed/setup-docs-env.sh, while every sibling just runs a pixi task.

Adds cuda_python/pixi.toml with a docs environment mirroring cuda_python/docs/environment-docs.yml (what the build-docs workflow installs), plus a root docs-python task wired into the aggregate docs task:

pixi run docs-python

Why the --no-deps install step

docs/build_docs.sh reads SPHINX_CUDA_PYTHON_VER back out of the installed cuda-python metadata, so the task installs the metapackage first. --no-deps is required rather than an optimization: cuda-python's runtime requirements are the published cuda-bindings / cuda-core / cuda-pathfinder wheels, which would shadow the sibling checkouts in site-packages.

Going through the real install also avoids duplicating the setuptools-scm tag_regex that cuda_python/setup.py uses to derive the version — one more copy of a version rule is the last thing this repo needs. This mirrors the "Install all packages" step of .github/workflows/build-docs.yml.

Out of scope

  • Stitching the four builds into the single published site is still cuda_python/docs/build_all_docs.sh; the new root docs task builds each package's docs in its own tree.
  • build-docs.yml still uses setup-miniconda rather than pixi, so the pixi docs environments across all four packages remain unexercised by CI. Worth a follow-up — that is exactly how the pixi source build was allowed to rot before Pixi rebuilds all 36 Cython extensions on every pixi run (editable install temp dirs) #2138.
  • The docs dependency list is still duplicated across environment-docs.yml, toolshed/setup-docs-env.sh, and now four pixi.toml files. This PR adds the fourth copy rather than fixing the duplication; consolidating is a separate change and I did not want to bundle it.

Verification

pixi run docs-python builds clean (1 pre-existing warning) into docs/build/html/13.3.2, with the version resolved from setuptools-scm.


PLC Local Security Evidence (Advisory)

Local advisory checks only. Authoritative release gates remain Pulse, SonarQube, Coverity, BlackDuck, nSpect, ScanSpect, OSRB, and Anchore — none of the rows below are release-gate results.

Check Status Tool Details
Secrets SKIP Pulse Secret Scanner Image pull denied — not authenticated to gitlab-master.nvidia.com:5005 (needs a PAT with read_registry)
SAST PASS Semgrep 1.157.0 0 high / 0 medium / 0 low over the changed files (bundled ruleset, severity filter ERROR)
License SKIP pip-licenses pixi.lock is a conda+PyPI lockfile; pip-licenses reads only installed Python distribution metadata and has no pixi.lock parser. BlackDuck + OSRB remain authoritative
Container N/A No container files in this change
Security Review PASS inline No auth, crypto, input-validation, or privilege-boundary code in this change

cuda_python is the only sub-package without a pixi.toml, yet it owns the
top-level documentation -- the landing page and the release notes index
that the per-package docs hang off of. Building those locally meant
hand-rolling a conda environment with toolshed/setup-docs-env.sh, while
every sibling just runs a pixi task.

Add cuda_python/pixi.toml with a `docs` environment mirroring
cuda_python/docs/environment-docs.yml (what the build-docs workflow
installs), plus a root `docs-python` task wired into the aggregate `docs`
task:

  pixi run docs-python

docs/build_docs.sh reads SPHINX_CUDA_PYTHON_VER back out of the installed
cuda-python metadata, so the task first installs the metapackage with
--no-deps. That is required rather than an optimization: cuda-python's
runtime requirements are the published cuda-bindings / cuda-core /
cuda-pathfinder wheels, which would shadow the sibling checkouts. It also
avoids duplicating the setuptools-scm tag_regex that setup.py uses to
derive the version. This mirrors the "Install all packages" step of
.github/workflows/build-docs.yml.

Out of scope: stitching the four builds into the single published site is
still cuda_python/docs/build_all_docs.sh, and the build-docs workflow
still uses setup-miniconda rather than pixi.

Verified with `pixi run docs-python` -- builds clean (1 pre-existing
warning) into docs/build/html/13.3.2 with the version resolved from
setuptools-scm.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rparolin rparolin added documentation Improvements or additions to documentation CI/CD CI/CD infrastructure labels Jul 29, 2026
@rparolin
rparolin marked this pull request as draft July 29, 2026 00:34
@copy-pr-bot

copy-pr-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rparolin rparolin self-assigned this Jul 30, 2026
@rparolin
rparolin marked this pull request as ready for review July 30, 2026 20:36
@rparolin
rparolin requested a review from mdboom July 30, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant