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

feat: improved parsing of origins of ingredients #7398

Merged
merged 11 commits into from
Sep 27, 2022
Merged

Conversation

stephanegigandet
Copy link
Contributor

  • refactored the construction of the list of regexps that we use to match entries of a taxonomy in a string. This is used in particular for ingredients parsing, and packaging parsing. There was a lot of code that I had copy/pasted and modified. The common code is now in Tags.pm.
  • we now match things like "Origins of the ingredients: Spain, Italy and South America" or "Strawberries from France or Belgium".
  • added tests to cover the new matches
  • moved some tests out of /t and /test to /tests

@stephanegigandet stephanegigandet requested a review from a team as a code owner September 26, 2022 08:49
@github-actions github-actions bot added 🥗 Ingredients 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling Tags 🧪 tests labels Sep 26, 2022
@github-actions github-actions bot added the 🐋 Docker https://docker-curriculum.com/ label Sep 27, 2022
@sonarqubecloud
Copy link

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
0.0% 0.0% Duplication

Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

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

LGTM

@stephanegigandet stephanegigandet merged commit f14ca5a into main Sep 27, 2022
@stephanegigandet stephanegigandet deleted the tags-regexps branch September 27, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐋 Docker https://docker-curriculum.com/ 🥗 Ingredients 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling Tags 🧪 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants