Spaces:
Sleeping
Sleeping
harmdevries
commited on
Commit
·
df8c933
1
Parent(s):
00e4658
Update app.py
Browse files
app.py
CHANGED
@@ -14,13 +14,16 @@ g = Github(os.environ.get('github'))
|
|
14 |
|
15 |
inference_repo = g.get_repo("bigcode-project/bigcode-inference-benchmark")
|
16 |
df = list()
|
17 |
-
|
18 |
for milestone in inference_repo.get_milestones():
|
19 |
desc = dict()
|
20 |
for line in milestone.description.split('\n'):
|
21 |
tmp = line.split(":")
|
22 |
desc[tmp[0].lower()] = tmp[1].lower().strip()
|
23 |
-
|
|
|
|
|
|
|
24 |
Start=desc['start date'],
|
25 |
Finish=milestone.due_on.strftime('%Y-%m-%d'),
|
26 |
Resource=desc['status'],
|
@@ -37,6 +40,12 @@ colors = {'not started': 'rgb(217, 217, 217)',
|
|
37 |
'high priority - help needed': 'rgb(255, 0, 0)',
|
38 |
'completed': 'rgb(56, 118, 29)'}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
fig = ff.create_gantt(df, colors=colors,
|
42 |
index_col='Resource',
|
|
|
14 |
|
15 |
inference_repo = g.get_repo("bigcode-project/bigcode-inference-benchmark")
|
16 |
df = list()
|
17 |
+
all_status = list()
|
18 |
for milestone in inference_repo.get_milestones():
|
19 |
desc = dict()
|
20 |
for line in milestone.description.split('\n'):
|
21 |
tmp = line.split(":")
|
22 |
desc[tmp[0].lower()] = tmp[1].lower().strip()
|
23 |
+
task_name = f"""<a href="https://www.github.com/bigcode-project/bigcode-inference-benchmark/milestone/{milestone.number}", target="_black">{milestone.title}</a>"""
|
24 |
+
if desc['status'] not in all_status:
|
25 |
+
all_status.append(desc['status'])
|
26 |
+
df.append(dict(Task=task_name,
|
27 |
Start=desc['start date'],
|
28 |
Finish=milestone.due_on.strftime('%Y-%m-%d'),
|
29 |
Resource=desc['status'],
|
|
|
40 |
'high priority - help needed': 'rgb(255, 0, 0)',
|
41 |
'completed': 'rgb(56, 118, 29)'}
|
42 |
|
43 |
+
for key in colors.keys():
|
44 |
+
if key not in all_status:
|
45 |
+
df.append(dict(Task=task_name,
|
46 |
+
Start='2023-04-02',
|
47 |
+
Finish='2023-04-02',
|
48 |
+
Resource=key))
|
49 |
|
50 |
fig = ff.create_gantt(df, colors=colors,
|
51 |
index_col='Resource',
|