-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
CI: sphinx-build doesn't fail on notebook execution error. #51
Comments
+1 on nbval - seems to be the best option in terms of features and flexibility. |
I agree, it seems like it would give us an avenue to really beef up testing. I was initially concerned with build times (executing all the notebooks multiple times) but with parallel CI jobs this is less of a concern. It will probably require an additional Thanks @melissawm for the original suggestion and also @MridulS for the intro to |
I get make error locally for a |
I agree that this is was mostly resolved, though the "elevate-all-sphinx-warnings-to-errors" approach certainly has it's drawbacks, especially since the full tracebacks for cell execution failures are not always immediately available (as discussed elsewhere). We had discussed adding |
It turns out that execution errors from the
myst-nb
extension only raise sphinx warnings, not errors, so thesphinx-build
process is treated as completed successfully even if a notebook was not executed entirely successfully!There are several ways we could handle this:
sphinx-build
treat warnings as errors withSPHINXOPTS=-W
myst-nb
to treat execution failures as sphinx errors.nbval
(or similar) in CIThe only problem with option 1 is that it may prove to be too stringent, as the build will fail on any warning. Option 2 has already been raised upstream: executablebooks/MyST-NB#248. Reading a bit more about
nbval
, it seems like a nice option with more testing features than just thelax
mode (which is essentially what we're trying to achieve with the sphinx build, without needing to build twice).The text was updated successfully, but these errors were encountered: