Add CI workflow to test documentation notebooks#615
Open
Conversation
Adds a GitHub Actions workflow that executes all example notebooks to catch breakage before it reaches the published docs. Also sets nbsphinx_allow_errors to False so Sphinx builds fail on notebook errors. Closes #560 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Revert nbsphinx_allow_errors back to True for RTD (infeasible-model notebook requires gurobi which has an expired license on RTD) - Uninstall gurobipy in CI workflow to prevent it from being auto-selected as default solver (no license available in CI) - Skip infeasible-model.ipynb in CI (gurobi-specific functionality) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HiGHS does not support SOS constraints, so this notebook needs a commercial solver like Gurobi or CPLEX. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set nbsphinx_allow_errors to False so real notebook errors are caught during the RTD build. Notebooks requiring credentials or commercial solvers are excluded from execution via nbsphinx_execute_never. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update gurobipy pin from ==11.0.2 (expired license) to >=13.0.0 - Use reformulate_sos="auto" in piecewise-linear-constraints notebook so it works with HiGHS (no SOS support needed) - Remove gurobipy uninstall workaround from CI workflow - Un-skip infeasible-model and piecewise-linear-constraints notebooks since they now work with a valid license / open-source solver Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update gurobipy pin from ==11.0.2 (expired license) to >=13.0.0
- Use reformulate_sos="auto" in piecewise-linear-constraints notebook
so it works with HiGHS
- Remove broken nbsphinx_execute_never (not supported in nbsphinx 0.9.4);
use notebook metadata {"nbsphinx": {"execute": "never"}} instead for
solve-on-oetc and solve-on-remote
- Set nbsphinx_allow_errors=False so real errors fail the RTD build
- Remove gurobipy uninstall workaround from CI workflow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Readers can now see why solve-on-oetc and solve-on-remote notebooks have no cell outputs in the documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
@FabianHofmann Should be a quick merge |
FabianHofmann
approved these changes
Mar 13, 2026
Collaborator
FabianHofmann
left a comment
There was a problem hiding this comment.
yes! much safer, thanks!
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.
Summary
test-notebooks.yml) that executes all example notebooks to catch breakage before it reaches the published docsnbsphinx_allow_errors = Falseso the RTD Sphinx build fails on notebook errors (wasTrue, silently hiding errors)nbsphinx_execute_neverwhich was never working (not supported in nbsphinx 0.9.4); uses notebook metadata{"nbsphinx": {"execute": "never"}}insteadgurobipypin from==11.0.2(expired bundled license) to>=13.0.0reformulate_sos="auto"inpiecewise-linear-constraintsnotebookNotebooks skipped in CI and RTD
solve-on-oetc.ipynb— requires Google Cloud credentialssolve-on-remote.ipynb— requires SSH/remote server accessAll other notebooks are executed in both CI and RTD.
Closes #560
Test plan
nbsphinx_allow_errors = False🤖 Generated with Claude Code