Skip to content

fix: Lacto-ovo-vegetarian taxonomy #11852

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

Freso
Copy link
Collaborator

@Freso Freso commented May 3, 2025

Currently the lacto- and ovo-vegetarian labels both derive from lacto-ovo-vegetarian, which will almost always be wrong. Ovo-vegetarians consume eggs but not dairy, while lacto-vegetarians consume dairy but not eggs—ovo-lacto-vegetarians consume both dairy and eggs.

This makes the en:Ovo-lacto-vegetarian labels instead be a parent of en:Lacto-vegetarian and en:Ovo-vegetarian instead, since anything that is either lacto- or oco-vegetarian will also be ovo-lacto-vegetarian. en:Ovo-lacto-vegetarian is additionally made a child of en:Vegetarian since the ovo/lacto modifier adds additional restrictions, so vegetarians who still consume non-human animal byproducts (like dairy and eggs) will be fine with this.

@github-actions github-actions bot added the 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies label May 3, 2025
@github-project-automation github-project-automation bot moved this to To discuss and validate in 🍊 Open Food Facts Server issues May 3, 2025
@Freso Freso moved this to Needs review in Product Opener Weekly Review May 3, 2025
@codecov-commenter
Copy link

codecov-commenter commented May 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.29%. Comparing base (e8deee5) to head (aab7d08).
Report is 142 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11852      +/-   ##
==========================================
+ Coverage   49.88%   50.29%   +0.40%     
==========================================
  Files          83       84       +1     
  Lines       22984    23119     +135     
  Branches     5508     5532      +24     
==========================================
+ Hits        11466    11628     +162     
+ Misses      10121    10072      -49     
- Partials     1397     1419      +22     

☔ View full report in Codecov by Sentry.
📢 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.

@Freso Freso force-pushed the freso/taxonomy/lacto-ovo-vegetarianism branch from 2e37e89 to ceb2b18 Compare May 3, 2025 19:20
@Freso Freso requested a review from a team as a code owner May 3, 2025 19:20
@Freso Freso force-pushed the freso/taxonomy/lacto-ovo-vegetarianism branch 3 times, most recently from fd70d33 to 6c6fb26 Compare May 4, 2025 08:08
@Freso Freso changed the title fix: Lacto-ovo-vegetarianism taxonomy fix: Lacto-ovo-vegetarian taxonomy May 4, 2025
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.

I'm not too sure about the "Contains milk" label. It's not really a label, if we want to find products that contain milk, then using the ingredients en:milk tag is the way to go.

@Freso
Copy link
Collaborator Author

Freso commented May 5, 2025

@stephanegigandet Is it possible to have incompatible_with:en: ingredients:en:dairy and match that against labels with ingredients:en: en:dairy (ideally as well as children of ingredients:en:dairy)? This PR was split out of my vegan label tightening, where I’ve also marked en: Contains milk as a child of en: Non-vegan, which will, in turn, cause all of the milk labels to get marked as not vegan due to the label override code, even if they have no ingredients listed or all (non-vegan) ingredients are unknown. I could mark all the milk labels with < en:Non-vegan directly, but this felt like a better approach.

(I also realise that this would all be better once we store derived and actually entered items separately, but I’m not sure how far off in the future that is, ie., whether to wait for this to manifest.)

Currently the lacto- and ovo-vegetarian labels both derive from
lacto-ovo-vegetarian, which will almost always be wrong. Ovo-vegetarians
consume eggs but not dairy, while lacto-vegetarians consume dairy but
not eggs—ovo-lacto-vegetarians consume both dairy and eggs.

This makes the `en:Ovo-lacto-vegetarian` labels instead be a parent of
`en:Lacto-vegetarian` and `en:Ovo-vegetarian` instead, since anything
that is either lacto- or oco-vegetarian will also be
ovo-lacto-vegetarian. `en:Ovo-lacto-vegetarian` is additionally made a
child of `en:Vegetarian` since the ovo/lacto modifier adds additional
restrictions, so vegetarians who still consume non-human animal
byproducts (like dairy and eggs) will be fine with this.
@Freso Freso force-pushed the freso/taxonomy/lacto-ovo-vegetarianism branch from 6c6fb26 to aab7d08 Compare May 7, 2025 21:28
@Freso Freso requested a review from stephanegigandet May 7, 2025 21:29
@Freso
Copy link
Collaborator Author

Freso commented May 7, 2025

I took out the < en:Contains milk bits for now, to not hold up the rest of this longer than necessary.

Copy link

sonarqubecloud bot commented May 7, 2025

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.

Thank you

@github-project-automation github-project-automation bot moved this from To discuss and validate to Done in 🍊 Open Food Facts Server issues May 13, 2025
@stephanegigandet stephanegigandet merged commit 19ddf31 into main May 13, 2025
17 checks passed
@stephanegigandet stephanegigandet deleted the freso/taxonomy/lacto-ovo-vegetarianism branch May 13, 2025 07:29
@github-project-automation github-project-automation bot moved this from Needs review to Done in Product Opener Weekly Review May 13, 2025
stephanegigandet pushed a commit that referenced this pull request May 13, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.66.0](v2.65.0...v2.66.0)
(2025-05-13)


### Features

* Add weight % for single-item packaging
([#11855](#11855))
([bcdb799](bcdb799))
* adding button to report image on view image page
([#11849](#11849))
([a4390a5](a4390a5))
* Use multiplication symbol for packaging counts
([#11857](#11857))
([2d65a1c](2d65a1c))


### Bug Fixes

* Lacto-ovo-vegetarian taxonomy
([#11852](#11852))
([19ddf31](19ddf31))
* remove 250 and more for search size
([#11856](#11856))
([89d96cf](89d96cf))
* Tests fail when run locally
([#11864](#11864))
([e8ed7bd](e8ed7bd))
* text extraction issue for CZ and LT
([#11877](#11877))
([22fd44d](22fd44d))

---
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
🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🧪 tests Vegetarian
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants