[[!table format=csv file="/output_dir/milestone 2.csv"]]""",
'/output_dir/milestone 1.csv': b"""\
-bug_id,budget_excluding_subtasks,budget_including_subtasks,fixed_budget_excluding_subtasks,fixed_budget_including_subtasks,submitted_excluding_subtasks,paid_excluding_subtasks,person1 (planned amt),person1 (req amt),person1 (req date),person1 (paid amt),person1 (paid date),person2 (planned amt),person2 (req amt),person2 (req date),person2 (paid amt),person2 (paid date)
+bug_id,excl_subtasks,inc_subtasks,fixed_excl_subtasks,fixed_inc_subtasks,req_excl_subtasks,paid_excl_subtasks,person1 (planned amt),person1 (req amt),person1 (req date),person1 (paid amt),person1 (paid date),person2 (planned amt),person2 (req amt),person2 (req date),person2 (paid amt),person2 (paid date)
1,1000,1000,1000,1000,421,421,579,0,,0,,421,421,,421,2020-01-01
""",
'/output_dir/milestone 2.csv': b"""\
-bug_id,budget_excluding_subtasks,budget_including_subtasks,fixed_budget_excluding_subtasks,fixed_budget_including_subtasks,submitted_excluding_subtasks,paid_excluding_subtasks
+bug_id,excl_subtasks,inc_subtasks,fixed_excl_subtasks,fixed_inc_subtasks,req_excl_subtasks,paid_excl_subtasks
"""
})
# TODO: add more test cases
def _budget_csv_row(budget_graph: BudgetGraph, milestone: Milestone, node: Optional[Node]) -> Dict[str, str]:
row_fns: Dict[str, Callable[[Node], Any]] = {
'bug_id': lambda node: node.bug.id,
- 'budget_excluding_subtasks': lambda node: node.budget_excluding_subtasks,
- 'budget_including_subtasks': lambda node: node.budget_including_subtasks,
- 'fixed_budget_excluding_subtasks': lambda node: node.fixed_budget_excluding_subtasks,
- 'fixed_budget_including_subtasks': lambda node: node.fixed_budget_including_subtasks,
- 'submitted_excluding_subtasks': lambda node: node.submitted_excluding_subtasks,
- 'paid_excluding_subtasks': lambda node: node.paid_excluding_subtasks,
+ 'excl_subtasks': lambda node: node.budget_excluding_subtasks,
+ 'inc_subtasks': lambda node: node.budget_including_subtasks,
+ 'fixed_excl_subtasks': lambda node: node.fixed_budget_excluding_subtasks,
+ 'fixed_inc_subtasks': lambda node: node.fixed_budget_including_subtasks,
+ 'req_excl_subtasks': lambda node: node.submitted_excluding_subtasks,
+ 'paid_excl_subtasks': lambda node: node.paid_excluding_subtasks,
}
milestone_people = budget_graph.milestone_people[milestone]