-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogress.py
More file actions
96 lines (48 loc) · 1.24 KB
/
Copy pathprogress.py
File metadata and controls
96 lines (48 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
"""
RepoForge Progress Manager V3
Tracks real-time execution progress.
"""
from rich.progress import (
Progress,
SpinnerColumn,
TextColumn,
BarColumn,
TaskProgressColumn,
)
class ProgressManager:
def __init__(self):
self.progress = Progress(
SpinnerColumn(),
TextColumn(
"[progress.description]{task.description}"
),
BarColumn(),
TaskProgressColumn()
)
self.task = None
def start(self):
self.progress.start()
self.task = self.progress.add_task(
"Starting RepoForge",
total=100
)
def update(
self,
message,
amount
):
if self.task is None:
return
self.progress.update(
self.task,
description=message,
advance=amount
)
def finish(self):
if self.task:
self.progress.update(
self.task,
completed=100,
description="🚀 RepoForge Complete"
)
self.progress.stop()