1 # -*- coding: iso8859-15 -*- 2 from faces import * 3 from faces.lib import report 4 from faces.lib import gantt 5 from faces.lib import resource 6 7 class bob(Resource): 8 internal = 600.0 9 external = 1000.0 10 11 class jim(Resource): 12 internal = 800.0 13 external = 1200.0 14 15 def My_Project(): 16 start = "1.1.2005" 17 resource = bob | jim 18 19 def Specification(): 20 effort = Multi("1w", worst="1.5w") 21 22 def Design(): 23 start = up.Specification.end 24 effort = Multi("1w", worst="1.2w") 25 26 def Implementation(): 27 start = up.Design.end 28 29 def Module1(): 30 effort = Multi("1w", worst="2w") 31 32 def Module2(): 33 effort = "1w 2d" 34 35 def Installation(): 36 start = max(up.Implementation.Module1.end, 37 up.Implementation.Module2.end) 38 effort = "2d" 39 40 project = BalancedProject(My_Project) 41 42 class Gantt(gantt.Standard): 43 data = project 44 sharex = "gantt" 45 46 class Resources(resource.Standard): 47 data = project 48 sharex = "gantt" 49 50 class Costs(report.Standard): 51 data = project 52 53 def make_report(self, data): 54 for t in data: 55 yield (t.indent_name(), t.to_string["%HH"].effort,\ 56 t.costs("internal"), t.costs("external"),\ 57 t.booked_resource)
t.to_string["%HH"].effort
shows the effort in hours only.