File size: 1,261 Bytes
b693c5c
c121aed
f3262d9
b693c5c
f9fe402
 
c121aed
 
70ca32b
6764300
82865c2
 
c166c26
 
 
c749392
78ba56c
0bb4ac9
32d65b5
f9fe402
215416f
 
 
f9fe402
959888e
 
f9fe402
959888e
 
 
 
 
 
 
 
 
 
 
 
8f2b5f9
c121aed
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
from github import Github
import os 
import streamlit as st

import plotly.figure_factory as ff

g = Github(os.environ.get('github'))

inference_repo = g.get_repo("bigcode-project/bigcode-inference-benchmark")
df = list()

for milestone in inference_repo.get_milestones():
    desc = dict()
    for line in milestone.description.split('\n'):
        tmp = line.split(":")
        desc[tmp[0].lower()] = tmp[1].lower().strip()
    st.write(type(milestone.due_on))
    st.write(desc['start date'])
    df.append(dict(Task=milestone.title, Start='2023-01-19', Finish=milestone.due_on.strftime('%Y-%m-%d'), Resource=desc['status']))

colors = {'not started': 'rgb(220, 0, 0)',
          'incomplete': (1, 0.9, 0.16),
          'complete': 'rgb(0, 255, 100)'}



fig = ff.create_gantt(df, colors=colors, index_col='Resource', show_colorbar=True)
fig.update_xaxes(ticks= "outside",
                 ticklabelmode= "period", 
                 tickcolor= "black", 
                 ticklen=10, 
                 minor=dict(
                     ticklen=4,  
                     dtick=7*24*60*60*1000,  
                     tick0="2016-07-03", 
                     griddash='dot', 
                     gridcolor='white')
                )

st.plotly_chart(fig)