MDAPL icon indicating copy to clipboard operation
MDAPL copied to clipboard

Annotate cells that are expected to error as a form of (unit-)testing

Open rodrigogiraoserrao opened this issue 4 years ago • 1 comments

Following up on #21, it would be great if there was some way of annotating cells that are expected to error. Ideally, the build system would take that to mean that a cell errors if and only if it is annotated as such; if this condition is not met, building the book would fail and we'd get a report showing what went wrong, where.

rodrigogiraoserrao avatar Feb 03 '22 11:02 rodrigogiraoserrao

Jupyter Book has an option execute: allow_errors that controls whether or not we allow errors to happen. There is also a tag that we can use to let the build system know that a given cell is expected to error. Using these two together will likely do the trick. However, for these to work, the Dyalog kernel has to be tweaked so that error outputs are seen as such by the Jupyter interface. Currently, Dyalog APL errors aren't picked up in the same way as, say, errors in Python notebooks are picked up.

rodrigogiraoserrao avatar Apr 06 '22 16:04 rodrigogiraoserrao