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

Looks like saturated_fat value has to be rounded #2

Open
zedalaye opened this issue Sep 7, 2022 · 1 comment
Open

Looks like saturated_fat value has to be rounded #2

zedalaye opened this issue Sep 7, 2022 · 1 comment

Comments

@zedalaye
Copy link

zedalaye commented Sep 7, 2022

I'm porting your code to Delphi (yes) and as I was using the OpenFoodFact Nutriscore Test suite I discovered that Saturated-Fat value has to be rounded to closest integer.

See this OpenSourceFacts test suite comment :
https://github.com/openfoodfacts/openfoodfacts-server/blob/main/tests/unit/nutriscore.t#L59

score_value(@nutrients.fat_saturated, 0..10) do |v|

@wvengen
Copy link
Member

wvengen commented Dec 16, 2022

Thank you for your input, very relevant!
I'm curious if we can find the rounding requirement in the source documents, then I'd be happy to correct that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants