polca / ScenarioLink

Activity Browser plugin to download scenario based LCA databases
GNU Lesser General Public License v3.0
8 stars 0 forks source link

Add progress indicator during database generation #2

Open romainsacchi opened 1 year ago

marc-vdm commented 1 year ago

Could you point me to the functions in unfold where the progressbars are printed to the terminal?

I've looked at the AB progressbars, it seems we overwrite the classes in Brightway that take the different steps (extract/apply strategies etc) and update progress bar from there. Perhaps we could do something similar to this for unfold if it's not too complicated.

romainsacchi commented 1 year ago

It happens here: https://github.com/polca/ScenarioLink/blob/04fecb2f820012507d9ec86104b32db76d50aab0/ab_plugin_scenariolink/utils.py#L41

marc-vdm commented 1 year ago

Yes, sorry, I mean the specific functions in unfold

romainsacchi commented 1 year ago

That'd be this one: https://github.com/polca/unfold/blob/a35f6c799e25e1c862f5921f503c232664480828/unfold/unfold.py#L1116

bsteubing commented 1 year ago

would be nice to have... the download now took some 4-5 minutes, so a progress bar would be great. And even more important for the data extraction / database generation... which took certainly 20min or so, so here we really need a progress indicator... and perhaps a warning ahead of time to the user that this will take some time.

Lastly: it is unclear where the data is stored. Perhaps the user could directly indicate where he wants to store it?