Skip to content

Disable running notebooks while building docs#980

Merged
rapids-bot[bot] merged 2 commits intoNVIDIA:release/26.04from
rgsl888prabhu:update_doc_to_not_run_execute_notebook
Mar 23, 2026
Merged

Disable running notebooks while building docs#980
rapids-bot[bot] merged 2 commits intoNVIDIA:release/26.04from
rgsl888prabhu:update_doc_to_not_run_execute_notebook

Conversation

@rgsl888prabhu
Copy link
Collaborator

Description

Disable running notebooks which are added examples while building docs

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

@rgsl888prabhu rgsl888prabhu requested a review from a team as a code owner March 20, 2026 21:26
@rgsl888prabhu rgsl888prabhu requested a review from tmckayus March 20, 2026 21:26
@rgsl888prabhu rgsl888prabhu self-assigned this Mar 20, 2026
@rgsl888prabhu rgsl888prabhu added doc Improvements or additions to documentation non-breaking Introduces a non-breaking change labels Mar 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8606a1da-3338-44c2-8f2e-433d5bc1b461

📥 Commits

Reviewing files that changed from the base of the PR and between 97233a0 and c98e42e.

📒 Files selected for processing (1)
  • docs/cuopt/source/conf.py
✅ Files skipped from review due to trivial changes (1)
  • docs/cuopt/source/conf.py

📝 Walkthrough

Walkthrough

Added an Sphinx configuration entry nb_execution_excludepatterns to prevent execution of the notebook cuopt-python/routing/routing-example.ipynb during documentation builds.

Changes

Cohort / File(s) Summary
Sphinx Configuration
docs/cuopt/source/conf.py
Added nb_execution_excludepatterns setting to exclude cuopt-python/routing/routing-example.ipynb from notebook execution during docs build.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: disabling notebook execution during documentation builds, which matches the actual change in conf.py.
Description check ✅ Passed The description is directly related to the changeset, explaining the intent to disable notebook execution when adding examples to the documentation build.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/cuopt/source/conf.py (1)

94-99: Consider cleaning up unused nbsphinx configuration.

Line 94 configures nbsphinx_execute = "never", but the nbsphinx extension is not present in the extensions list (lines 61-78). Since myst_nb is the actual notebook processor being used (line 75), this configuration has no effect and could create confusion.

Consider removing line 94 to eliminate the unused configuration, or add a comment explaining if it's intentionally kept for backward compatibility.

♻️ Proposed cleanup
-nbsphinx_execute = "never"
-ipython_mplbackend = "str"
-
 # GPU routing example: execution during Sphinx can fail when CUDA/CuPy don't match the
 # docs env. The notebook sets mystnb.execution_mode=off and ships checked-in outputs.
 nb_execution_excludepatterns = ["cuopt-python/routing/routing-example.ipynb"]
+
+ipython_mplbackend = "str"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/cuopt/source/conf.py` around lines 94 - 99, The nbsphinx-specific
setting nbsphinx_execute = "never" is unused because the Sphinx extensions list
does not include "nbsphinx" and the project uses myst_nb (myst_nb in the
extensions list); either remove the nbsphinx_execute line or add a clarifying
comment above it indicating it’s intentionally retained for backward
compatibility; update conf.py by deleting the nbsphinx_execute assignment
(preferred) or adding a one-line comment referencing nbsphinx_execute and why
it’s kept, and ensure any related nb_execution_excludepatterns or other nbsphinx
settings are reviewed for relevance to myst_nb.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/cuopt/source/conf.py`:
- Around line 97-99: The comment above nb_execution_excludepatterns is
inaccurate about the notebook metadata claiming mystnb.execution_mode=off;
either remove or correct that statement in the comment and optionally set the
notebook metadata to execution_mode=off if you want the metadata to reflect the
intent. Update the comment lines near nb_execution_excludepatterns (referencing
nb_execution_excludepatterns and the notebook path
"cuopt-python/routing/routing-example.ipynb") to state that the notebook is
excluded from execution via nb_execution_excludepatterns, or modify the notebook
metadata to set execution_mode=off and then update the comment to reflect that
change.

---

Nitpick comments:
In `@docs/cuopt/source/conf.py`:
- Around line 94-99: The nbsphinx-specific setting nbsphinx_execute = "never" is
unused because the Sphinx extensions list does not include "nbsphinx" and the
project uses myst_nb (myst_nb in the extensions list); either remove the
nbsphinx_execute line or add a clarifying comment above it indicating it’s
intentionally retained for backward compatibility; update conf.py by deleting
the nbsphinx_execute assignment (preferred) or adding a one-line comment
referencing nbsphinx_execute and why it’s kept, and ensure any related
nb_execution_excludepatterns or other nbsphinx settings are reviewed for
relevance to myst_nb.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6768dbfc-aa59-4513-a2d9-107cb6e09d25

📥 Commits

Reviewing files that changed from the base of the PR and between 4d5f5e5 and 97233a0.

📒 Files selected for processing (1)
  • docs/cuopt/source/conf.py

@rgsl888prabhu
Copy link
Collaborator Author

/merge

@anandhkb anandhkb added this to the 26.04 milestone Mar 20, 2026
@rgsl888prabhu
Copy link
Collaborator Author

/merge

@rapids-bot rapids-bot bot merged commit cbec0e9 into NVIDIA:release/26.04 Mar 23, 2026
255 of 264 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Improvements or additions to documentation non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants