brightway-lca / brightway2-io

Importing and exporting for the Brightway LCA framework
BSD 3-Clause "New" or "Revised" License
26 stars 40 forks source link

bw2io.package, classmethod import_file: databases mapping needed #202

Open KarinTreyer opened 1 year ago

KarinTreyer commented 1 year ago

When importing a bw2package from someone else, it might happen that the name of e.g. your ecoinvent database doesn't match exactly with the database name in the package.

It should be possible to do the following:

That's also how AB is doing it.

cmutel commented 1 year ago

I don't think bw2package is an especially secure way of transferring data, at least not in its current form, and there are a number of possible improvements including this issue.

The underlying bw2package architecture doesn't make this kind of manipulation (i.e. change database name) easy.

As a mitigation measure, I would suggest exporting the complete project (bw2io.backup_project_directory()) and restoring it on the other computer (bw2io.restore_project_directory()).