Closed bagel897 closed 11 months ago
Thanks @bagel897 , this looks really great! Having it work well nbmake
facilitates testing -- I have to start using, it also for GoNB (lots of things I didn't test because were not easy to).
A few suggestions (all very small "nit-picks"), I hope you don't mind.
goexec/errorcontext.go
, the small functions max
, min
and inBetween
are all used in the new errorLine.go
, so they may just be moved there.errorcontext.go
became really small. What do you think about merging it with error.go
? Either way is good, just something to think about.klog
injects many other flags, when reading the output of a gonb --help
(or go run . --help
), it's hard for someone to understand that --raw_error
is about the GoNB cell execution error. Maybe comment that on the comment of the flag ? Something like (suggestion) "When GoNB executes cells, force raw text errors instead of HTML errors, which facilitates command line testing of notebooks" ?Let me know if you would like to change them before merging (or if you disagree), or I'll just merge your PR as is do the small changes later (likely on Monday morning)
cheers, and thanks!!
I'll do the changes monday morning, is that alright?
That's perfect, thanks again Ellen.
On Sat, Aug 12, 2023, 08:24 Ellen Agarwal @.***> wrote:
- Sounds good!
- errorcontext.go still has the HTML template. But I understand combining the two files, it'd make it simpler. Alternatively, I can move the HTML report part back into errorcontext.go
- Ill do that as well
I'll do the changes monday morning, is that alright?
— Reply to this email directly, view it on GitHub https://github.com/janpfeifer/gonb/pull/48#issuecomment-1675737521, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY5KE7BY7LA3VKE2LEWAGDXU4OSZANCNFSM6AAAAAA3NKM4H4 . You are receiving this because you commented.Message ID: @.***>
Thanks for the feedback!
Lmk if you have any other suggestions
The problem
When gonb runs into errors, it generates HTML error reports. These are great for a jupyter notebook, but don't render in nbmake
The solution
Add an option to print out raw error messages instead of html reports, set by a command line flag. This works inside nbmake.
![image](https://github.com/janpfeifer/gonb/assets/57874654/21e22c34-641d-4fc2-ada3-2434e3b860d1)