-
Notifications
You must be signed in to change notification settings - Fork 180
feat: convert meta-checks to decorators #1188
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1188 +/- ##
==========================================
+ Coverage 94.40% 94.44% +0.03%
==========================================
Files 83 83
Lines 1162 1170 +8
==========================================
+ Hits 1097 1105 +8
Misses 65 65
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
suchow
left a comment
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.
Rather than implementing this as a meta-check, I think we should either:
- Create a decorator
@thresholdthat takes a parameter specifying the threshold ppm below above which errors will be flagged. - Do what we are currently doing with
max_errorsvia thetruncate_to_maxfunction.
I think I'd put in a vote for making both threshold and max_errors decorators that would work for all check types.
1c13437 to
a9a68fc
Compare
a9a68fc to
d869639
Compare
d869639 to
b4e4dda
Compare
b4e4dda to
d51501d
Compare
This relates to...
Adding threshold checks. This blocks #802. This is blocked by #1217 and #1218.
Rationale
This is useful for situations such as in
checks.typography.exclamation.30ppmwhere a PPM threshold metricdetermines whether to raise an error or not.
Changes
tools.threshold_checkchecks.typography.exclamationto usethreshold_checkFeatures
tools.threshold_checkBug Fixes
N/A.
Breaking Changes and Deprecations
N/A.