Skip to content

Make docs build independent of network and builder speed - #474

Merged
aaronspring merged 3 commits into
mainfrom
claude/rtd-issue-merged-pr-v9uolr
Oct 23, 2026
Merged

aaronspring merged 3 commits into
mainfrom
claude/rtd-issue-merged-pr-v9uolr

Conversation

@aaronspring

@aaronspring aaronspring commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Read the Docs builds keep failing intermittently on unrelated PRs, most recently #459 (Cramér's V). That PR's code is fine: its API page builds cleanly. The failures come from nbsphinx_execute = "always", which re-runs the docs notebooks on every RTD build, and two of them depend on things outside our control:

  • tabular-data.ipynb downloads the California housing dataset with fetch_california_housing() at build time. A failed or partial download aborts the whole build. This is the cal_housing.pkz failure reported on Add Cramer's V contingency metric #459, and I reproduced it locally with network blocked.
  • quick-start.ipynb cell 73 runs %timeit on resample_iterations with automatic loop counts. It took 17.6 s locally, against a 60 s per-cell nbsphinx_timeout. Add Cramer's V contingency metric #459 also reported a kernel timeout in this notebook. That slower RTD builders push this cell over the limit is an inference; I did not measure on RTD.

The GHA "Test notebooks in docs" job stays green because its runners are fast and have stable network, so these failures only ever show up on RTD.

Changes:

  • tabular-data.ipynb: generate a synthetic house prices dataset locally instead of downloading. The column names (AveRooms, y) and the walkthrough stay the same.
  • quick-start.ipynb: %timeit -n 1 -r 3. The cell now runs in under 1 s (was 17.6 s).
  • docs/source/conf.py: nbsphinx_timeout raised from 60 to 300 s per cell as headroom. A hanging cell still fails.
  • .github/workflows/xskillscore_testing.yml: the docs notebooks job now builds with HTTP(S) routed to a dead proxy, so a notebook that downloads data fails on the PR instead of later, at random, on RTD. intersphinx inventories also fail to load, but that only emits warnings.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Run locally (Python 3.13, sphinx <9, deps from ci/doc.yml):

  • With the dead proxy set, the old tabular-data.ipynb fails with URLError: Connection refused, which shows the CI guard catches this.
  • With the dead proxy set, make -j4 html with notebook execution succeeds on this branch.
  • Both notebooks execute offline; the slowest remaining cell is tabular-data.ipynb cell 22 (groupby.apply), at 7.2 s.
  • pre-commit run passes on all changed files.

The RTD build on this PR is the real end-to-end check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MvmKb6kjQzUUXx7GBEvDo4

Read the Docs builds (e.g. for #459) fail intermittently while executing
the docs notebooks, unrelated to the PR under review:

- tabular-data.ipynb downloads the California housing dataset via
  fetch_california_housing at build time; a failed or partial download
  aborts the build.
- quick-start.ipynb runs %timeit on resample_iterations with automatic
  loop counts (17.6 s locally), close to the 60 s nbsphinx cell timeout
  on slower RTD builders.

Generate a synthetic house prices dataset instead of downloading,
bound %timeit to one loop per repeat, raise nbsphinx_timeout to 300 s,
and block network access in the docs notebooks CI job so a notebook
that downloads data fails in CI instead of only on RTD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MvmKb6kjQzUUXx7GBEvDo4
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MvmKb6kjQzUUXx7GBEvDo4
GitHub Actions rejected xskillscore_testing.yml because HTTP_PROXY and
http_proxy (and the HTTPS/NO_PROXY pairs) are duplicate keys in a
case-insensitive env mapping, so no test jobs ran. Python's urllib and
requests honour the uppercase names, so keep only those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MvmKb6kjQzUUXx7GBEvDo4
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.86%. Comparing base (6649726) to head (9e52bbd).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #474      +/-   ##
==========================================
+ Coverage   94.78%   94.86%   +0.07%     
==========================================
  Files          27       27              
  Lines        2973     3016      +43     
==========================================
+ Hits         2818     2861      +43     
  Misses        155      155              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aaronspring
aaronspring merged commit b516f5c into main Oct 23, 2026
17 checks passed
@aaronspring
aaronspring deleted the claude/rtd-issue-merged-pr-v9uolr branch October 23, 2026 13:14
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.

2 participants