Skip to content
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: Added unknown Croatian ingredients to the taxonomy (part 8) #9227

Merged
merged 4 commits into from
Nov 20, 2023

Conversation

benbenben2
Copy link
Collaborator

What

  • added HR in taxonomy
  • "Pasterizirano mlijeko (s 1.0% mliječne masti)" part in parenthesis is not ingredient but apply to previous ingredient. Also, not processing, also not sub ingredient... hence, tries category-type
  • added %max_regexp. But that may cause issue for percentage calculation:
    issue for max: 1st ingredient is 70% min, 2nd 30% max, and there are more ingredients but estimated at 0...
    https://hr.openfoodfacts.org/product/3850355006779/salakis-feta-president

Related issue(s) and discussion

  • Fixes #-none-

@benbenben2 benbenben2 requested a review from a team as a code owner October 29, 2023 19:32
@github-actions github-actions bot added 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🥗 Ingredients 🧪 additives 🧪 tests 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 🥗 Ingredients - processing labels Oct 29, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (39a7ae2) 48.14% compared to head (dd7b671) 48.15%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9227      +/-   ##
==========================================
+ Coverage   48.14%   48.15%   +0.01%     
==========================================
  Files          65       65              
  Lines       20341    20345       +4     
  Branches     4931     4931              
==========================================
+ Hits         9794     9798       +4     
  Misses       9296     9296              
  Partials     1251     1251              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benbenben2 benbenben2 marked this pull request as draft November 3, 2023 17:23
@teolemon teolemon added the 🇭🇷 Croatia https://hr.openfoodfacts.org/ label Nov 7, 2023
@benbenben2 benbenben2 marked this pull request as ready for review November 7, 2023 16:47
@teolemon teolemon changed the title taxonomy: tax_hr_unknown_ingred_8 taxonomy: Added unknown Hungarian ingredients to the taxonomy (part 8) Nov 9, 2023
@benbenben2 benbenben2 changed the title taxonomy: Added unknown Hungarian ingredients to the taxonomy (part 8) taxonomy: Added unknown Croatian ingredients to the taxonomy (part 8) Nov 14, 2023
# start by "with etc." should be added at the end of the previous ingredient
my %with = (hr => '(s | sa )',);
my $with = $with{$lc} || " will not match ";
if ($b =~ /^(s |sa )/i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ($b =~ /^(s |sa )/i) {
if ($b =~ /^$with/i) {

Copy link

sonarcloud bot commented Nov 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

At some point we'll need to handle better the parsing of min and max so that the value go to percent_min and percent_max, but we can do that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧪 additives 🇭🇷 Croatia https://hr.openfoodfacts.org/ 🥗 Ingredients - processing 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis Ingredients processing 🥗 Ingredients ingredients 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🧪 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants