Add stacked flag for MultiLineProgress, so that the bars stack instead of overwriting - #40
Open
Archer6621 wants to merge 1 commit into
Open
Add stacked flag for MultiLineProgress, so that the bars stack instead of overwriting#40Archer6621 wants to merge 1 commit into
Archer6621 wants to merge 1 commit into
Conversation
Owner
Author
|
Ah, I meant stacking in the sense that each progress instance represents a portion of the total! So that they do not overlap, much like a bar in a stacked bar chart. But this approach that you showed also works for communicating the same thing. I have switched to a slightly more elaborate way of showing progress using a different library, so this can be closed if nobody will use it. |
Owner
|
Oooh gocha, I'll consider adding it but yes for now this can be closed then :) |
Owner
|
Reopening because I didn't realize code was submitted to actually fix this issue (woops). I'll review and possibly merge! |
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.

My use case for the
MultiLineProgressbar is one where I keep track of different results for the same process, e.g. succeeded versus failed, or perhaps even more. In this case, I always expect the same total amount of items, but each item might get a different label depending on the result. Currently, the progress lines all get written to index 0 on the main bar (useful for e.g. pipeline steps where each bar represents a step that all items have to go through), causing them to overwrite one another for this particular use case.I'm proposing a flag
stacked=True/Falsewhere when it isTrue, the control progress lines get stacked; each one writes where the previous line had ended. This way, when all items are processed and have received a label, the lines will fill the bar fully in the correct proportions.Decided to go ahead and implement/PR it, since it is a very minor modification.