예제 #1
0
def prepare_png_images(adict):
    """
    Processes raw tiff images, creates png images for web_apps.
    Creates data for web_app database population.
    Decides how png images will be distributed between a number of apps.
    """
    total_image_num = discover_how_many_tifs(adict["tif_path"])
    process_images.in_summary(adict)
    how_many_apps, images_per_app = t_d.the_decider(total_image_num, adict)
    return how_many_apps, images_per_app
예제 #2
0
def test_the_decider():
    """Tests `the_decider` component."""
    test_dict = return_testing_dictionary()
    set_up(test_dict)
    test_dict["meta_path"] = test_dict["test_known_alt"]
    try:
        how_many, images_per = the_decider.the_decider(1, test_dict)
        validate_results(how_many, images_per)
    finally:
        tear_down(test_dict)
    return None