USEPA / ElectricityLCI

Creative Commons Zero v1.0 Universal
24 stars 10 forks source link

Updating mains of sub-modules to implement model configuration #138

Open m-jamieson opened 3 years ago

m-jamieson commented 3 years ago

Many of the sub-modules contain mains (in the form of if name=="main") that need to be updated to reflect the new way of specifying the model configuration. When these were originally written, importing electricitylci would always result in a prompt for the configuration. That is no longer the case - electricitylci.model_config.model_specs must be generated largely before importing any of the sub-modules - either:

import electricitylci.model_config as config
config.model_specs = config.build_model_class()

or config._model_specs=config.build_model_class("<model_configuration_name>") (e.g., "ELCI_1")