Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sritchie
Copy link
Contributor

@sritchie sritchie commented Jun 26, 2020

This PR makes a few changes that allow us to use caliban run to 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 run tqdm locally. 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 in capture_output as well.

2020-06-26 09 48 50

@codecov
Copy link

codecov bot commented Jun 26, 2020

Codecov Report

Merging #31 into master will increase coverage by 0.24%.
The diff coverage is 68.96%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
caliban/docker.py 25.07% <30.76%> (-0.17%) ⬇️
caliban/util.py 76.45% <100.00%> (+2.45%) ⬆️
caliban/gke/utils.py 71.53% <0.00%> (-0.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce0eca9...ffff3ca. Read the comment docs.

Copy link
Contributor

@ajslone ajslone left a 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.

@sritchie sritchie merged commit 34f434c into master Jun 26, 2020
@sritchie sritchie deleted the sritchie/fix_stdout_issue branch June 26, 2020 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants