trynthink / scout

A tool for estimating the future energy use, carbon emissions, and capital and operating cost impacts of energy efficiency and demand flexibility technologies in the U.S. residential and commercial building sectors.
https://scout.energy.gov
Other
58 stars 22 forks source link

Project configuration input files #355

Closed aspeake closed 3 months ago

aspeake commented 7 months ago

Update how arguments for ecm_prep.py and run.py are handled. A configuration .yml file is introduced to simplify running these scripts, improve repeatability, and allow for version control. New arguments are introduced as needed to replace the user prompts and responses. Additionally, a new set of tests is added to cover these new features and as well as gaps in testing for existing argument handling.

Summary of Changes

Functionality Changes

Example yml Input:

description: This is an example config file to run ecm_prep.py and/or run.py
ecm_prep:
  site_energy: true
  add_typ_eff: true
  rp_persist: true
  alt_regions: EMM
  adopt_scn_restrict: Max adoption potential
  fugitive_emissions: [methane, typical refrigerant]
  retrofits:
    retrofit_type: increasing
    retrofit_multiplier: 1.2
    retrofit_mult_year: 2030
  exog_hp_rates: 
    exog_hp_rate_scenario: aggressive
    switch_all_retrofit_hp: False
  grid_decarb:
    grid_decarb_level: full
    grid_assesment_timing: after
  tsv_metrics:
    tsv_type: energy
    tsv_daily_hr_restrict: all
    tsv_sys_shape_case: total reference
    tsv_season: summer
    tsv_energy_agg: average
    tsv_average_days: weekdays
  detail_brkout: [regions, fuel types]
  pkg_env_costs: include HVAC  

run:
  mkt_fracs: true
aspeake commented 5 months ago

@trynthink thanks for the review. I think I've addressed each of your comments and do not have any followups. I added a CI job to check that the readable config in the docs has been updated for any changes with the schema: https://github.com/trynthink/scout/pull/355/commits/4d89032b0fcc6820d91a1ce7a4d66d2c5bbd3648. Given I didn't even update it in this PR, it seems like an easy thing to miss. I stopped short of an automatic commit to update, and instead just fail the CI.