Skip to content

fix: match product packagings and categories to Ecobalyse packaging entries - WIP - #14287

Open
stephanegigandet wants to merge 4 commits into
mainfrom
ecobalyse-packagings
Open

fix: match product packagings and categories to Ecobalyse packaging entries - WIP#14287
stephanegigandet wants to merge 4 commits into
mainfrom
ecobalyse-packagings

Conversation

@stephanegigandet

Copy link
Copy Markdown
Contributor

Ecobalyse defines ~600 standard packaging for food products, e.g.

"activityName" : "Olive oil, 0,75L | Packaging System, N0, All, Glass bottle {FR} U",
"displayName" : "Bouteille en verre et bouchon plastique pour huile d'olive - 0,5L à 1L",

This PR includes scripts to parse / analyze those entries, to match to the OFF category taxonomy, and an algorithm to then use those to find the best matching entry for a product, considering its packaging components and its categories.

Note: the PR (research, plan, documentation, code and test) was done with the help of AI (free models from Kilo in VSCode).

@stephanegigandet

Copy link
Copy Markdown
Contributor Author

/update_tests_results

@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.81356% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.59%. Comparing base (be295b4) to head (acb6620).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/ProductOpener/EnvironmentalImpact.pm 78.44% 11 Missing and 14 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14287      +/-   ##
==========================================
+ Coverage   50.31%   55.59%   +5.28%     
==========================================
  Files         103      104       +1     
  Lines       26400    26576     +176     
  Branches     6316     6361      +45     
==========================================
+ Hits        13282    14774    +1492     
+ Misses      11357     9861    -1496     
- Partials     1761     1941     +180     
Flag Coverage Δ
integration-test-group-1 13.04% <2.54%> (?)
integration-test-group-2 9.17% <2.54%> (?)
integration-test-group-3 9.34% <2.54%> (?)
integration-test-group-4 33.27% <2.54%> (?)
integration-test-group-5 28.65% <2.54%> (?)
integration-test-group-6 9.11% <2.54%> (?)
integration-test-group-7 9.59% <2.54%> (?)
integration-test-group-8 28.19% <2.54%> (?)
integration-test-group-9 26.53% <2.54%> (?)
unit-test-group-1 22.60% <2.54%> (-2.42%) ⬇️
unit-test-group-2 30.23% <2.54%> (-1.05%) ⬇️
unit-test-group-3 27.06% <2.54%> (-6.53%) ⬇️
unit-test-group-4 34.91% <2.54%> (+12.61%) ⬆️
unit-test-group-5 19.80% <78.81%> (-8.51%) ⬇️
unit-test-group-6 27.80% <2.54%> (+6.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling labels Aug 19, 2026
@stephanegigandet

Copy link
Copy Markdown
Contributor Author

/update_tests_results

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling Tags 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🧪 tests

Projects

Status: To discuss and validate
Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants