Add HTML export and cell execution checking to nbexec - #192
Merged
Conversation
…overing over the cell/line area, in addition to the file/line area. * Added support for rich HTML execution/runtime error reporting, enabling hoverable popups that show code context directly over Go stack traces printed to stderr (e.g. panics and fatal logs).
… Jupyter (not buffered), and the rich hover-popup HTML boxes for cell-related error lines are printed after the execution exits. * Improved error CSS layout to wrap long code lines without displaying horizontal scrollbars.
Added cloned GoNB to `go.work` by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds two new features to the
nbexectool:-export_htmlflag: Exports the notebook as HTML to a specified destination path after execution. Headless Chrome is configured to download the HTML to a temporary directory first, avoiding path pollution, and then moves the file to its final target path (with fallback copy-handling across different filesystems).-check_cellsflag: Parses the executed.ipynbfile after completion and checks for any compilation errors (viaoutput_type: "error") or runtime errors/panics (via checkingstderrforexit statusorpanic:). Prints a detailed error report of failed cells and exits thenbexecprocess with exit code1if any failures occurred.Additionally, this PR adds a new test notebook at
examples/tests/errors.ipynband implements the corresponding integration testTestErrorsininternal/nbtests/nbtests_test.goto verify these error-matching behaviors and line numbers.