-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Bars #227
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
alternative lower overhead simpler approach to #223 |
what do you think of this? for i in tqdm(range(1000), ascii=" .oOX"):
... |
Current coverage is 90.03% (diff: 66.66%)@@ master #227 diff @@
==========================================
Files 7 7
Lines 477 612 +135
Methods 0 0
Messages 0 0
Branches 85 132 +47
==========================================
+ Hits 432 551 +119
- Misses 44 58 +14
- Partials 1 3 +2
|
Yep that's more elegant, but then the user has to care whether the env is unicode or not to supply a different custom string. You could accept a list in About both approaches from my POV: this one is more elegant, but not necessarily lower overhead performance wise (3 more opcodes in the other version, in this one I think a bit more), and it wouldn't allow to make looping animated progress statuses. For the last point, we could workaround by making a third entry in the list supplied to So basically if we do that, we will come down to have the same thing as the variant, but by passing the custom symbols via an argument instead of inside the So anyway what do you think about it @casperdcl ? Is it more sensible to use an argument to pass custom symbols, or to do it via bar_format? In any case, I think that performance-wise it won't change much. |
There's also the middle ground: create a new argument /EDIT: implemented in #223. |
hmm. looping imho is bad practice as you're loosing info. it's better to pass in the entire alphabet as the argument. |
How does codecov get the colorful highlighting? I want it too! |
+ green
- red |
(to explicit Casper's answer) |
@casperdcl Losing bar info is actually what was asked in an old issue (and again in #228). Some user wanted to limit the size of the whole progress info line so he wanted to reduce the bar to a simple looping character, because anyway the bar is but a redundant info (we already have the percentage, ETA, it/s etc.). |
But since there are more and more requests to make custom bars animations, I'm wondering if we should really do this in the core or in a separate module, even if we have to duplicate |
@casperdcl How did you know? Gimme more hidden formatting features! I love hidden formatting features! (like the sub sup one I told @lrq3000) |
8cade97
to
a65e347
Compare
6ec00f1
to
4b6476a
Compare
- closes #368
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
==========================================
- Coverage 99.19% 98.42% -0.78%
==========================================
Files 10 10
Lines 747 761 +14
Branches 132 138 +6
==========================================
+ Hits 741 749 +8
- Misses 2 6 +4
- Partials 4 6 +2 |
ascii