From 8c7b0aef219058305f7d915b6c4b2502a43d972b Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Thu, 25 Jan 2024 17:27:47 +0000 Subject: [PATCH] more work getting rid of csv references --- coordinator/ProcessorEnvironment.py | 10 +++++----- tests/integration/test_suites/env_suit_test_suite.py | 6 +++--- tests/integration/test_suites/epi_test_suite.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/coordinator/ProcessorEnvironment.py b/coordinator/ProcessorEnvironment.py index 5780126..36082c8 100644 --- a/coordinator/ProcessorEnvironment.py +++ b/coordinator/ProcessorEnvironment.py @@ -180,7 +180,7 @@ class ProcessorEnvironment(Processor): for region in subregions: output_dir = f"{jobPath}/plotting/{region.lower()}" - csv_template_dir = input_dir + "/{DISEASE_DIR}/RIE_value.nc" + rie_template_dir = input_dir + "/{DISEASE_DIR}/RIE_value.nc" Path(output_dir).mkdir(parents=True, exist_ok=True) @@ -199,16 +199,16 @@ class ProcessorEnvironment(Processor): run_params_file_arg = run_config, es_output_dir_arg = output_dir, issue_date_arg = config['StartString'], - disease_csv_template_arg = csv_template_dir) + disease_nc_template_arg = rie_template_dir) env_suit_processor.run_params.FILTER_FOR_COUNTRY = (filter_for_country.upper() == "TRUE") # Include further diseases in plotting. In this case the irrigated suitabilite for the rusts. # TODO: move this part out into a config extra_diseases = [ - EnvSuitDiseaseInfo("Stem rust temp-only", "stem_rust_temponly", config['StartString'], "StemRust_TempOnly", csv_template_dir), - EnvSuitDiseaseInfo("Leaf rust temp-only", "leaf_rust_temponly", config['StartString'], "LeafRust_TempOnly", csv_template_dir), - EnvSuitDiseaseInfo("Stripe rust temp-only", "stripe_temponly", config['StartString'], "StripeRust_TempOnly", csv_template_dir), + EnvSuitDiseaseInfo("Stem rust temp-only", "stem_rust_temponly", config['StartString'], "StemRust_TempOnly", rie_template_dir), + EnvSuitDiseaseInfo("Leaf rust temp-only", "leaf_rust_temponly", config['StartString'], "LeafRust_TempOnly", rie_template_dir), + EnvSuitDiseaseInfo("Stripe rust temp-only", "stripe_temponly", config['StartString'], "StripeRust_TempOnly", rie_template_dir), ] env_suit_processor.add_diseases(diseases=extra_diseases) diff --git a/tests/integration/test_suites/env_suit_test_suite.py b/tests/integration/test_suites/env_suit_test_suite.py index 95cdca5..8981a64 100644 --- a/tests/integration/test_suites/env_suit_test_suite.py +++ b/tests/integration/test_suites/env_suit_test_suite.py @@ -59,13 +59,13 @@ class BaseEnvSuitTestSuite: self.assertTrue(eth_file_exists) - def test_standard_run_all_input_csvs_produced(self): + def test_standard_run_all_input_ncs_produced(self): east_africa_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH, IntegrationTestUtils.TEST_JOB_DIR, - "plotting", "eastafrica", "input_csvs", "*.nc") + "plotting", "eastafrica", "input_nc", "*.nc") ethiopia_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH, IntegrationTestUtils.TEST_JOB_DIR, - "plotting", "ethiopia", "input_csvs", "*.nc") + "plotting", "ethiopia", "input_nc", "*.nc") ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_csv_path) eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_csv_path) diff --git a/tests/integration/test_suites/epi_test_suite.py b/tests/integration/test_suites/epi_test_suite.py index 30c46dd..c2b08dd 100644 --- a/tests/integration/test_suites/epi_test_suite.py +++ b/tests/integration/test_suites/epi_test_suite.py @@ -67,7 +67,7 @@ class BaseEpiTestSuite: input_csvs_root = os.path.join(IntegrationTestUtils.TEST_OUT_PATH, IntegrationTestUtils.TEST_JOB_DIR, "plotting", - "input_csvs", + "input_nc", "*stem*") self.check_wildcard_exists_and_not_empty(input_csvs_root, ".nc") -- GitLab