Example #1
0
def project_projections(project):

	velocity_calculator = velocity_calculator_maker(target_points = project.remaining_scope, capacity = 2)

	predictions = (("Yesterday's Weather", project.velocity.yesterday, velocity_calculator(velocity = project.velocity.yesterday)),
		('Model', project.velocity.model, velocity_calculator(velocity = project.velocity.model)),
		('Low', project.velocity.low, velocity_calculator(velocity = project.velocity.low)),
		('Target', project.velocity.high, velocity_calculator(velocity = project.velocity.high) ))
	
	for description, velocity, weeks in predictions:
		print "%s Velocity (%d), end date: %s" % (description, velocity, format_date(end_date(weeks)))
Example #2
0
def test_velocity_calculator_maker():
	velocity_calculator = velocity_calculator_maker(target_points = 20, capacity = 2)
	
	assert calculate_weeks(points = 20, velocity = 5, team_capacity = 2) == velocity_calculator(velocity = 5)