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())
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")
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])
#!/usr/bin/env python """ Wrapper function to use the Gantt class """ from gantt import Gantt g = Gantt('./sample.json') g.render() g.show()
#!/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()
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])
def testPackages(self): """ Make sure the no. of packages is correct """ g = Gantt(BASICS) self.assertEqual(len(g.packages), 4)
def testTitle(self): """ Whats my name? """ g = Gantt(BASICS) self.assertEqual(g.title, "Basic Title")
#!/usr/bin/env python """ Wrapper function to use the Gantt class """ from gantt import Gantt g = Gantt("./sample.json") g.render() g.show()