ci(docs): install polars in the sphinx doc-test image#1669
Merged
Conversation
The docs test image (docs/docker/Dockerfile) installs pygraphviz/igraph/lark/ pytest but not polars, so any doc code example using engine='polars' fails test-docs with 'requires the polars package'. GFQL's docs increasingly demonstrate the Polars engine (performance, engines, benchmarks), so the docs env should have it — this makes those examples actually run + get tested rather than error. (cudf/polars-gpu examples stay auto-skipped; they need the GPU stack.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Complements the docs-image polars install: the doc-example harness runs in several jobs, and where polars is absent (the minimal-deps job, and Python 3.14 which has no polars wheel yet) an engine='polars' snippet raises a clean 'requires the polars package' ImportError that the runner counts as a FAILED example. Treat it like the cudf examples already are — skip when the optional engine dep isn't importable, run + test it when it is. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The doc-test image installed pygraphviz/igraph/lark/pytest/polars via plain 'pip install' with no version pin — fetching latest-on-PyPI at build time, outside the repo's supply-chain cooldown (UV_EXCLUDE_NEWER / the hashed RTD lock both only cover uv/lockfile paths, not this raw-pip Dockerfile line). A malicious release published inside the cooldown window would be pulled here. Pin all five to uv-resolved versions at the repo's supply-chain anchor (exclude-newer 2026-05-14, same freshness as requirements/rtd-py3.12.lock; pygraphviz==1.14 / lark==1.3.1 match that lock exactly). Cooldown-safe by construction — every pin is >6 weeks old, so no fresh (0-day) release can enter via this line. Was already unpinned pre-PR (the +polars addition only extended it); this closes the whole line. Follow-up: transitive+hash pinning needs the image migrated onto a single hashed lock like RTD (it currently mixes an editable .[docs] install with this line, so --require-hashes here would conflict with already-resolved transitive deps) — a separate refactor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The
test-docsjob builds docs indocs/docker/Dockerfile, which installspygraphviz igraph lark pytestbut not polars. Any doc code example usingengine='polars'therefore failstest-docswith:GFQL's docs increasingly demonstrate the Polars engine (performance, engines, benchmark pages), so this fails on the docs stack and will fail on
masteras soon as such an example lands.Fix
Add
polarsto the doc-test image's pip install. One line. Nowengine='polars'doc examples run and are actually tested instead of erroring.cudf/polars-gpuexamples remain auto-skipped (they need the RAPIDS GPU stack).Why a side PR
This is CI infra that benefits
masterindependently of the larger GFQL engine/docs stack — landing it here fixes the polars-exampletest-docsfailures everywhere on the next rebase, and is safe to merge on its own (pure-wheel dependency, docs-image only).🤖 Generated with Claude Code