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

fix: ignore packaging_text if packagings already exists #8099

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

stephanegigandet
Copy link
Contributor

This is to avoid duplicate packaging components that are introduce if the packaging text specifies slightly different shapes than the packagings structured created by users (e.g. jar vs pot).

Fixes #8097

@stephanegigandet stephanegigandet requested a review from a team as a code owner February 14, 2023 07:29
@github-actions github-actions bot added 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🧪 tests labels Feb 14, 2023
@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
No Duplication information No Duplication information

@codecov-commenter
Copy link

Codecov Report

Merging #8099 (b56110e) into main (eea81e5) will increase coverage by 0.00%.
The diff coverage is 92.85%.

@@           Coverage Diff           @@
##             main    #8099   +/-   ##
=======================================
  Coverage   45.20%   45.20%           
=======================================
  Files         102      102           
  Lines       20272    20275    +3     
  Branches     4639     4639           
=======================================
+ Hits         9164     9166    +2     
  Misses      10011    10011           
- Partials     1097     1098    +1     
Impacted Files Coverage Δ
tests/unit/packaging.t 75.00% <ø> (ø)
lib/ProductOpener/Packaging.pm 72.58% <92.85%> (-0.08%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

Perfect !

@alexgarel
Copy link
Member

BTW I read an article the other day where the author said that in computer science inconsistency is more painful than complexity.
And there you have removed some inconsistency 🏆

@alexgarel alexgarel merged commit 185323a into main Feb 16, 2023
@alexgarel alexgarel deleted the ignore-packaging_text branch February 16, 2023 15:49
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 🧪 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use packaging_text only for initialization of the packagings data structure if it does not already exist
3 participants