-
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
feat: Textile export #808
feat: Textile export #808
Conversation
…alyse into agregate_in_python
…to agregate_in_python
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.
Just adding a simple isolated comment here as I've not been requested a review.
"primary": activity.get("primary"), | ||
"geographicOrigin": activity["geographicOrigin"], | ||
"defaultCountry": activity["defaultCountry"], | ||
"priority": activity.get("priority"), |
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.
This field is never used by anything in the entire codebase it seems, and should be therefore removed entirely.
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.
Thx! You mean the priority
field?
Btw I'll do another PR to do such changes
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.
yes, the priority field
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.
Significant differences are for :
- cotton
- electric mixes
They've been investigated by @ccomb and confirmed to be desirable changes. It looks there was errors in the past values due to copy/pasting.
Overview of the differences (at most ~5% diff in total impact)
## [2.5.0](https://github.com/MTES-MCT/ecobalyse/compare/v2.4.0..v2.5.0) (2024-11-06) ### 🚀 Features - Add bookmarks for objects ([#781](#781)) - Add object explorer pages. ([#803](#803)) - Distinguish Objects from Veli. ([#813](#813)) - Display score without durability ([#815](#815)) - Textile export ([#808](#808)) - Object export ([#812](#812)) ### 🪲 Bug Fixes - Create object encrypted file for versions ([#800](#800)) - Improve object simulator. ([#799](#799)) - Fix encoded display name field. ([#820](#820)) ### 🚜 Refactor - Aggregate in python ([#794](#794)) - Turn food process category into a list ([#795](#795)) - Aggregate in python ([#807](#807)) ### ⚙️ Miscellaneous Tasks - Upgrade dependencies to their latest version, Oct. 2024. ([#801](#801)) - Add tolerance to tests comparison ([#810](#810)) - *(data)* New export ([#819](#819)) ###◀️ Revert - "refactor: aggregate in python" ([#806](#806)) <!-- generated by git-cliff --> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🔧 Problem
The processes and materials for textile are a manual json file with copy-pasted impacts. This poses a risk of errors and a lack of traceability.
🍰 Solution
This PR implements an automated
textile
export similar to thefood
one, that start from aactivities.json
file that splits into the finalprocesses.json
,processes_impacts.json
andmaterial.json
and retrieves the impacts from simapro after getting the process names from brightway through a simple search string.🚨 Points to watch/comments
This implies some refactoring to share code between
food
andtextile
(and soonobject
) and separate pure functions in thecommon
module.We should also discuss about the resulting impacts changes.
🏝️ How to test
This should start from scratch by deleting the docker volumes, reimport all the databases into brightway, then do the export of food and textile.
At the end, after around 2h of hard work for the machine, you should get an empty
git diff
and passing tests.Lasts ~210min on a 2017 notebook...
ecobalyse-private: textile_export