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: associated packagings #7756

Merged
merged 14 commits into from
Dec 5, 2022
Merged

feat: associated packagings #7756

merged 14 commits into from
Dec 5, 2022

Conversation

teolemon
Copy link
Member

@teolemon teolemon commented Nov 24, 2022

What

  • Add associated packagings as comments
  • Some translated entries for materials
  • Add more shapes from a Wikipedia review
  • Add a new "Packaging" label category for FSC and PEFC
  • Add missing materials

Part of

@github-actions github-actions bot added 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies labels Nov 24, 2022
@teolemon
Copy link
Member Author

Failed test at tests/unit/ecoscore.t line 576.

Structures begin differing at:

$got->{packagings}[0]{material} = 'en:metal,en:aluminium,en:steel'

$expected->{packagings}[0]{material} = 'en:metal'

@@ -383,6 +397,7 @@ xx:PEmet, 07 PEmet, PEmet 07, 07PEmet, PEmet07, 7 PEmet, PEmet 7, 7PEmet, PEmet7
<xx:PE
en:MDPE - Medium-density polyethylene, Medium-density polyethylene
de:MDPE - Polyethylen mittlerer Dichte, Polyethylen mittlerer Dichte
fr:MDPE - Polyéthylène moyenne densité, Polyéthylène moyenne densité
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:MDPE - Polyéthylène moyenne densité, Polyéthylène moyenne densité
fr:07 - MDPE - Polyéthylène moyenne densité, Polyéthylène moyenne densité

Copy link
Member Author

Choose a reason for hiding this comment

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

@stephanegigandet ok with adding the number as a prefix, as proposed in the Packaging meeting ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's merge the PR as is without adding further changes, I will make a new PR with the numbers. We'll probably keep the acronym first and have the number second, so that suggestions work better. If the number is first, searching for "PET" will result in many PET + something composites etc. being suggested first.

xx:LLDPE, 07 LLDPE, LLDPE 07, 07LLDPE, LLDPE07, 7 LLDPE, LLDPE 7, 7LLDPE, LLDPE7, PE-LLD, 07 PE-LLD, PE-LLD 07, 07PE-LLD, PE-LLD07, 7 PE-LLD, PE-LLD 7, 7PE-LLD, PE-LLD7
wikidata:en:Q1863987

<en:Multilayer composite
<xx:PET
en:PETmet - Metalized polyethylene terephthalate, Metalized polyethylene terephthalate
de:PETmet - Metallisiertes Polyethylenterephthalat, Metallisiertes Polyethylenterephthalat
fr:PETmet - Polyéthylène téréphtalate métallisé
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:PETmet - Polyéthylène téréphtalate métallisé
fr:07 - PETmet - Polyéthylène téréphtalate métallisé, Polyéthylène téréphtalate métallisé

@@ -363,13 +375,15 @@ wikidata:en:Q413769
<xx:PE
en:LLDPE - Linear low-density polyethylene, Linear low-density polyethylene
de:LLDPE - Lineares Polyethylen niedriger Dichte, Lineares Polyethylen niedriger Dichte
fr:LLDPE - Polyéthylène basse densité linéaire, Polyéthylène basse densité linéaire
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:LLDPE - Polyéthylène basse densité linéaire, Polyéthylène basse densité linéaire
fr:07 - LLDPE - Polyéthylène basse densité linéaire, Polyéthylène basse densité linéaire

@@ -323,6 +333,7 @@ wikidata:en:Q62246
<en:Other plastics
en:PA - Polyamide, Polyamide
de:PA - Polyamide, Polyamide
fr:PA - Polyamide, Polyamide
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:PA - Polyamide, Polyamide
fr:07 - PA - Polyamide, Polyamide

@@ -315,6 +324,7 @@ non_recyclable_and_non_biodegradable:en:yes
<en:Other plastics
en:PC - Polycarbonate, Polycarbonate
de:PC - Polycarbonate, Polycarbonate
fr:PC - Polycarbonate, Polycarbonate
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:PC - Polycarbonate, Polycarbonate
fr:07 - PC - Polycarbonate, Polycarbonate

@@ -124,6 +128,7 @@ non_recyclable_and_non_biodegradable:en:no
<en:Other plastics
en:PVDC - Polyvinylidene chloride, Polyvinylidene chloride
de:PVDC - Polyvinylidenchlorid, Polyvinylidenchlorid
fr:PVDC - Chlorure de polyvinylidène, Chlorure de polyvinylidène
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:PVDC - Chlorure de polyvinylidène, Chlorure de polyvinylidène
fr:01 - PVDC - Chlorure de polyvinylidène, Chlorure de polyvinylidène

@@ -275,11 +281,13 @@ non_recyclable_and_non_biodegradable:en:no
<xx:PP
en:CPP - Cast PolyPropylen, Cast PolyPropylen
de:CPP - Ungerecktes Polypropylen
fr:CPP - Polypropylène coulé, Polypropylène coulé
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:CPP - Polypropylène coulé, Polypropylène coulé
fr:05 - CPP - Polypropylène coulé, Polypropylène coulé

xx:CPP, PP-C, 05 CPP, CPP 05, 5 CPP, CPP 5, 05CPP, CPP05, 5CPP, CPP5, 05 PP-C, PP-C 05, 5 PP-C, PP-C 5, 05PP-C, PP-C05, 5PP-C, PP-C5

<xx:PP
en:OPP - Oriented PolyPropylen, Oriented PolyPropylen
de:OPP - Orientiertes Polypropylen
fr:OPP - PolyPropylène Orienté, PolyPropylène Orienté
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
fr:OPP - PolyPropylène Orienté, PolyPropylène Orienté
fr:05 - OPP - PolyPropylène Orienté, PolyPropylène Orienté

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.

Let's merge as is.

@stephanegigandet stephanegigandet marked this pull request as ready for review December 5, 2022 11:54
@stephanegigandet
Copy link
Contributor

Tests are failing, probably need to be updated, I'll look into it.

@stephanegigandet
Copy link
Contributor

Tests are failing because the default "packaging_materials:en: en:metal" was removed for en:can, I will add it back.

@teolemon
Copy link
Member Author

teolemon commented Dec 5, 2022

@stephanegigandet I've added the fix so that tests can start running

@stephanegigandet stephanegigandet requested a review from a team as a code owner December 5, 2022 14:18
@github-actions github-actions bot added 🥜 Allergens 🧬 Taxonomies - Rebuild Taxonomies are compiled before they can be used. 🧪 tests labels Dec 5, 2022
@sonarcloud
Copy link

sonarcloud bot commented Dec 5, 2022

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

@stephanegigandet stephanegigandet merged commit be9391f into main Dec 5, 2022
@stephanegigandet stephanegigandet deleted the packaging-tgv branch December 5, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🥜 Allergens categories labels 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🧬 Taxonomies - Rebuild Taxonomies are compiled before they can be used. 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🧪 tests
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants