示例#1
0
def test_schedule_dashboard(master, dashboard_template):
    milestones = MilestoneData(master,
                               baseline=["all"],
                               group=[master.current_projects])
    milestones.filter_chart_info(milestone_type=["Approval", "Delivery"])
    wb = schedule_dashboard(master, milestones, dashboard_template)
    wb.save("resources/test_dashboards_master_altered.xlsx")
示例#2
0
def test_cost_schedule_matrix(master, project_info):
    costs = CostData(master,
                     group=master.current_projects,
                     quarters=["standard"])
    milestones = MilestoneData(master, group=master.current_projects)
    milestones.calculate_schedule_changes()
    wb = cost_v_schedule_chart_into_wb(milestones, costs)
    wb.save("resources/test_costs_schedule_matrix.xlsx")
示例#3
0
def test_compile_milestone_chart_with_filter(master):
    milestones = MilestoneData(master,
                               group=[SOT],
                               quarter=["Q4 19/20", "Q4 18/19"])
    milestones.filter_chart_info(dates=["1/1/2013", "1/1/2014"])
    milestone_chart(
        milestones,
        master,
        title="Group Test",
        blue_line="Today",
        chart=False,
    )
示例#4
0
def test_get_milestone_data_all(master):
    milestones = MilestoneData(
        master,
        group=master.current_projects,
        quarter=["Q4 19/20", "Q4 18/19"],
    )
    assert isinstance(milestones.milestone_dict["Q4 19/20"], (dict, ))
示例#5
0
def test_project_report_meta_data(word_doc, master):
    project = [F9]
    cost = CostData(master, quarter=["standard"], group=project)
    milestones = MilestoneData(master, quarter=["standard"], group=project)
    benefits = BenefitsData(master, quarter=["standard"], group=project)
    project_report_meta_data(word_doc, cost, milestones, benefits, *project)
    word_doc.save("resources/summary_temp_altered.docx")
示例#6
0
def test_get_milestone_chart_data(master):
    milestones = MilestoneData(master, group=[SOT, A13], baseline=["standard"])
    assert (len(milestones.sorted_milestone_dict[milestones.iter_list[0]]
                ["g_dates"]) == 76)
    assert (len(milestones.sorted_milestone_dict[milestones.iter_list[1]]
                ["g_dates"]) == 76)
    assert (len(milestones.sorted_milestone_dict[milestones.iter_list[2]]
                ["g_dates"]) == 76)
示例#7
0
def test_removing_project_name_from_milestone_keys(master):
    """
    The standard list contained with in the sorted_milestone_dict is {"names": ["Project Name,
    Milestone Name, ...]. When there is only one project in the dictionary the need for a Project
    Name is obsolete. The function remove_project_name_from_milestone_key, removes the project name
    and returns milestone name only.
    """
    milestones = MilestoneData(master, group=[SOT], baseline=["all"])
    milestones.filter_chart_info(dates=["1/1/2013", "1/1/2014"])
    key_names = milestones.sorted_milestone_dict["current"]["names"]
    # key_names = remove_project_name_from_milestone_key("SoT", key_names)
    assert key_names == [
        "Sputnik Radiation",
        "Lunar Magma",
        "Standard B",
        "Standard C",
        "Mercury Eleven",
        "Tranquility Radiation",
    ]
示例#8
0
def compile_p_report(
    doc: Document,
    master: Master,
    project_name: str,
    **kwargs,
) -> Document:
    # p_master = master.master_data[0].data[project_name]
    kwargs["group"] = [project_name]
    r_args = [doc, master, project_name]
    wd_heading(doc, **kwargs)
    key_contacts(*r_args)
    project_scope_text(*r_args)
    deliverables(*r_args)
    project_report_meta_data(*r_args)
    # doc.add_section(WD_SECTION_START.NEW_PAGE)
    dca_narratives(*r_args)
    # kwargs["group"] = [project_name]
    ms = MilestoneData(master, "ipdc_milestones", **kwargs)  # milestones
    print_out_project_milestones(doc, ms)
    cs = CentralSupportData(master, **kwargs)  # central support
    print_out_central_support(doc, cs)
    return doc
示例#9
0
def test_overall_dashboard(master, dashboard_template):
    milestones = MilestoneData(master, baseline=["all"])
    wb = overall_dashboard(master, milestones, dashboard_template)
    wb.save("resources/test_dashboards_master_altered.xlsx")
示例#10
0
def test_printout_of_milestones(word_doc, master):
    milestones = MilestoneData(master, group=[SOT], baseline=["standard"])
    change_word_doc_landscape(word_doc)
    print_out_project_milestones(word_doc, milestones, SOT)
    word_doc.save("resources/summary_temp_altered.docx")
示例#11
0
def test_calculating_schedule_changes(master):
    milestones = MilestoneData(master, group=[SOT, A11, A13])
    milestones.calculate_schedule_changes()
    assert isinstance(milestones.schedule_change, (dict, ))
示例#12
0
def test_putting_milestones_into_wb(master):
    milestones = MilestoneData(master, group=[SOT], baseline=["all"])
    milestones.filter_chart_info(dates=["1/1/2013", "1/1/2014"])
    wb = put_milestones_into_wb(milestones)
    wb.save("resources/milestone_data_output_test.xlsx")
示例#13
0
def test_get_milestone_data_bl(master):
    milestones = MilestoneData(master,
                               group=master.current_projects,
                               baseline=["all"])
    assert isinstance(milestones.milestone_dict["current"], (dict, ))