Ejemplo n.º 1
0
def construct_parser_pct_change():
    """Create parser for pct change calculation"""
    parser = argparse.ArgumentParser(
        description='Run pct change for DALYs')

    parser = arg_pool.add_input_data_root(parser)
    parser = arg_pool.add_out_dir(parser)
    parser = arg_pool.add_loc_id(parser)
    parser = arg_pool.add_start_and_end_year(parser)

    valid_measures = [gbd.measures.DALY, gbd.measures.YLL, gbd.measures.YLD,
                      gbd.measures.DEATH]
    parser = arg_pool.add_measure_id(parser, valid_measures)
    parser = arg_pool.add_cod(parser)
    parser = arg_pool.add_epi(parser)
    valid_tool_names = ["dalynator", "burdenator"]
    parser = arg_pool.add_tool_names(parser, valid_tool_names)
    parser = arg_pool.add_output_version(parser)
    parser = arg_pool.add_gbd_round_group(parser)
    parser = arg_pool.add_decomp_step(parser)
    parser = arg_pool.add_n_draws(parser)
    parser = arg_pool.add_star_ids(parser)
    parser = arg_pool.add_verbose(parser)
    parser = arg_pool.add_dual_upload(parser)

    return parser
Ejemplo n.º 2
0
def construct_parser_cs_sort():
    """Create parser for burdenator upload"""
    parser = argparse.ArgumentParser(
        description='Consolidate summary files for CS upload')
    parser = arg_pool.add_out_dir(parser, True)
    parser = arg_pool.add_loc_id(parser)
    parser = arg_pool.add_measure_ids(parser, VALID_BURDENATOR_MEASURES)
    parser = arg_pool.add_year_ids(parser)
    parser = arg_pool.add_start_and_end_year_ids(parser)

    valid_tool_names = ["burdenator", "dalynator"]
    parser = arg_pool.add_tool_names(parser, valid_tool_names)

    return parser
Ejemplo n.º 3
0
def construct_parser_upload():
    """Create parser for burdenator upload"""
    parser = argparse.ArgumentParser(description='Run upload')
    parser = arg_pool.add_out_dir(parser)  # didnt have the store before
    parser = arg_pool.add_gbd_process_version_id(parser)
    parser = arg_pool.add_loc_ids(parser)

    valid_table_types = ["single_year", "multi_year"]
    parser = arg_pool.add_table_types(parser, valid_table_types)

    valid_storage_engines = ["INNODB", "COLUMNSTORE"]
    parser = arg_pool.add_storage_engines(parser, valid_storage_engines)
    parser = arg_pool.add_upload_to_test(parser)
    parser = arg_pool.add_dual_upload(parser)
    parser = arg_pool.add_verbose(parser)

    valid_tool_names = ["burdenator", "dalynator"]
    parser = arg_pool.add_tool_names(parser, valid_tool_names)

    return parser
Ejemplo n.º 4
0
def construct_parser_shared(description):
    """Used by the pipelines"""
    parser = argparse.ArgumentParser(description=description)
    parser = arg_pool.add_input_data_root(parser)
    parser = arg_pool.add_out_dir(parser)
    parser = arg_pool.add_log_dir(parser)
    parser = arg_pool.add_turn_off_null_nan(parser)
    parser = arg_pool.add_verbose(parser)
    parser = arg_pool.add_cod(parser)
    parser = arg_pool.add_epi(parser)
    parser = arg_pool.add_output_version(parser)
    parser = arg_pool.add_gbd_round_id(parser)
    parser = arg_pool.add_decomp_step(parser)
    parser = arg_pool.add_dual_upload(parser)

    # Needed by mock_framework
    valid_tool_names = ["dalynator", "burdenator"]
    parser = arg_pool.add_tool_names(parser, valid_tool_names, False)

    return parser
Ejemplo n.º 5
0
def construct_parser_burdenator_cleanup():
    """Create parser for burdenator cleanup"""
    parser = argparse.ArgumentParser(description='Run burdenator cleanup')
    parser = arg_pool.add_input_data_root(parser)
    parser = arg_pool.add_out_dir(parser)
    parser = arg_pool.add_loc_id(parser)
    parser = arg_pool.add_year_id(parser)
    parser = arg_pool.add_measure_id(parser, VALID_BURDENATOR_MEASURES)
    parser = arg_pool.add_gbd_round_group(parser)
    parser = arg_pool.add_decomp_step(parser)
    parser = arg_pool.add_cod(parser)
    parser = arg_pool.add_epi(parser)
    parser = arg_pool.add_turn_off_null_nan(parser)
    parser = arg_pool.add_output_version(parser)
    parser = arg_pool.add_star_ids(parser)
    parser = arg_pool.add_skip_cause_agg(parser)
    parser = arg_pool.add_verbose(parser)
    parser = arg_pool.add_dual_upload(parser)


    valid_tool_names = ["burdenator"]
    parser = arg_pool.add_tool_names(parser, valid_tool_names)
    parser = arg_pool.add_n_draws(parser)
    return parser