-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[MAINTENANCE] dry up validation status calc #8962
Conversation
✅ Deploy Preview for niobium-lead-7998 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
def calc_validation_statistics( | ||
validation_results: list[ExpectationValidationResult], | ||
) -> ValidationStatistics: | ||
""" | ||
Calculate summary statistics for the validation results and | ||
return ``ExpectationStatistics``. | ||
""" |
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.
Do we envision this ever living on an object?
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.
IDK I thought about just making it a static method on ValidationStatistics
. I don't really have strong opinions though. Seems like wrapping it in another class might be YAGNI though.
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.
Thank you!
We had 2 basically identical implementations of the same private method. This just moves it to a central location and removes the
_
prefix. Note: this moves the stats to a new file to avoid a circular import that I suspect was the initial driver for the duplication.invoke lint
(usesblack
+ruff
)For more information about contributing, see Contribute.
After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!