Dyalog / MDAPL

The de facto standard for people who are looking to learn Dyalog APL from a book. This updated version is a work in progress.
https://mastering.dyalog.com/
Other
31 stars 7 forks source link

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

Open rodrigogiraoserrao opened 2 years ago

rodrigogiraoserrao commented 2 years ago

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 commented 2 years ago

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.