-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It should be possible to error and exit the documentation build process if the execution of the notebooks raises an Exception #392
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Hey @rdbisme, I can't remember if this was possible before, but after #380, an execution error will create a
In sphinx, to fail on a warning, you can either use You can also use https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-suppress_warnings, if you have known warnings that you do not wish to fail on. I feel that this should address your issue, rather than the non-standard (for sphinx) method of raising an exception proposed in #393? |
Actually, sorted it in #404 😉 |
Thanks. So you added an option to trigger the Exception? Nice! |
Describe the problem/need and solution
Context
We have lots of code cells that execute code that normally should run correctly but when API changes and we forgot to update the docs, the docs build process should failt to force us to fix it.
Problem / Idea
Right now in the
execution.py
errors are just logged, but build continues. Therefore the sphinx build process exit correctly even if the execution of code cells failed.Solution
If
execution_allow_errors = False
, exceptions should stop the buildBenefit
This will avoid to push unreliable code in docs
Guide for implementation
Tasks and updates
No response
The text was updated successfully, but these errors were encountered: