Skip to content

Commit 9b310f3

Browse files
authored
Merge pull request #1669 from graphistry/docs/fix-docs-ci-polars
ci(docs): install polars in the sphinx doc-test image
2 parents 3ffc2d8 + 5e38ac7 commit 9b310f3

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1515
### Infrastructure
1616

1717
- **dgx GB10 benchmark safety harness**: `benchmarks/dgx/{safe_run.sh, preflight.py, sitecustomize.py, local_run.sh}` — an RMM device-allocation cap + host-memory watchdog + preflight refusal + hard timeout for running GPU / large-graph benchmarks on the unified-memory GB10 box without OOM-wedging it. Developer/benchmark tooling only; no runtime or library behavior change.
18+
- **Docs CI: polars in the doc-test image (pinned)**: the Sphinx doc-example runner now installs `polars` (pinned to cooldown-safe versions) so `engine='polars'` documentation examples execute — and are SKIPPED, not failed, where polars is unavailable (e.g. the minimal-deps job, Python 3.14). Doc-build / CI only; no runtime or library change.
1819

1920
## [0.57.0 - 2026-06-28]
2021

docs/docker/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ COPY ../../graphistry /docs/graphistry
2323
# Install graphistry in editable mode so it's available for notebook execution
2424
RUN --mount=type=cache,target=/root/.cache/pip \
2525
python3 -m pip install -e .[docs] && \
26-
python3 -m pip install pygraphviz igraph lark pytest && \
26+
# Pin doc-test-only deps (not in .[docs]/the RTD lock) to cooldown-safe versions —
27+
# uv-resolved at the repo's supply-chain anchor (exclude-newer 2026-05-14, matches
28+
# requirements/rtd-py3.12.lock), so a plain pip build never pulls an unpinned latest
29+
# (0-day) release. Regenerate: uv pip compile <(printf 'pygraphviz\nigraph\nlark\npytest\npolars')
30+
# --python-version 3.12 --exclude-newer <rtd-lock-anchor> --no-deps
31+
# Follow-up (#1669): fold into a single hashed lock like RTD for transitive+hash pinning.
32+
python3 -m pip install pygraphviz==1.14 igraph==1.0.0 lark==1.3.1 pytest==9.0.3 polars==1.40.1 && \
2733
python3 -m ipykernel install --sys-prefix --name python3
2834

2935
# Step 5: Copy the build script and config files into the container

docs/test_doc_examples.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,22 @@ def _extract_code_blocks(path: Path) -> List[Tuple[int, str, Marker]]:
245245
return blocks
246246

247247

248+
try:
249+
import polars as _polars_probe # noqa: F401
250+
_POLARS_AVAILABLE = True
251+
except Exception:
252+
_POLARS_AVAILABLE = False
253+
254+
248255
def _should_skip(code: str) -> Optional[str]:
249256
for pat in SKIP_PATTERNS:
250257
if pat in code:
251258
return pat
259+
# engine='polars' examples run when polars is installed, but must be SKIPPED (not failed)
260+
# where it isn't — e.g. the minimal-deps job, or Python 3.14 which has no polars wheel yet.
261+
# (cudf examples are already covered by SKIP_PATTERNS above.)
262+
if not _POLARS_AVAILABLE and ("engine='polars'" in code or 'engine="polars"' in code):
263+
return "polars-not-installed"
252264
return None
253265

254266

0 commit comments

Comments
 (0)