Nbconvert: Allow errors on a cell-by-cell basis

Created on 23 Sep 2017  路  2Comments  路  Source: jupyter/nbconvert

In some tutorial notebooks we have in astropy/astropy-tutorials, we intentionally raise an exception to demonstrate a feature or concept to the user. But we also want to be able to test the notebooks by running them during the nbconvert phase (using nbsphinx). Right now, we can allow errors on a per-notebook basis using --allow-errors, but it would be useful if we could specify (via the cell-level metadata) that certain cells are allowed to fail.

Is this a feature that you would support in nbconvert?

cc @eteq

(spatialaudio/nbsphinx#125 and astropy/astropy-tutorials#150 are related)

Most helpful comment

nbval and the notebook user interface support a raises-exception cell tag to indicate that a cell is expected to raise an exception. I'd like nbconvert to respect the same thing.

All 2 comments

nbval and the notebook user interface support a raises-exception cell tag to indicate that a cell is expected to raise an exception. I'd like nbconvert to respect the same thing.

since it's supported in the notebook, I think that's a reasonable piece of functionality.

Was this page helpful?
0 / 5 - 0 ratings