Skip to content

Commit

Permalink
Per #1289, rename function to be more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Jan 31, 2022
1 parent 9832871 commit 13bd4ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions internal_tests/pytests/series_analysis/test_series_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions metplus/wrappers/series_analysis_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 13bd4ad

Please sign in to comment.