From 13bd4ad47f39ecb61201fd8c991403c27964ca2a Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 31 Jan 2022 13:23:18 -0700 Subject: [PATCH] Per #1289, rename function to be more clear --- .../pytests/series_analysis/test_series_analysis.py | 12 ++++++------ metplus/wrappers/series_analysis_wrapper.py | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal_tests/pytests/series_analysis/test_series_analysis.py b/internal_tests/pytests/series_analysis/test_series_analysis.py index f8ec19e35..eb80c34ee 100644 --- a/internal_tests/pytests/series_analysis/test_series_analysis.py +++ b/internal_tests/pytests/series_analysis/test_series_analysis.py @@ -692,9 +692,9 @@ def test_get_all_files_and_subset(metplus_config, time_info, expect_fcst_subset, ]), ] ) -def test_create_ascii_storm_files_list(metplus_config, config_overrides, - time_info, storm_id, lead_group, - expect_fcst_subset, expect_obs_subset): +def test_get_fcst_and_obs_path(metplus_config, config_overrides, + time_info, storm_id, lead_group, + expect_fcst_subset, expect_obs_subset): all_config_overrides = { 'LOOP_BY': 'INIT', 'SERIES_ANALYSIS_RUNTIME_FREQ': 'RUN_ONCE', @@ -757,9 +757,9 @@ def test_create_ascii_storm_files_list(metplus_config, config_overrides, if os.path.exists(obs_file_path): os.remove(obs_file_path) - fcst_path, obs_path = wrapper._create_ascii_storm_files_list(time_info, - storm_id, - lead_group) + fcst_path, obs_path = wrapper._get_fcst_and_obs_path(time_info, + storm_id, + lead_group) assert(fcst_path == fcst_file_path and obs_path == obs_file_path) with open(fcst_file_path, 'r') as file_handle: diff --git a/metplus/wrappers/series_analysis_wrapper.py b/metplus/wrappers/series_analysis_wrapper.py index d4e48f95f..f2e3b702e 100755 --- a/metplus/wrappers/series_analysis_wrapper.py +++ b/metplus/wrappers/series_analysis_wrapper.py @@ -464,9 +464,9 @@ def run_at_time_once(self, time_info, lead_group=None): for storm_id in storm_list: # Create FCST and OBS ASCII files fcst_path, obs_path = ( - self._create_ascii_storm_files_list(time_info, - storm_id, - lead_group) + self._get_fcst_and_obs_path(time_info, + storm_id, + lead_group) ) if not fcst_path or not obs_path: self.log_error('No ASCII file lists were created. Skipping.') @@ -611,7 +611,7 @@ def compare_time_info(self, runtime, filetime): return bool(filetime['storm_id'] == runtime['storm_id']) - def _create_ascii_storm_files_list(self, time_info, storm_id, lead_group): + def _get_fcst_and_obs_path(self, time_info, storm_id, lead_group): """! Creates the list of ASCII files that contain the storm id and init times. The list is used to create an ASCII file which will be used as the option to the -obs or -fcst flag to the MET