-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
feat: add data quality warning for serving size without digit #8057
feat: add data quality warning for serving size without digit #8057
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8057 +/- ##
==========================================
+ Coverage 44.70% 44.72% +0.02%
==========================================
Files 100 100
Lines 20212 20220 +8
Branches 4636 4637 +1
==========================================
+ Hits 9035 9043 +8
Misses 10103 10103
Partials 1074 1074
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Stéphane Gigandet <[email protected]>
Thank you @stephanegigandet |
Hi @benbenben2, you need to run "make lint", and perltidy will change the indentation, split long lines etc. |
Kudos, SonarCloud Quality Gate passed! |
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!
Didn't have time to thank you, it's great! |
* Add en:Serving size is missing digits See #5163 and #8057. * ci: autolabel changes to the taxo --------- Co-authored-by: Pierre Slamich <[email protected]>
Tested on Gitpod
Related to:
Questions (and answers):
-> decision: yes
-> decision: all (option 2) because as stated by @CharlesNepote "when users are often seeing this value they can think it's a good value" (Quality facet - Nutrition - serving_size="serving" for data-quality #5163)
-> in
lib/ProductOpener/Food.pm
, the subroutinenormalize_serving_size
extracts any digit and return it or 0 if nothing is found.3.1. can this be used to setup the error?
-> it cannot be serving_quantity (using normalize_serving_size) because serving_quantity is undefined if the value is something like "serving 1 and serving 2 and serving 3", which contain digit
-> existing one is "en:serving-size-in-mg"
-> plural was used for "EcoScore - threatened species - Ingredients missing"
hence, "en:serving-size-is-missing-digits" seems to be a good choice