-
-
Notifications
You must be signed in to change notification settings - Fork 359
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: quality test for nutriscore on olive oils #8360
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2c2a0a8
chore: test for nutriscore of olive oils without ingredients
stephanegigandet 6637330
added data quality error for expected nutriscore and ingredient
benbenben2 c1f5339
rm logs used for dev
benbenben2 ecdce3c
Merge branch 'main' into olive-oil-test
benbenben2 ba1d69e
make lint and fix error issued from resolve merge conflict
benbenben2 23c23a5
make check_perltidy found 2 empty lines. now fixed
benbenben2 7a0b913
aaply changes, updated tests, typo in tax
benbenben2 01e5806
removed unecessary test for nutriscore and added tax for quality errors
benbenben2 6d8e397
rework to use new function
benbenben2 49290ec
recreated test
benbenben2 1bd5f1c
update tests
stephanegigandet 8ff79c5
differentiate different ingredient from inexisting ingredients
stephanegigandet a5d7043
update tests
stephanegigandet c229ff9
update tests
stephanegigandet b0585e5
Merge branch 'main' into olive-oil-test
teolemon 15fdcb2
Merge branch 'main' into olive-oil-test
benbenben2 1b036da
make lint and make update_tests_results
benbenben2 5084698
fix: update tests results
alexgarel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -36,6 +36,14 @@ stopwords:nl:bevat,en | |||||||
stopwords:nl_be:bevat,en | ||||||||
stopwords:de:und,mit,von | ||||||||
|
||||||||
# add following tag for category having always same nutriscore grade | ||||||||
# only 1 letter is allowed | ||||||||
# expected_nutriscore_grade:en:c | ||||||||
# add following tag for category having always same ingredient | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
# only 1 ingredient tag is allowed (use "en:olive-oil" and not "en:Olive oil") | ||||||||
# expected_ingredients:en: en:olive-oil | ||||||||
|
||||||||
|
||||||||
# add following tag to ignore "Energy value in kJ does not correspond to the value calculated from the other nutrients error | ||||||||
# only for categories having nutrients that are not displayed in the nutrition table and contributing to the energy | ||||||||
# for example, lemon juices containing organic acid, it is forbidden to display organic acid in nutrition tables but | ||||||||
|
@@ -53129,6 +53137,8 @@ agribalyse_food_code:en:17270 | |||||||
ciqual_food_code:en:17270 | ||||||||
ciqual_food_name:en:Olive oil, extra virgin | ||||||||
ciqual_food_name:fr:Huile d'olive vierge extra | ||||||||
expected_nutriscore_grade:en:c | ||||||||
expected_ingredients:en: en:olive-oil | ||||||||
|
||||||||
<en:Olive oils | ||||||||
en:Olive pomace oils | ||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@stephanegigandet, is there a function that could be used there to make sure that the ingredient provided is in the ingredients taxonomy?
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.
there's an exist_taxonomy_tag() function, but that would imply that the ingredients taxonomy would need to be loaded and built before the categories taxonomy.
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.
then, I will leave it as is for now