haasad / EcoInventDownLoader

Download, unpack and import ecoinvent into your brightway2 project in one simple step
MIT License
13 stars 6 forks source link

Find a conda-only solution for eidl #3

Closed haasad closed 6 years ago

haasad commented 6 years ago

Currently a manual installation of 7zip is required to use eidl. It would be way more convenient to have an 7z-capable unarchive program installed via conda. This would also make it possible to include eidl as a dependency to bw2io to use eidl directly via brightway.

Options:

ping @cmutel, picking up from our email conversation from some weeks ago

cmutel commented 6 years ago

I have also been looking at this, and have played around a bit with libarchive, but without any progress. Unfortunately, 7zip seems to compress ecoinvent particularly well - I tried different compression levels with zip, bz2, and gz. I don't have the exact numbers, but think that 7zip for 3.4 cutoff is around 70 MB, and the best alternative, bz2 was around 110 MB. Still might be worth asking if ecoinvent would post .tar.bz2, this would allow the use of the standard lib.

Maybe you already do this, but I would save the compressed archive in a system directory (using appdirs) to avoid downloading more than once.

haasad commented 6 years ago

I created https://github.com/haasad/eidl7zip to solve this issue. I provides a command-line version of the 7zip program for all three OSs. I'll make a PR for bw2io when I find the time, @cmutel.