Skip to content

ci(docs): install polars in the sphinx doc-test image#1669

Merged
lmeyerov merged 5 commits into
masterfrom
docs/fix-docs-ci-polars
Jul 3, 2026
Merged

ci(docs): install polars in the sphinx doc-test image#1669
lmeyerov merged 5 commits into
masterfrom
docs/fix-docs-ci-polars

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

The test-docs job builds docs in docs/docker/Dockerfile, which installs pygraphviz igraph lark pytest but not polars. Any doc code example using engine='polars' therefore fails test-docs with:

GFQL engine='polars' requires the 'polars' package; install it with `pip install polars`

GFQL's docs increasingly demonstrate the Polars engine (performance, engines, benchmark pages), so this fails on the docs stack and will fail on master as soon as such an example lands.

Fix

Add polars to the doc-test image's pip install. One line. Now engine='polars' doc examples run and are actually tested instead of erroring. cudf / polars-gpu examples remain auto-skipped (they need the RAPIDS GPU stack).

Why a side PR

This is CI infra that benefits master independently of the larger GFQL engine/docs stack — landing it here fixes the polars-example test-docs failures everywhere on the next rebase, and is safe to merge on its own (pure-wheel dependency, docs-image only).

🤖 Generated with Claude Code

lmeyerov and others added 5 commits July 1, 2026 00:39
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>
@lmeyerov lmeyerov merged commit 9b310f3 into master Jul 3, 2026
69 checks passed
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