Exemple #1
0
def tasks():
    tasks = user.get_tasks()
    if not tasks:
        return "[]"
    now = pytz.utc.localize(datetime.datetime.now())
    gantt = Gantt(now, tasks)
    return json.dumps(gantt.serialise())
Exemple #2
0
 def testPlotTitle(self):
     """ Make sure title is passed to plot
     """
     g = Gantt(BASICS)
     g.render()
     x = g.ax.get_title()
     self.assertEqual(x, "Basic Title")
Exemple #3
0
 def testPlotTitle(self):
     """ Make sure title is passed to plot
     """
     g = Gantt(BASICS)
     g.render()
     x = g.ax.get_title()
     self.assertEqual(x, "Basic Title")
Exemple #4
0
def index():
    gat = Gantt()
    tsk = Task("")
    tsk.tid = 1
    tsk.read_plan()
    tsk.read_info()
    html = tsk.html_hhour(gat.start, gat.finish)
    return render_template('gantt.html', gantt=gat, tasks=[html])
Exemple #5
0
#!/usr/bin/env python
"""
Wrapper function to use the Gantt class
"""
from gantt import Gantt

g = Gantt('./sample.json')
g.render()
g.show()
Exemple #6
0
#!/usr/bin/env python
"""
Wrapper function to use the Gantt class
"""
from gantt import Gantt

g = Gantt('/home/gabriel/University/Master/experiments/Row1_dup.json')
#g = Gantt('sample.json')
g.render()
#g.save('foo.png')
g.show()
Exemple #7
0
 def testTimings(self):
     """ Make sure start/end is set properly
     """
     g = Gantt(BASICS)
     self.assertEqual(g.start, [0, 3, 3, 6])
     self.assertEqual(g.end, [2, 6, 5, 8])
Exemple #8
0
 def testPackages(self):
     """ Make sure the no. of packages is correct
     """
     g = Gantt(BASICS)
     self.assertEqual(len(g.packages), 4)
Exemple #9
0
 def testTitle(self):
     """ Whats my name?
     """
     g = Gantt(BASICS)
     self.assertEqual(g.title, "Basic Title")
Exemple #10
0
#!/usr/bin/env python
"""
Wrapper function to use the Gantt class
"""
from gantt import Gantt

g = Gantt("./sample.json")
g.render()
g.show()