Skip to content

Commit

Permalink
- feat: add LongRunningCountBar to progress bars
Browse files Browse the repository at this point in the history
Line CountingBar except it includes a TimeRemaining column (long running tasks seem to warrant this)
  • Loading branch information
kfsone authored and eyeonus committed May 6, 2024
1 parent ec94c0b commit 6f188a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tradedangerous/misc/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ def __init__(self, width: int = 10, prefix: Optional[str] = None):
super().__init__(width, prefix, add_columns=my_columns)


class LongRunningCountBar(BarStyle):
""" Creates a progress bar that is counting M/N items to completion with a time-remaining counter """
def __init__(self, width: int = 10, prefix: Optional[str] = None):
my_columns = [MofNCompleteColumn(), TimeElapsedColumn(), TimeRemainingColumn()]
super().__init__(width, prefix, add_columns=my_columns)


class TransferBar(BarStyle):
""" Creates a progress bar representing a data transfer, which shows the amount of
data transferred, speed, and estimated time remaining. """
Expand Down

0 comments on commit 6f188a4

Please sign in to comment.