-
Notifications
You must be signed in to change notification settings - Fork 9
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
chore(data): New ingredients #814
base: master
Are you sure you want to change the base?
Conversation
Also force to select a contributor
c Veuillez saisir le message de validation pour vos modifications. Les lignes
display the ecoscore and columns with percentage
save button if the search results does not return exactly one result
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just reviewing updated Elm code here. I'll leave others validating the rest of the changes.
|> Expect.within (Expect.Absolute 0.01) 478.0375489673356 | ||
|> Expect.within (Expect.Absolute 0.01) 478.03754896733557 | ||
|> asTest "should properly score total impact" | ||
, Unit.impactToFloat scoring.allWithoutComplements | ||
|> Expect.within (Expect.Absolute 0.01) 476.8371815514294 | ||
|> Expect.within (Expect.Absolute 0.01) 476.83718155142935 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expect.Absolute 0.01
means we have a 0.01
tolerance for deviations. Why did you bother updating these two values which are both well within this tolerance? You were getting test failures here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot why. The probable reason is I once got a very different result which made me update the test, then got back a similar one which would not have make the test fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some nits. I can't really tell if it works or not, I don't understand what I should test and how.
Having a detailed "How to test" section could help here.
On a side note: this PR should have been split in three or more PRs. Searching for unique results, dealing with ecosystemic services, fixing the plural bug and fixing the export are separate things to me and it would have ease the review process.
): | ||
if x in a: | ||
del activities[i][x] | ||
# _ = activities[i].pop(x, None) | ||
else: | ||
# remove empty SE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is an SE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Service Ecosystemique
# ingredients attributes | ||
"categories": "Catégories d'ingrédient", | ||
"ingredient_categories": "Catégories d'ingrédient", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ingredient_categories": "Catégories d'ingrédient", | |
"ingredient_categories": "Catégories d'ingrédients", |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, you're editing a single ingredient
data/notebooks/ingredients.py
Outdated
w_scenario = ipywidgets.Dropdown(options=["reference", "organic", "import"], value=None) | ||
|
||
# buttons | ||
savebuttontooltip = "Enregistre l'ingrédient créé ou modifié" | ||
savebuttontooltipnonunique = "Vos termes de recherche doivent donner un seul résultat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
savebuttontooltipnonunique = "Vos termes de recherche doivent donner un seul résultat" | |
save_button_tooltip_non_unique = "Vos termes de recherche ne doivent donner qu’un seul résultat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Thanks for your suggestions! |
"name": "Winter pea, conventional, 15% moisture, at farm gate {FR} U", | ||
"source": "Agribalyse 3.1.1", | ||
"system_description": "AGRIBALYSE", | ||
"name": "Lentils, dry, at farm (WFLDB)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Winter pea
is replaced by Lentils
. I guess it's more adapted to the id "lentils-uncooked-fr". Is there any explanation why we had winter pea before ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no information found about this choice
public/data/food/processes.json
Outdated
@@ -7550,7 +7516,7 @@ | |||
{ | |||
"categories": ["ingredient"], | |||
"comment": "", | |||
"displayName": "Blé tendre Hors UE Conv.", | |||
"displayName": "Blé tendre UE Conv.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the id is soft-wheat-non-eu
and we're changing the displayName from Hors UE
to UE
but the LCI stays Soft wheat GLO
. Is that normal ?
(Now the displayName is incoherent with the id, we really need to go to uuid)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Julia has found the error and will fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed data/food/activities.json and fixed the soft-wheat-eu
and the onion-dried
.
Every changes has been listed and will be written down on a dedicated Notion card
🔧 Problem
We're missing many ingredients.
🍰 Solution
Added ingredients and exported the impacts.
Along with the new ingredients, some other modifications that needed to be done to get a more reliable result:
search
field to the exactname
of the process forces to select this exact process.activities.json
has also been adapted to this behaviourSince the ingredients editor is used when adding ingredients, it also has been adapted and fixed:
local save
button is disabled until the search term leads to a single result.process_category
)🏝️ How to test
Check that the new ingredients on the review app are what is expected (naming, impacts, identifier, etc.)
ecobalyse-private: ingredients