-
Notifications
You must be signed in to change notification settings - Fork 67
Fix progress bar interactions in caliban run subprocesses
#31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #31 +/- ##
==========================================
+ Coverage 46.17% 46.42% +0.24%
==========================================
Files 17 17
Lines 2733 2753 +20
==========================================
+ Hits 1262 1278 +16
- Misses 1471 1475 +4
Continue to review full report at Codecov.
|
ajslone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work on this, as your fixes are pretty subtle.
This PR makes a few changes that allow us to use
caliban runto execute scripts with (single) progress bars or other updating progress meters that use carriage returns to modify lines.It's not PERFECT — if you have a progress bar and use
tqdm.write("HI!")inside, for example, you'll trigger a newline, instead of the nice, flowing-upward output above the inner progress bar that you get when you runtqdmlocally. But that is a challenge for another day.I was able to package this pretty cleanly, I think, into
TqdmFile, but it does require some fiddling incapture_outputas well.