diff --git a/coordinator/ProcessorSurveys.py b/coordinator/ProcessorSurveys.py index 1a30d173a93cf0a5ae0e4da435559e2dccc8d47e..a215b992da1616d768ce179ef2cb120689b61fdf 100644 --- a/coordinator/ProcessorSurveys.py +++ b/coordinator/ProcessorSurveys.py @@ -339,8 +339,10 @@ class ProcessorSurveys(Processor): Path(output_directory).mkdir(parents=True, exist_ok=True) sources_path = run_case( - config_path = config['Survey']['pySourcesConfigFilename'], + config_path = config['Survey']['SourcesConfigFilename'], survey_path = group_surveys_filepath, + survey_format = config['Survey']['SurveyFormat'], + surveyor_name_col = config['Survey']['SurveyorNameCol'], reference_date = config['StartString'], # Day 0 (current day) is always included # Days -2,-1 and 0 are needed to initialise spores in NAME @@ -376,8 +378,10 @@ class ProcessorSurveys(Processor): Path(output_directory).mkdir(parents=True, exist_ok=True) sources_path = run_case( - config_path = config['Survey']['pySourcesConfigFilename'], + config_path = config['Survey']['SourcesConfigFilename'], survey_path = processed_surveys_filepath, + survey_format = config['Survey']['SurveyFormat'], + surveyor_name_col = config['Survey']['SurveyorNameCol'], reference_date = config['StartString'], # Day 0 (current day) is always included # Days -2,-1 and 0 are needed to initialise spores in NAME diff --git a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json b/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json index 9f067de00edc542a5534a91e0c7077e0d09b47e5..1f0e3cbbe79e339096da458f657bf00cbea6de2e 100644 --- a/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json +++ b/tests/test_data/test_deployment/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json @@ -41,6 +41,8 @@ }, "GroupBy" : ["Origin"], "GroupsToIgnore" : ["ODK-server", "kobo-server", "newODK", "newODK2", "CSV-CAM"], + "SurveyFormat" : "ODK", + "SurveyorNameCol" : "surveyor_infromation-surveyor_name", "SourcesRegionName" : "EastAfrica", "SourcesConfigFilename" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/configs/config_EastAfrica_mapspam2017.json" }, diff --git a/tests/test_data/test_deployment/regions/EastAfrica/resources/source_gen/configs/config_EastAfrica_mapspam2017.json b/tests/test_data/test_deployment/regions/EastAfrica/resources/source_gen/configs/config_EastAfrica_mapspam2017.json index 1360f7fadd287914d429a5f156856ec6b77e0cd8..135962384783b1548ce844e29aab352c1be15d16 100644 --- a/tests/test_data/test_deployment/regions/EastAfrica/resources/source_gen/configs/config_EastAfrica_mapspam2017.json +++ b/tests/test_data/test_deployment/regions/EastAfrica/resources/source_gen/configs/config_EastAfrica_mapspam2017.json @@ -1,13 +1,13 @@ { "config_name" : "EastAfrica", - "region_file" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/boundaries/EastAfrica_regions_small.shp", "wheat_source_name" : "MAPSPAM2017", - "wheat_file" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/spam2017V1r1_SSA_gr_H_WHEA_A.tif", - "wheat_file_rescaled" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/preprocessed/spam2017V1r1_SSA_gr_H_WHEA_A_rescaled_oneliner.tif", - "cluster_poly_file_no_wheat" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/boundaries/EastAfrica_clusters.shp", - "cluster_poly_file" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/preprocessed/EastAfrica_clusters_with_wheat_ha_MAPSPAM2017.shp", - "surveyor_name_col" : "surveyor_infromation-surveyor_name", + "wheat_file" : "NA", + "wheat_rasters_bydate" : { + "20170101" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/spam2017V1r1_SSA_gr_H_WHEA_A_small.tif" + }, + "cluster_poly_file" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/boundaries/EastAfrica_clusters_small.shp", "id_col" : "id", + "region_file" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/boundaries/EastAfrica_regions_small.shp", "region_id_col" : "REGION_ID", "wheat_stages_file" : "../../test_data/test_deployment/regions/EastAfrica/resources/source_gen/assets/approx_growth_timing_cleaned.csv" }