-
-
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
taxonomy: boolean added for european countries + ecobalyse id is adapted for organic ingredients #10929
Open
very-smartin
wants to merge
33
commits into
main
Choose a base branch
from
ecobalyse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
taxonomy: boolean added for european countries + ecobalyse id is adapted for organic ingredients #10929
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
44cf545
taxonomy: a new function assign_property_to_ingredients has been adde…
very-smartin 41f3fd1
Merge branch 'main' into ecobalyse
very-smartin b5ab63e
updated tests
stephanegigandet 49c07ef
lint
stephanegigandet e4d6e54
Merge branch 'main' into ecobalyse
very-smartin 9b29b75
Merge branch 'main' into ecobalyse
very-smartin a606d32
Merge branch 'main' into ecobalyse
very-smartin 98560d5
taxonomy: a new key has been added in country.txt in order to know if…
very-smartin ebb3add
Erratum in MakeFile
very-smartin 9b2741b
ecobalyse: a boolean has been added in the country taxonomy for europ…
very-smartin 2458c0c
ecobalyse: a boolean has been added in the country taxonomy for europ…
very-smartin 8d449e7
Merge branch 'main' into ecobalyse
very-smartin fed86f1
test: Update tests results
150348f
chore: Linting changes
34ad737
Merge branch 'main' into ecobalyse
very-smartin f1803f6
taxonomy: changing the function assign_property_to_ingredient
very-smartin 1273fd3
taxonomy: resolving conflicts
very-smartin 43448e0
taxonomy: changing the function assign_property_to_ingredient
very-smartin 7302c37
Merge branch 'main' into ecobalyse
very-smartin 2206fea
taxonomy; new version of the get_missing_ecobalyse_ids function
very-smartin 678a2a7
Merge branch 'main' into ecobalyse
very-smartin 28d0a36
Merge branch 'main' into ecobalyse
very-smartin 7034337
taxonomy: adressing bugsin Ingredients.pm
very-smartin ca5d35f
Merge branch 'main' into ecobalyse
very-smartin 96b0cfd
tackling (again) Perl errors
very-smartin d5ae6fa
Merge branch 'main' into ecobalyse
very-smartin 995ade1
tackling (again) Perl errors
very-smartin 97695e3
Merge branch 'ecobalyse' of https://github.com/openfoodfacts/openfood…
very-smartin 0828916
tackling (again) Perl errors
very-smartin 5e5a8e2
chore: Linting changes
be2e361
Merge branch 'main' into ecobalyse
very-smartin 1b69d54
Correcting tests/unit for ecobalyse
very-smartin bea6622
Merge branch 'main' into ecobalyse
very-smartin 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
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
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.
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.
This approach won't work if we have an organic ingredient for which we have a general ecobalyse match, but no organic ecobalyse match.
e.g. if we have "organic pear", in the ingredients, we don't have it in Ecobalyse:
ecobalyse:en: pear-eu
ecobalyse_origins_en_france:en: pear-fr
but we need to fallback on pear-eu.
So I suggest a different approach:
Based on the labels, origins etc. of the product, construct a list of prioritized ecobalyse suffixes.
e.g. if the product is "organic pear from france", we might want to get:
(or maybe a different order, depending on what we consider more important: the origin or the label)
Then we check if we have those as ecobalyse properties for "en:pear", and we stop at the first one we find.
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 point indeed, i'll change my code consequently