Closed prologic closed 10 years ago
ping?
Hey, sorry. I see the usefulness of adding elapsed but I'm not sure about the human_ variants. You could achieve the same thing with something like:
class HumanBar(Bar):
def duration(self, seconds):
# ...
def format_duration(self, duration):
# ...
def update_stats(self):
super(HumanBar, self).update_stats()
self.ctx['human_eta'] = self.format_duration(self.duration(self.eta))
self.ctx['human_elapsed'] = self.format_duration(self.duration(self.elapsed))
Granted this is not the most user friendly way, but I'd rather improve this mechanism than add too many keywords.
Hey! I guess adding another subclass is okay too. Don't know :) I wanted the new keywords so they'd work with any progress bar.
cheers James
James Mills / prologic
E: prologic@shortcircuit.net.au W: prologic.shortcircuit.net.au
On Thu, Aug 29, 2013 at 1:26 PM, Giorgos Verigakis <notifications@github.com
wrote:
Hey, sorry. I see the usefulness of adding elapsed but I'm not sure about the human_ variants. You could achieve the same thing with something like:
class HumanBar(Bar): def duration(self, seconds):
...
def format_duration(self, duration): # ... def update_stats(self): super(HumanBar, self).update_stats() self.ctx['human_eta'] = self.format_duration(self.duration(self.eta)) self.ctx['human_elapsed'] = self.format_duration(self.duration(self.elapsed))
Granted this is not the most user friendly way, but I'd rather improve this mechanism than add too many keywords.
— Reply to this email directly or view it on GitHubhttps://github.com/verigak/progress/pull/7#issuecomment-23464721 .
Let me think about it a bit more. In the meantime if you want to submit a new pull request with just the elapsed addition, I will merge it.
Okay :)
James Mills / prologic
E: prologic@shortcircuit.net.au W: prologic.shortcircuit.net.au
On Thu, Aug 29, 2013 at 1:51 PM, Giorgos Verigakis <notifications@github.com
wrote:
Let me think about it a bit more. In the meantime if you want to submit a new pull request with just the elapsed addition, I will merge it.
— Reply to this email directly or view it on GitHubhttps://github.com/verigak/progress/pull/7#issuecomment-23465331 .
Hi,
I was just about to raise an issue about how to do arithmetic within suffix, when I saw this ticket.
I also wanted ETA in minutes:seconds, rather than just seconds - and the self.ctx dictionary was getting passed through to self.suffix using % (https://github.com/verigak/progress/blob/master/progress/bar.py#L38), hence I couldn't see any way to do arithmetic on it.
Did we end up deciding which way we were going with this?
I'd +1 any attempt to add a human friendly version of ETA, whether as a new keyword, or some other way.
Cheers, Victor
@Victor you're welcome to use my branch in the meantime which has support for this. I'm not sure where the progress project is going with this (I haven't really looked into what upstream is doing lately).
I have added elapsed_td and eta_td to provide more friendly output (use %(elapsed_td)s and %(eta_td)s in format strings). But more importantly you can now subclass and add your own properties. Please have a look on the latest version.
Awesome work!!!! Now i can stop using my custom fork :) Thanks!
Sent from my iPad
On 28 Nov 2013, at 15:53, Giorgos Verigakis notifications@github.com wrote:
I have added elapsed_td and eta_td to provide more friendly output (use %(elapsed_td)s and %(eta_td)s in format strings). But more importantly you can now subclass and add your own properties. Please have a look on the latest version.
— Reply to this email directly or view it on GitHubhttps://github.com/verigak/progress/pull/7#issuecomment-29441866 .
@verigak Cool - is there any chance we can get a new release on PyPi - looking forward to using this =).
Yes new release please :) Much appreicated!
James Mills / prologic
E: prologic@shortcircuit.net.au W: prologic.shortcircuit.net.au
On Thu, Nov 28, 2013 at 4:32 PM, victorhooi notifications@github.comwrote:
@verigak https://github.com/verigak Cool - is there any chance we can get a new release on PyPi - looking forward to using this =).
— Reply to this email directly or view it on GitHubhttps://github.com/verigak/progress/pull/7#issuecomment-29442935 .
Done
Thank you!
James Mills / prologic
E: prologic@shortcircuit.net.au W: prologic.shortcircuit.net.au
On Thu, Nov 28, 2013 at 4:53 PM, Giorgos Verigakis <notifications@github.com
wrote:
Done
— Reply to this email directly or view it on GitHubhttps://github.com/verigak/progress/pull/7#issuecomment-29443542 .
This add three new attributes that can be used: