kynan/nbstripout

Prevent committing notebooks with errors in cell outputs

Open

#180 opened on Dec 24, 2022

View on GitHub
 (7 comments) (0 reactions) (0 assignees)Python (1,047 stars) (90 forks)batch import
help wantedtype:enhancement

Description

Is it possible to detect whether a cell output is an error + stack trace and let users specify one of 3 options ignore, strip or error? The first would be current behavior of doing nothing, second would remove the cell output and third would exit nbstripout non-zero so that using it as a pre-commit hook aborts commits.

My goal is to prevent accidentally releasing notebooks like this:

Screenshot 2022-12-24 at 13 08 29

Contributor guide