Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to use any version of ecoinvent with lcopt (not just 3.3 cutoff).
It's possible due to the great work of @haasad on
eidl
.This feature has been requested by @brezen90 and @cdgaete and is related to issues #34 and #23. It closes #35.
When you create a new LcoptModel from a shell or notebook you can now specify
ecoinvent_version
andecoinvent_system_model
as arguments. You'll be prompted for your ecoinvent username and password, and whether you want these credentials to be saved (useful if you're likely to want to use a different version of ecoinvent in future).NOTE: If you choose to save the credentials for later, the password will be stored as plaintext in a
.yml
file on your computer - in theory this is no less secure than having it on a post-it on your desk, or a saved email, but something to be aware of. The default is 'no' to the save credentials question.You can also add
ei_username
,ei_password
andwrite_config
(default is False) arguments to the LcoptModel instantiation if you don't want to type them in at the prompt.The first time you use a version/system model combo, Lcopt will automatically set up a default bw2 project (called
LCOPT_Setup_EcoinventX_X_systemmodel
, e.g.LCOPT_Setup_Ecoinvent3_4_apos
) with the biosphere and LCIA methods in it, and the correct version of ecoinvent. From then on, it'll copy this base project whenever you use that combo in future. This means you don't have to download, extract, write the whole of ecoinvent every time you start a new project.NOTE: This also means that the set up brightway for Lcopt step of the installation isn't really necessary any more (except if you only use
lcopt-launcher
which will always look for the default setup)Examples
First time:
Second time
Specifying a username and password, and writing a config file to remember them: