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: determine packaging components in contact with food #11238

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

stephanegigandet
Copy link
Contributor

Some simple rules (to start) to determine which packaging components are in contact with food.

See https://docs.google.com/document/d/1GFWM7TBQwBQ2UJ_WSgmk4VYkHl0W7wmdTPHprwJlsxY/edit?tab=t.0#heading=h.i1wspmuo16w4 for discussion.

Exposed as a separate service.

Currently computed and displayed only for moderators, for testing.

@stephanegigandet stephanegigandet requested a review from a team as a code owner January 13, 2025 15:52
@github-actions github-actions bot added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🧪 tests 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. Display 🌐 Translations labels Jan 13, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 72.94118% with 23 lines in your changes missing coverage. Please review.

Project coverage is 49.34%. Comparing base (79e63cd) to head (8cb4012).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/ProductOpener/PackagingFoodContact.pm 74.39% 17 Missing and 4 partials ⚠️
lib/ProductOpener/Display.pm 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11238      +/-   ##
==========================================
+ Coverage   49.25%   49.34%   +0.08%     
==========================================
  Files          78       79       +1     
  Lines       22418    22503      +85     
  Branches     5372     5386      +14     
==========================================
+ Hits        11043    11105      +62     
- Misses      10019    10038      +19     
- Partials     1356     1360       +4     

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

@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label Jan 13, 2025
@github-actions github-actions bot removed the 💥 Merge Conflicts 💥 Merge Conflicts label Jan 15, 2025
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.

Great !


=cut

sub determine_food_contact_of_packaging_components ($packagings_ref) {
Copy link
Member

Choose a reason for hiding this comment

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

I appreciate that you separate the _service and the action by itself !

@stephanegigandet stephanegigandet merged commit c5cda35 into main Jan 17, 2025
16 checks passed
@stephanegigandet stephanegigandet deleted the food-contact branch January 17, 2025 08:00
stephanegigandet pushed a commit that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.55.0](v2.54.0...v2.55.0)
(2025-01-17)


### Features

* determine packaging components in contact with food
([#11238](#11238))
([c5cda35](c5cda35))
* serve content without header and footer for mobile app
([#11245](#11245))
([662a96b](662a96b))


### Bug Fixes

* Green-Score attributes/panels titles and subtitles
([#11244](#11244))
([1eb84a5](1eb84a5))
* more positive messages for Nova 4
([#11231](#11231))
([79e63cd](79e63cd))
* Update fundraiser text to 2025
([#11248](#11248))
([b88f43e](b88f43e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) Display 🧪 integration tests 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests 🌐 Translations
Development

Successfully merging this pull request may close these issues.

3 participants