-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid dynamic validation when no files are exported #1773
Conversation
…Skid/covidcast-indicators into issue1746_validator-no-output
merge from main
@@ -63,5 +63,5 @@ def validate(self): | |||
all_frames = [] | |||
else: | |||
all_frames = aggregate_frames(frames_list) | |||
self.dynamic_validation.validate(all_frames, report) | |||
self.dynamic_validation.validate(all_frames, report) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: all_frames isn't needed when frames_list is empty
could we replace the entire if block with something like this instead?
if len(frames_list) > 0:
self.dynamic_validation.validate(aggregate_frames(frames_list), report)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense and would look much cleaner. I'll put that in and do some testing.
…Skid/covidcast-indicators into issue1746_validator-no-output
Update branch from main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 good fix!
Description
Fixes exceptions caused by dynamic validation, where dataframe commands were failing on empty dataframes. If no export files are found after the indicator run, dynamic validation will be skipped as the static validation will perform the check for an empty file list.
Changelog
validate.py
Fixes