Open teolemon opened 9 months ago
Can I work on this?
@IsaiahLevy Sure!
Some comments about this issue:
We are building a "product services" API that allows to run specific services (such as analyzing the ingredient list) on product data that is provided as input to the API. There is a test file to demonstrate some of that: https://github.com/openfoodfacts/openfoodfacts-server/blob/main/tests/integration/api_v3_product_services.t
So for this issue, the best solution would be to create a "check_quality" service that would run the quality checks from lib/ProductOpener/DataQuality.pm and send back the related dataquality*_tags fields.
The code for the existing product services is in https://github.com/openfoodfacts/openfoodfacts-server/blob/main/lib/ProductOpener/APIProductServices.pm
I'm bumping this one to P1, as it would be useful to many apps (ours, Macrofactor; Foodvisor…)
What
Create an API route to provide Quality Warnings and Errors on a given nutrition table (not related to a product)
Create an API route to provide Quality Warnings and Errors on a given ingredient list (not related to a product)
That would help on product addition/edition in the app to spot and warn users in real time with potential errors and warnings in real time
https://world.openfoodfacts.org/data-quality-error/nutrition-values-are-all-identical
https://world.openfoodfacts.org/data-quality-error/nutrition-errors
Even for new products, we could send values to a To be created™ route, that could send back potential errors and warnings in real time
Part of
5538
Originally posted by @teolemon in https://github.com/openfoodfacts/smooth-app/issues/3978#issuecomment-1914093869