Skip to content

CI: sphinx-build doesn't fail on notebook execution error. #51

@rossbar

Description

@rossbar

It turns out that execution errors from the myst-nb extension only raise sphinx warnings, not errors, so the sphinx-build process is treated as completed successfully even if a notebook was not executed entirely successfully!

There are several ways we could handle this:

  1. Have sphinx-build treat warnings as errors with SPHINXOPTS=-W
  2. Push for a config option in myst-nb to treat execution failures as sphinx errors.
  3. Re-activate nbval (or similar) in CI

The 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 the lax mode (which is essentially what we're trying to achieve with the sphinx build, without needing to build twice).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions