Skip to content

Commit b939c99

Browse files
aspeakejtlangevin
authored andcommitted
Cleanup from rebase, address linter errors
1 parent 8d8a072 commit b939c99

5 files changed

Lines changed: 15 additions & 53 deletions

File tree

scout/# Append updated competition data from.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

scout/ecm_prep.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,9 @@ def split_clean_data(meas_prepped_objs, full_dat_out):
359359
if not isinstance(m, MeasurePackage):
360360
del m.markets[adopt_scheme]["mseg_adjust"][
361361
"paired heat/cool mseg adjustments"]
362-
# Add remaining contributing microsegment data to
363-
# competition data dict, if the adoption scenario will be competed
364-
# in the run.py module, then delete from measure
362+
# Add fuel splits and sector shape data, if applicable and the adoption scenario
363+
# will be competed in the run.py module, then delete from measure
365364
if full_dat_out[adopt_scheme]:
366-
comp_data_dict[adopt_scheme] = \
367-
m.markets[adopt_scheme]["mseg_adjust"]
368365
# If applicable, add efficient fuel split data to fuel split
369366
# data dict
370367
if len(m.eff_fs_splt[adopt_scheme].keys()) != 0:
@@ -380,6 +377,9 @@ def split_clean_data(meas_prepped_objs, full_dat_out):
380377
# If adoption scenario will not be competed in the run.py
381378
# module, remove detailed mseg breakouts
382379
del m.markets[adopt_scheme]["mseg_out_break"]
380+
# Add remaining contributing microsegment data to competition data dict, then
381+
# delete from measure
382+
comp_data_dict[adopt_scheme] = m.markets[adopt_scheme]["mseg_adjust"]
383383
del m.markets[adopt_scheme]["mseg_adjust"]
384384
# Delete info. about efficient fuel splits for fuel switch measures
385385
del m.eff_fs_splt
@@ -10336,7 +10336,8 @@ def breakout_mseg(self, mskeys, contrib_mseg_key, adopt_scheme, opts, input_data
1033610336
fuel->end use->technology type->structure type).
1033710337
adopt_scheme (string): Assumed consumer adoption scenario.
1033810338
opts (object): Stores user-specified execution options.
10339-
input_data (list): Stores all mseg-specific data that need to be assigned to breakouts.
10339+
input_data (list): Stores all segment-specific data that need to be assigned to
10340+
breakouts.
1034010341
gap_adj_frac (float): Fraction to apply to breakout data to represent
1034110342
portions of msegs that are not covered by ComStock load shapes (if applicable)
1034210343
Returns:

scout/ecm_prep_vars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import copy
44
import itertools
55
import numpy
6+
import pandas as pd
67
from datetime import datetime
78
from collections import OrderedDict
89
from scout.utils import JsonIO
910
from scout.config import FilePaths as fp
10-
import pandas as pd
1111

1212

1313
class UsefulVars(object):

scout/run.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6116,10 +6116,11 @@ def process_codes_bps(self, opts, adopt_scheme, msegs, handyvars, trim_yrs,
61166116
"stock", "energy", "carbon", "cost"]}
61176117
except ValueError:
61186118
fmt.verboseprint(opts.verbose,
6119-
("No measures flagged as basis for setting relative efficiency of "
6120-
"electric equipment for current region and building type. Setting "
6121-
"relative efficiency of conversion to 1 across end uses and proceeding.",
6122-
"warning"))
6119+
("No measures flagged as basis for setting relative "
6120+
"efficiency of electric equipment for current region and "
6121+
"building type. Setting relative efficiency of conversion "
6122+
"to 1 across end uses and proceeding."),
6123+
"warning")
61236124
# Adjust onsite reduction frac. times apply frac. to account for overlaps
61246125
onsite_frac_already_in_place, onsite_times_apply_fracs = self.stack_impacts(
61256126
code_std_flag, reg, bldg, regu_type, onsite_frac_already_in_place,

tests/run_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28951,8 +28951,8 @@ def test_code_bps_postprocess(self):
2895128951
brkout="basic")
2895228952
# Shorthand for the code/BPS measure objects that are generated via the tested function
2895328953
code_bps_meas_out = a_run_codes_bps.process_codes_bps(
28954-
self.test_adopt_scheme_code_bps, self.sample_msegs_sf_data, self.hv_code_bps,
28955-
verboseprint=None, trim_yrs=False, code_comply_res=1, code_comply_com=1,
28954+
self.opts, self.test_adopt_scheme_code_bps, self.sample_msegs_sf_data, self.hv_code_bps,
28955+
trim_yrs=False, code_comply_res=1, code_comply_com=1,
2895628956
bps_comply_res=1, bps_comply_com=1)
2895728957

2895828958
# Check the outputs of all measures

0 commit comments

Comments
 (0)