Add --verbose flag to exec_nb for real-time output#75
Conversation
|
Found 2 changed notebooks. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/execnb/pull/75 |
|
Hey @radekosmulski this looks great! Please at-mention me or add me as a reviewer so I don't miss your PRs 🗡️ Currently the two notebooks are not well formed, according to github when I try to view them. Can you please open them in jupyter and re-save them after executing them to ensure they are valid? |
70c3354 to
604b9f8
Compare
|
Absolutely, will tag you going forward, @jph00! 🙂 Thank you so much for looking at this! 🙏 I believe I fixed some issues, but not sure. Also, some cells seem to have different output which is coming up on the diff without a really good reason -- but not sure how I can fix it nor do we care about this sort of stuff: If anything else would need to be done on this, please let me know! 🙏 |
|
lgtm! :) |
- Added verbose parameter throughout the execution chain - Modified CaptureShell._run to conditionally capture stdout/stderr - When --verbose is used, output streams to terminal in real-time - Updated documentation in README.md and help text
604b9f8 to
66e0d4a
Compare
|
sorry @jph00 I keep screwing this up 🙂 but should be okay now, didn't make any changes after export |
|
All sorted @radekosmulski , no problem! :D |

This PR adds a --verbose flag to the exec_nb command-line tool to display stdout/stderr output in real-time during
notebook execution.
Motivation:
When running long-running notebooks from the command line, it's helpful to see progress and output as it happens, rather
than waiting until the entire notebook completes.
Changes:
Usage:
exec_nb notebook.ipynb --verbose
Testing:
The feature has been tested with notebooks containing print statements, stderr output, and progress indicators. Output
correctly streams to the terminal when verbose is enabled while still being captured in the notebook when saved.