Skip to content

Commit

Permalink
per #2460, added check to report error if allowed missing input thres…
Browse files Browse the repository at this point in the history
…hold is met, ci-run-all-cases
  • Loading branch information
georgemccabe committed Jan 26, 2024
1 parent 91e4935 commit daac6c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions metplus/wrappers/runtime_freq_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ def run_all_times(self):

self.run_all_times_custom(custom_string)

# if missing inputs are allowed, check threshold to report error
if self.c_dict['ALLOW_MISSING_INPUTS']:
success_rate = 1 - (self.missing_input_count / self.run_count)
allowed_rate = self.c_dict['INPUT_THRESH']
if success_rate < allowed_rate:
self.log_error(
f'Too many {wrapper_instance_name} runs had missing inputs '
f'({success_rate} < {allowed_rate}). '
f'{self.missing_input_count} out of {self.run_count} runs '
'had missing inputs.'
)

return self.all_commands

def run_all_times_custom(self, custom):
Expand Down

0 comments on commit daac6c9

Please sign in to comment.