Closed bl-young closed 3 years ago
@WesIngwersen @jump2conclusionsmatt I understand we may not want to implement at this point, but wanted to at least pitch you on the idea
Tested it with
pip install git+https://github.com/bl-young/ElectricityLCI.git@issue115#egg=electricitylci
and from python
import electricitylci
did not prompt for model selection. then ran from the command line
python -m electricitylci.main
and it does then force a model selection, so it works for me.
As long as it's working, good by me. I'll check it out while I'm working on the other fixes.
Can we hold off on this until some of the other branches are merged in? I'm hopeful that will simplify conflict resolution. If we wait until the end, I'm hopeful that Ben's changes will override some of my uses of the old style model configuration parameters. Maybe it won't matter and it'll be painful no matter what.
Actually thinking about it some more, I think it would be best to do a development branch, pull all the various issues branches into it and test from there. I'll at least do that for my various issues branches.
Actually thinking about it some more, I think it would be best to do a development branch, pull all the various issues branches into it and test from there. I'll at least do that for my various issues branches.
OK fine by me @jump2conclusionsmatt
In attempting to find a solution to #115, I also went ahead and converted the model specs to a class. -Variables from model_config.py combined into a class to better facilitate importing of model_specs -References to the specific model_specs have been shifted to references to the model_specs class -New functions in model_config to prompt user for model number and load and build model -Explicitly require 'build_model_class' in main.py to select the configuration, and assign it back to model_config
-Remove the prompt to select a model if only importing via init: The following can be run to access any functions within eLCI:
Passing no parameter to
build_model_class
will prompt the users to select a modelmodel parameters can then be changed individually as needed:
config.model_specs.electricity_lci_target_year = 2040
All three configurations succesfully built in this branch.