Closed monsieurtanuki closed 2 months ago
- We already have
Flavor
(off
,obf
,opf
,opff
andoff-pro
) for Prices andServerType
(off
,obf
,opf
andopff
) for Robotoff. Which one should we use for ourProduct
s? Or should we just stick to a mereString
for more flexibility?- As the field is supposed to be populated directly by the server in the future, what json tag would it be?
flavor
,source
?
@teolemon Those are blocking questions. Any answer would help solve the issue, and tons of related issues in Smoothie.
@monsieurtanuki please use the "product_type" field instead, with values "food", "beauty", "petfood" and "product". This is the field that will be added in the OFF database and API.
flavors may go away, it's better to use product_type
Ok good to know !
In https://github.com/openfoodfacts/open-prices I currently store it under Product.source
.
Also to note that we should update the openfoodfacts-python
package : https://github.com/openfoodfacts/openfoodfacts-python/blob/8d1013a01c8fa674c1c84fd1729b73c621b5edd3/openfoodfacts/types.py#L11 to also store/return these values (food, beauty, petfood, product) somehow :)
Why - Problem description
In order to manage off, obf, opf and opff at the same time, we need some additional data. Each product, each barcode should be associated with a flavor.
What - Proposed solution
Make flavor a new product field. That flavor may be provided by the server in a near future, but regardless, we get it from the server we're extracting the data from:
world.openbeautyfacts.org
) we get a flavor (e.g.obf
)Additional questions
Flavor
(off
,obf
,opf
,opff
andoff-pro
) for Prices andServerType
(off
,obf
,opf
andopff
) for Robotoff. Which one should we use for ourProduct
s? Or should we just stick to a mereString
for more flexibility?flavor
,source
?cf. https://github.com/openfoodfacts/smooth-app/issues/4540