From 826cc71079b00be7d169a58eeea2485c01f9c789 Mon Sep 17 00:00:00 2001 From: yunjoonjung Date: Thu, 5 Sep 2024 09:49:55 -0700 Subject: [PATCH 1/5] Removed .keys() --- .../reports/ashrae9012019/ashrae901_2019_detail_report.py | 4 ++-- rct229/rulesets/ashrae9012019/section10/section10rule7.py | 4 ++-- .../rulesets/ashrae9012019/section19/section19rule17.py | 2 +- .../rulesets/ashrae9012019/section22/section22rule20.py | 2 +- rct229/rulesets/ashrae9012019/section22/section22rule8.py | 8 ++++---- .../ruletest_jsons/scripts/excel_generation_utilities.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/rct229/reports/ashrae9012019/ashrae901_2019_detail_report.py b/rct229/reports/ashrae9012019/ashrae901_2019_detail_report.py index 2b59b4728c..ff7e7598c2 100644 --- a/rct229/reports/ashrae9012019/ashrae901_2019_detail_report.py +++ b/rct229/reports/ashrae9012019/ashrae901_2019_detail_report.py @@ -58,11 +58,11 @@ def output_node(output_result, output_eval_list, output_outcome_dict): if any( [ key.startswith("INVALID_") and key.endswith("_CONTEXT") - for key in output_result.keys() + for key in output_result ] ): evaluation_outcome["invalid_msg"] = "".join( - [output_result[key] for key in output_result.keys()] + [output_result[key] for key in output_result] ) output_outcome_dict[RCTOutcomeLabel.UNDETERMINED] += 1 else: diff --git a/rct229/rulesets/ashrae9012019/section10/section10rule7.py b/rct229/rulesets/ashrae9012019/section10/section10rule7.py index 968100db4e..1a82c0ed84 100644 --- a/rct229/rulesets/ashrae9012019/section10/section10rule7.py +++ b/rct229/rulesets/ashrae9012019/section10/section10rule7.py @@ -66,7 +66,7 @@ def is_applicable(self, context, data=None): rmd_b = context.BASELINE_0 baseline_system_types_dict = get_baseline_system_types(rmd_b) baseline_sys_5_6_serve_more_than_one_flr_list = ( - get_hvac_systems_5_6_serving_multiple_floors(rmd_b).keys() + get_hvac_systems_5_6_serving_multiple_floors(rmd_b) ) # create a list containing all HVAC systems that are modeled in the rmd_b available_types_list_excl_5_6_multifloor = [ @@ -89,7 +89,7 @@ def create_data(self, context, data): rmd_b = context.BASELINE_0 baseline_system_types_dict = get_baseline_system_types(rmd_b) baseline_sys_5_6_serve_more_than_one_flr_list = ( - get_hvac_systems_5_6_serving_multiple_floors(rmd_b).keys() + get_hvac_systems_5_6_serving_multiple_floors(rmd_b) ) baseline_system_zones_served_dict = { hvac_id: [ diff --git a/rct229/rulesets/ashrae9012019/section19/section19rule17.py b/rct229/rulesets/ashrae9012019/section19/section19rule17.py index ce85d59f55..611a97ee62 100644 --- a/rct229/rulesets/ashrae9012019/section19/section19rule17.py +++ b/rct229/rulesets/ashrae9012019/section19/section19rule17.py @@ -104,7 +104,7 @@ def is_applicable(self, context, data=None): return any( hvac_id_b in baseline_system_types_dict[system_type] - for system_type in baseline_system_types_dict.keys() + for system_type in baseline_system_types_dict ) def get_calc_vals(self, context, data=None): diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule20.py b/rct229/rulesets/ashrae9012019/section22/section22rule20.py index debc9e324b..99cf5a5756 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule20.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule20.py @@ -63,7 +63,7 @@ def is_applicable(self, context, data=None): # create a list containing all HVAC systems that are modeled in the rmd_b available_type_list = [ hvac_type - for hvac_type in baseline_system_types_dict.keys() + for hvac_type in baseline_system_types_dict if len(baseline_system_types_dict[hvac_type]) > 0 ] return any( diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule8.py b/rct229/rulesets/ashrae9012019/section22/section22rule8.py index 0de37f52d4..6fde1d1434 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule8.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule8.py @@ -59,7 +59,7 @@ def is_applicable(self, context, data=None): # create a list containing all HVAC systems that are modeled in the rmd_b available_type_list = [ hvac_type - for hvac_type in baseline_system_types_dict.keys() + for hvac_type in baseline_system_types_dict if len(baseline_system_types_dict[hvac_type]) > 0 ] @@ -81,21 +81,21 @@ def create_data(self, context, data): loop_pump_dict = {} for pump in find_all("$.pumps[*]", rmd_b): - if pump["loop_or_piping"] not in loop_pump_dict.keys(): + if pump["loop_or_piping"] not in loop_pump_dict: loop_pump_dict[pump["loop_or_piping"]] = [] loop_pump_dict[pump["loop_or_piping"]].append(pump) chw_loop_capacity_dict = {} for chiller in find_all("$.chillers[*]", rmd_b): cooling_loop_id = chiller["cooling_loop"] - if chiller["cooling_loop"] not in chw_loop_capacity_dict.keys(): + if chiller["cooling_loop"] not in chw_loop_capacity_dict: chw_loop_capacity_dict[cooling_loop_id] = ZERO.POWER chw_loop_capacity_dict[cooling_loop_id] += getattr_( chiller, "chiller", "rated_capacity" ) primary_secondary_loop_dict = get_primary_secondary_loops_dict(rmd_b) - primary_loop_ids = primary_secondary_loop_dict.keys() + primary_loop_ids = primary_secondary_loop_dict return { "loop_pump_dict": loop_pump_dict, diff --git a/rct229/ruletest_engine/ruletest_jsons/scripts/excel_generation_utilities.py b/rct229/ruletest_engine/ruletest_jsons/scripts/excel_generation_utilities.py index f30327cc81..a87377be7d 100644 --- a/rct229/ruletest_engine/ruletest_jsons/scripts/excel_generation_utilities.py +++ b/rct229/ruletest_engine/ruletest_jsons/scripts/excel_generation_utilities.py @@ -87,7 +87,7 @@ def generate_rule_test_dictionary(ruleset_standard): ) # Reorder sections to be in numerical order (i.e., avoid section1, section11, section12, section5, section6) - sections_list = list(ruletest_dict.keys()) + sections_list = list(ruletest_dict) sorted_sections = sorted(sections_list, key=lambda x: natural_keys(x)) ruletest_dict = {key: ruletest_dict[key] for key in sorted_sections} From c2a273f13f4a5b79edddc629f30119059b827d75 Mon Sep 17 00:00:00 2001 From: yunjoonjung Date: Thu, 5 Sep 2024 10:05:50 -0700 Subject: [PATCH 2/5] Added missing $ --- ...s_hvac_sys_preheat_fluid_loop_attached_to_boiler.py | 4 ++-- .../is_hvac_sys_preheating_type_fluid_loop.py | 2 +- .../ruleset_functions/get_avg_zone_height.py | 2 +- .../get_building_scc_window_wall_ratios_dict.py | 2 +- .../get_building_segment_skylight_roof_areas_dict.py | 10 +++++----- .../rulesets/ashrae9012019/section21/section21rule5.py | 2 +- .../ashrae9012019/section22/section22rule19.py | 2 +- .../ashrae9012019/section22/section22rule29.py | 2 +- .../rulesets/ashrae9012019/section22/section22rule3.py | 2 +- .../ashrae9012019/section22/section22rule30.py | 2 +- .../rulesets/ashrae9012019/section22/section22rule4.py | 2 +- .../rulesets/ashrae9012019/section22/section22rule6.py | 2 +- .../section6/archive/section6rule1_archive.py | 4 ++-- .../rulesets/ashrae9012019/section6/section6rule2.py | 4 ++-- .../rulesets/ashrae9012019/section6/section6rule3.py | 4 ++-- .../rulesets/ashrae9012019/section6/section6rule4.py | 2 +- .../rulesets/ashrae9012019/section6/section6rule8.py | 2 +- .../rulesets/ashrae9012019/section6/section6rule9.py | 4 ++-- rct229/utils/jsonpath_utils_test.py | 10 +++++----- 19 files changed, 32 insertions(+), 32 deletions(-) diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheat_fluid_loop_attached_to_boiler.py b/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheat_fluid_loop_attached_to_boiler.py index f6c383212a..f376a216f6 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheat_fluid_loop_attached_to_boiler.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheat_fluid_loop_attached_to_boiler.py @@ -30,11 +30,11 @@ def is_hvac_sys_preheat_fluid_loop_attached_to_boiler(rmd_b, hvac_b_id): # Get the hvac system hvac_b = find_exactly_one_hvac_system(rmd_b, hvac_b_id) # hot_water_loop_id can be None - hot_water_loop_id = find_one("preheat_system.hot_water_loop", hvac_b) + hot_water_loop_id = find_one("$.preheat_system.hot_water_loop", hvac_b) if hot_water_loop_id in loop_boiler_id_list: hot_water_loop = find_exactly_one_fluid_loop(rmd_b, hot_water_loop_id) is_hvac_sys_preheat_fluid_loop_attached_to_boiler_flag = ( - find_one("type", hot_water_loop) == FLUID_LOOP.HEATING + find_one("$.type", hot_water_loop) == FLUID_LOOP.HEATING ) return is_hvac_sys_preheat_fluid_loop_attached_to_boiler_flag diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheating_type_fluid_loop.py b/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheating_type_fluid_loop.py index 1a4486e6ce..2549e4e3ca 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheating_type_fluid_loop.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/baseline_systems/baseline_hvac_sub_functions/is_hvac_sys_preheating_type_fluid_loop.py @@ -30,7 +30,7 @@ def is_hvac_sys_preheating_type_fluid_loop(rmd_b: dict, hvac_b_id: str) -> bool: preheat_system is not None and preheat_system.get("hot_water_loop") is not None # Silence fail if heating system type data is not in RMD - and find_one("type", preheat_system) == HEATING_SYSTEM.FLUID_LOOP + and find_one("$.type", preheat_system) == HEATING_SYSTEM.FLUID_LOOP ) return is_hvac_sys_preheating_type_fluid_loop_flag diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_avg_zone_height.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_avg_zone_height.py index 42ad628301..6c7ee6fcfd 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_avg_zone_height.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_avg_zone_height.py @@ -32,7 +32,7 @@ def get_avg_zone_height(zone: dict) -> Quantity: find_exactly_required_fields(GET_AVG_ZONE_HEIGHT__REQUIRED_FIELDS["zone"], zone) zone_volume = zone["volume"] - zone_floor_area = sum(find_all("spaces[*].floor_area", zone)) + zone_floor_area = sum(find_all("$.spaces[*].floor_area", zone)) assert_( zone_floor_area > ZERO.AREA, f"zone:{zone['id']} has zero total floor area." diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_window_wall_ratios_dict.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_window_wall_ratios_dict.py index 2cb47fa5b5..bda4b606c6 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_window_wall_ratios_dict.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_window_wall_ratios_dict.py @@ -74,7 +74,7 @@ def get_building_scc_window_wall_ratios_dict( if get_opaque_surface_type(surface) == OST.ABOVE_GRADE_WALL: surface_area = surface["area"] surface_window_area = ZERO.AREA - for subsurface in find_all("subsurfaces[*]", surface): + for subsurface in find_all("$.subsurfaces[*]", surface): glazed_area = subsurface.get("glazed_area", ZERO.AREA) opaque_area = subsurface.get("opaque_area", ZERO.AREA) surface_window_area += ( diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_segment_skylight_roof_areas_dict.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_segment_skylight_roof_areas_dict.py index b290f77828..6fc23474bf 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_segment_skylight_roof_areas_dict.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_segment_skylight_roof_areas_dict.py @@ -60,7 +60,7 @@ def get_building_segment_skylight_roof_areas_dict( scc_dict = get_surface_conditioning_category_dict(climate_zone, building) building_segment_roof_areas_dict = {} - for building_segment in find_all("building_segments[*]", building): + for building_segment in find_all("$.building_segments[*]", building): building_segment_roof_areas_dict[ building_segment["id"] ] = building_segment_roof_areas = { @@ -68,14 +68,14 @@ def get_building_segment_skylight_roof_areas_dict( "total_skylight_area": ZERO.AREA, } - for zone in find_all("zones[*]", building_segment): + for zone in find_all("$.zones[*]", building_segment): if zcc_dict[zone["id"]] in [ ZCC.CONDITIONED_RESIDENTIAL, ZCC.CONDITIONED_NON_RESIDENTIAL, ZCC.CONDITIONED_MIXED, ZCC.SEMI_HEATED, ]: - for surface in find_all("surfaces[*]", zone): + for surface in find_all("$.surfaces[*]", zone): if get_opaque_surface_type(surface) == OST.ROOF and scc_dict[ surface["id"] ] in [ @@ -89,9 +89,9 @@ def get_building_segment_skylight_roof_areas_dict( ] += getattr_(surface, "surface", "area") building_segment_roof_areas["total_skylight_area"] += sum( - find_all("subsurfaces[*].glazed_area", surface), ZERO.AREA + find_all("$.subsurfaces[*].glazed_area", surface), ZERO.AREA ) + sum( - find_all("subsurfaces[*].opaque_area", surface), ZERO.AREA + find_all("$.subsurfaces[*].opaque_area", surface), ZERO.AREA ) return building_segment_roof_areas_dict diff --git a/rct229/rulesets/ashrae9012019/section21/section21rule5.py b/rct229/rulesets/ashrae9012019/section21/section21rule5.py index 0c1ff86329..30ebad8cf7 100644 --- a/rct229/rulesets/ashrae9012019/section21/section21rule5.py +++ b/rct229/rulesets/ashrae9012019/section21/section21rule5.py @@ -143,7 +143,7 @@ def get_calc_vals(self, context, data=None): ZERO.AREA, ) - num_boilers = len(find_all(".boilers[*]", rmd_b)) + num_boilers = len(find_all("$.boilers[*]", rmd_b)) boiler_capacity_list = [ CalcQ("capacity", getattr_(boiler, "boiler", "rated_capacity")) for boiler in find_all("$.boilers[*]", rmd_b) diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule19.py b/rct229/rulesets/ashrae9012019/section22/section22rule19.py index c602d66abe..e24148bff4 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule19.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule19.py @@ -68,7 +68,7 @@ def create_data(self, context, data): heat_rejection_loop_id: find_exactly_one_with_field_value( "$.fluid_loops[*]", "id", heat_rejection_loop_id, rmd_b ) - for heat_rejection_loop_id in find_all("heat_rejections[*].loop", rmd_b) + for heat_rejection_loop_id in find_all("$.heat_rejections[*].loop", rmd_b) } return {"heat_rejection_loop_dict": heat_rejection_loop_dict} diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule29.py b/rct229/rulesets/ashrae9012019/section22/section22rule29.py index aa559e1021..a5f56257c9 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule29.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule29.py @@ -76,7 +76,7 @@ def create_data(self, context, data): chiller["condensing_loop"]: find_exactly_one_fluid_loop( rmd_b, getattr_(chiller, "Chiller", "condensing_loop") ).get("pump_power_per_flow_rate") - for chiller in find_all("chillers[*]", rmd_b) + for chiller in find_all("$.chillers[*]", rmd_b) } return {"condenser_loop_pump_power_dict": condenser_loop_pump_power_dict} diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule3.py b/rct229/rulesets/ashrae9012019/section22/section22rule3.py index 99c385f53a..d767557360 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule3.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule3.py @@ -73,7 +73,7 @@ def is_applicable(self, context, data=None): def create_data(self, context, data): rmd_b = context.BASELINE_0 - chiller_loop_ids_list = find_all("chillers[*].cooling_loop", rmd_b) + chiller_loop_ids_list = find_all("$.chillers[*].cooling_loop", rmd_b) return {"chiller_loop_ids": chiller_loop_ids_list} def list_filter(self, context_item, data): diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule30.py b/rct229/rulesets/ashrae9012019/section22/section22rule30.py index 334c4e72c3..a2873eab6b 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule30.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule30.py @@ -59,7 +59,7 @@ def create_data(self, context, data): chiller["condensing_loop"]: find_exactly_one_fluid_loop( rmd_b, chiller["condensing_loop"] ).get("pump_power_per_flow_rate") - for chiller in find_all("chillers[*]", rmd_b) + for chiller in find_all("$.chillers[*]", rmd_b) } return {"condenser_loop_pump_power_dict": condenser_loop_pump_power_dict} diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule4.py b/rct229/rulesets/ashrae9012019/section22/section22rule4.py index 66f2b4251e..0f0714640a 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule4.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule4.py @@ -78,7 +78,7 @@ def is_applicable(self, context, data=None): def create_data(self, context, data): rmd_b = context.BASELINE_0 - chiller_loop_ids_list = find_all("chillers[*].cooling_loop", rmd_b) + chiller_loop_ids_list = find_all("$.chillers[*].cooling_loop", rmd_b) return {"chiller_loop_ids_list": chiller_loop_ids_list} def list_filter(self, context_item, data): diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule6.py b/rct229/rulesets/ashrae9012019/section22/section22rule6.py index 993732a663..c335229cbf 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule6.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule6.py @@ -58,7 +58,7 @@ def is_applicable(self, context, data=None): def create_data(self, context, data): rmd_b = context.BASELINE_0 - chiller_loop_ids_list = find_all("chillers[*].cooling_loop", rmd_b) + chiller_loop_ids_list = find_all("$.chillers[*].cooling_loop", rmd_b) return {"chiller_loop_ids_list": chiller_loop_ids_list} def list_filter(self, context_item, data): diff --git a/rct229/rulesets/ashrae9012019/section6/archive/section6rule1_archive.py b/rct229/rulesets/ashrae9012019/section6/archive/section6rule1_archive.py index d65edf2dbc..c37db791c9 100644 --- a/rct229/rulesets/ashrae9012019/section6/archive/section6rule1_archive.py +++ b/rct229/rulesets/ashrae9012019/section6/archive/section6rule1_archive.py @@ -45,10 +45,10 @@ def __init__(self): def get_calc_vals(self, context, data=None): space_lighting_power_per_area_user = sum( - find_all("interior_lighting[*].power_per_area", context.USER) + find_all("$.interior_lighting[*].power_per_area", context.USER) ) space_lighting_power_per_area_proposed = sum( - find_all("interior_lighting[*].power_per_area", context.PROPOSED) + find_all("$.interior_lighting[*].power_per_area", context.PROPOSED) ) space_lighting_power_user = ( space_lighting_power_per_area_user * context.USER["floor_area"] diff --git a/rct229/rulesets/ashrae9012019/section6/section6rule2.py b/rct229/rulesets/ashrae9012019/section6/section6rule2.py index d6cec869c8..91b088bd16 100644 --- a/rct229/rulesets/ashrae9012019/section6/section6rule2.py +++ b/rct229/rulesets/ashrae9012019/section6/section6rule2.py @@ -84,11 +84,11 @@ def get_calc_vals(self, context, data=None): lighting_power_allowance_p = DWELLING_UNIT_MIN_LIGHTING_POWER_PER_AREA space_lighting_power_per_area_p = sum( - find_all("interior_lighting[*].power_per_area", space_p), + find_all("$.interior_lighting[*].power_per_area", space_p), ZERO.POWER_PER_AREA, ) space_lighting_power_per_area_u = sum( - find_all("interior_lighting[*].power_per_area", space_u), + find_all("$.interior_lighting[*].power_per_area", space_u), ZERO.POWER_PER_AREA, ) diff --git a/rct229/rulesets/ashrae9012019/section6/section6rule3.py b/rct229/rulesets/ashrae9012019/section6/section6rule3.py index 25e03dfcaf..d927b38f57 100644 --- a/rct229/rulesets/ashrae9012019/section6/section6rule3.py +++ b/rct229/rulesets/ashrae9012019/section6/section6rule3.py @@ -69,10 +69,10 @@ def get_calc_vals(self, context, data=None): space_u = context.USER space_p = context.PROPOSED total_space_lpd_u = sum( - find_all("interior_lighting[*].power_per_area", space_u) + find_all("$.interior_lighting[*].power_per_area", space_u) ) total_space_lpd_p = sum( - find_all("interior_lighting[*].power_per_area", space_p) + find_all("$.interior_lighting[*].power_per_area", space_p) ) space_lighting_status_type_p = data[ diff --git a/rct229/rulesets/ashrae9012019/section6/section6rule4.py b/rct229/rulesets/ashrae9012019/section6/section6rule4.py index 3e5f2026e1..64e446cb7a 100644 --- a/rct229/rulesets/ashrae9012019/section6/section6rule4.py +++ b/rct229/rulesets/ashrae9012019/section6/section6rule4.py @@ -93,7 +93,7 @@ def get_calc_vals(self, context, data=None): space_b = context.BASELINE_0 space_p = context.PROPOSED total_space_lpd_b = sum( - find_all("interior_lighting[*].power_per_area", space_b) + find_all("$.interior_lighting[*].power_per_area", space_b) ) space_lighting_status_type_p = data[ "building_segment_lighting_status_type_dict_p" diff --git a/rct229/rulesets/ashrae9012019/section6/section6rule8.py b/rct229/rulesets/ashrae9012019/section6/section6rule8.py index 6cfaa13c1e..72da242b14 100644 --- a/rct229/rulesets/ashrae9012019/section6/section6rule8.py +++ b/rct229/rulesets/ashrae9012019/section6/section6rule8.py @@ -108,7 +108,7 @@ def create_data(self, context, data=None): zone_p = context.PROPOSED return { "avg_space_height": zone_p.get("volume", ZERO.VOLUME) - / sum(find_all("spaces[*].floor_area", zone_p), ZERO.AREA), + / sum(find_all("$.spaces[*].floor_area", zone_p), ZERO.AREA), } class SpaceRule(RuleDefinitionBase): diff --git a/rct229/rulesets/ashrae9012019/section6/section6rule9.py b/rct229/rulesets/ashrae9012019/section6/section6rule9.py index 85011db638..db117234bf 100644 --- a/rct229/rulesets/ashrae9012019/section6/section6rule9.py +++ b/rct229/rulesets/ashrae9012019/section6/section6rule9.py @@ -69,7 +69,7 @@ def __init__(self): def is_applicable(self, context, data=None): building_p = context.PROPOSED return ( - sum(find_all("spaces[*].floor_area", building_p), ZERO.AREA) + sum(find_all("$.spaces[*].floor_area", building_p), ZERO.AREA) <= FLOOR_AREA_LIMIT ) @@ -107,7 +107,7 @@ def create_data(self, context, data=None): zone_p = context.PROPOSED return { "avg_space_height": zone_p.get("volume", ZERO.VOLUME) - / sum(find_all("spaces[*].floor_area", zone_p), ZERO.AREA), + / sum(find_all("$.spaces[*].floor_area", zone_p), ZERO.AREA), } class SpaceRule(RuleDefinitionBase): diff --git a/rct229/utils/jsonpath_utils_test.py b/rct229/utils/jsonpath_utils_test.py index 076c482b2a..efa0747662 100644 --- a/rct229/utils/jsonpath_utils_test.py +++ b/rct229/utils/jsonpath_utils_test.py @@ -27,18 +27,18 @@ def test__create_jsonpath_value_dict(): def test__find_all__names(): - assert find_all("transformers[*].name", test_obj2) == ["tr1", "tr2", "tr3"] + assert find_all("$.transformers[*].name", test_obj2) == ["tr1", "tr2", "tr3"] def test__find_all_by_jsonpaths_names_ids(): assert find_all_by_jsonpaths( - ["transformers[*].name", "transformers[*].id"], test_obj2 + ["$.transformers[*].name", "transformers[*].id"], test_obj2 ) == ["tr1", "tr2", "tr3", "id1", "id2", "id3"] def test__find_all_by_jsonpaths_names_empty(): assert find_all_by_jsonpaths( - ["transformers[*].name", "transformers[*].description"], test_obj2 + ["$.transformers[*].name", "transformers[*].description"], test_obj2 ) == ["tr1", "tr2", "tr3"] @@ -47,9 +47,9 @@ def test__find_all__empty(): def test__find_all_with_field_value(): - assert find_all_with_field_value("transformers[*]", "name", "tr2", test_obj1) == [ + assert find_all_with_field_value("$.transformers[*]", "name", "tr2", test_obj1) == [ {"name": "tr2"} ] - assert find_one_with_field_value("transformers[*]", "name", "tr2", test_obj1) == { + assert find_one_with_field_value("$.transformers[*]", "name", "tr2", test_obj1) == { "name": "tr2" } From 4f15b739732cebce8fca360e497a55188e3f2d0d Mon Sep 17 00:00:00 2001 From: yunjoonjung Date: Thu, 5 Sep 2024 10:39:13 -0700 Subject: [PATCH 3/5] Added missing $ --- .../ruleset_functions/get_area_type_window_wall_area_dict.py | 2 +- .../get_building_scc_skylight_roof_ratios_dict.py | 2 +- .../ruleset_functions/get_zone_conditioning_category_dict.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_area_type_window_wall_area_dict.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_area_type_window_wall_area_dict.py index d168c3adc9..2aea92faf8 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_area_type_window_wall_area_dict.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_area_type_window_wall_area_dict.py @@ -81,7 +81,7 @@ def get_area_type_window_wall_area_dict( ) # add sub-surfaces - for subsurface in find_all("subsurfaces[*]", surface): + for subsurface in find_all("$.subsurfaces[*]", surface): glazed_area = getattr_(subsurface, "subsurface", "glazed_area") opaque_area = getattr_(subsurface, "subsurface", "opaque_area") if ( diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_skylight_roof_ratios_dict.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_skylight_roof_ratios_dict.py index b7df33d0f6..9dc7cf9342 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_skylight_roof_ratios_dict.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_building_scc_skylight_roof_ratios_dict.py @@ -94,7 +94,7 @@ def get_building_scc_skylight_roof_ratios_dict( def _helper_calculate_skylight_area(surface: dict) -> Quantity: total_glazed_area = ZERO.AREA - for subsurface in find_all("subsurfaces[*]", surface): + for subsurface in find_all("$.subsurfaces[*]", surface): glazed_area = getattr_(subsurface, "subsurface", "glazed_area") opaque_area = getattr_(subsurface, "subsurface", "opaque_area") if getattr_(subsurface, "subsurface", "classification") == DOOR: diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py index a4dc2a574d..86bff75077 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py @@ -243,7 +243,7 @@ def get_zone_conditioning_category_dict( find_all("surfaces[*]", zone), f"zone:{zone_id} has no surfaces" ) for surface in zone["surfaces"]: - subsurfaces = find_all("subsurfaces[*]", surface) + subsurfaces = find_all("$.subsurfaces[*]", surface) # Calculate the total area of all subsurfaces subsurfaces_area = sum( [ From 613c85509e5eba6a32b9467b4184f34f43718fb9 Mon Sep 17 00:00:00 2001 From: yunjoonjung Date: Thu, 5 Sep 2024 10:47:33 -0700 Subject: [PATCH 4/5] Fixed typos --- rct229/rule_engine/rule_base.py | 2 +- rct229/rulesets/ashrae9012019/data_fns/table_8_4_4_fns.py | 2 +- .../ashrae9012019/ruleset_functions/compare_schedules.py | 2 +- .../ruleset_functions/get_opaque_surface_type.py | 2 +- .../get_zone_conditioning_category_dict.py | 2 +- .../normalize_interior_lighting_schedules.py | 2 +- rct229/rulesets/ashrae9012019/section18/section18rule2.py | 4 ++-- rct229/rulesets/ashrae9012019/section19/section19rule28.py | 2 +- rct229/rulesets/ashrae9012019/section19/section19rule4.py | 2 +- rct229/rulesets/ashrae9012019/section19/section19rule7.py | 2 +- rct229/rulesets/ashrae9012019/section21/section21rule18.py | 2 +- rct229/rulesets/ashrae9012019/section21/section21rule8.py | 2 +- rct229/rulesets/ashrae9012019/section22/section22rule39.py | 2 +- rct229/ruletest_engine/ruletest_engine.py | 2 +- .../ruletest_jsons/scripts/json_generation_utilities.py | 6 +++--- rct229/schema/schema_enums.py | 2 +- rct229/schema/schema_utils.py | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/rct229/rule_engine/rule_base.py b/rct229/rule_engine/rule_base.py index adc0fb1887..9178ced3b1 100644 --- a/rct229/rule_engine/rule_base.py +++ b/rct229/rule_engine/rule_base.py @@ -288,7 +288,7 @@ def get_context(self, rmds, data=None): ------- RulesetModelTypes or str The return value from self._get_context() when the context exists - in each RMD for which the correponding self.rmds_used flag is set; + in each RMD for which the corresponding self.rmds_used flag is set; otherwise retrns a string such as "MISSING_BASELINE" that indicates all the RMDs that are missing. """ diff --git a/rct229/rulesets/ashrae9012019/data_fns/table_8_4_4_fns.py b/rct229/rulesets/ashrae9012019/data_fns/table_8_4_4_fns.py index 45b64aa5d8..a385d1d469 100644 --- a/rct229/rulesets/ashrae9012019/data_fns/table_8_4_4_fns.py +++ b/rct229/rulesets/ashrae9012019/data_fns/table_8_4_4_fns.py @@ -47,7 +47,7 @@ def table_8_4_4_lookup(phase, capacity): with capacities >= 15KVA and <= 333kVA for single-phase or <= 1000kVA for three-phase. - For capacities bewteen the listed values, linear interpolation is used. + For capacities between the listed values, linear interpolation is used. Parameters ---------- diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/compare_schedules.py b/rct229/rulesets/ashrae9012019/ruleset_functions/compare_schedules.py index 5927910634..e5a268336a 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/compare_schedules.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/compare_schedules.py @@ -27,7 +27,7 @@ def compare_schedules( if hourly value is 1, schedule_1 is evaluated to be equal to schedule_2; if hourly value is 2, schedule_1 is evaluated to be equal to schedule_2 times the comparison factor; if hourly value is 0, comparison was skipped for that particular hour - (example when evaluating shut off controls, only he building closed hrs are evaluated) exmaple: [1,1,1,1,1...] + (example when evaluating shut off controls, only he building closed hrs are evaluated) example: [1,1,1,1,1...] is_leap_year: bool, indicate whether the comparison is in a leap year or not. True / False Returns diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_opaque_surface_type.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_opaque_surface_type.py index cb9e642206..b6522e4841 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_opaque_surface_type.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_opaque_surface_type.py @@ -30,7 +30,7 @@ def get_opaque_surface_type(surface: dict) -> str: A dictionary representing a surface as defined by the ASHRAE229 schema. It is assumed to have at least the minimal structure: { - ajacent_to, + adjacent_to, construction: { has_radiant_heating }, diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py b/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py index 86bff75077..84aa6c2d05 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/get_zone_conditioning_category_dict.py @@ -266,7 +266,7 @@ def get_zone_conditioning_category_dict( ], ZERO.UA, # value used if there are no subsurfaces ) - # Calculate the are of the surface that is not part of a subsurface + # Calculate the area of the surface that is not part of a subsurface non_subsurfaces_area = ( getattr_(surface, "surface", "area") - subsurfaces_area ) diff --git a/rct229/rulesets/ashrae9012019/ruleset_functions/normalize_interior_lighting_schedules.py b/rct229/rulesets/ashrae9012019/ruleset_functions/normalize_interior_lighting_schedules.py index bf2f23198c..7d89e7e776 100644 --- a/rct229/rulesets/ashrae9012019/ruleset_functions/normalize_interior_lighting_schedules.py +++ b/rct229/rulesets/ashrae9012019/ruleset_functions/normalize_interior_lighting_schedules.py @@ -38,7 +38,7 @@ def normalize_interior_lighting_schedules( adjust_for_credit: Boolean - indicate whether the function needs to adjust schedule value by control credit Returns ------- - A list containing 8760/8784 hourly values of a noralized schedule of the space data element + A list containing 8760/8784 hourly values of a normalized schedule of the space data element """ # Implementation note: diff --git a/rct229/rulesets/ashrae9012019/section18/section18rule2.py b/rct229/rulesets/ashrae9012019/section18/section18rule2.py index fe9a80bf25..bfeb93ca3a 100644 --- a/rct229/rulesets/ashrae9012019/section18/section18rule2.py +++ b/rct229/rulesets/ashrae9012019/section18/section18rule2.py @@ -357,13 +357,13 @@ def get_manual_check_required_msg(self, context, calc_vals=None, data=None): if does_sys_only_serve_lab_b: undetermined_msg = ( "This system serves only lab zones, which is correct if the building has total lab exhaust greater than 15,000 cfm. " - "However, we could not determine with accuracy the total building exhuast." + "However, we could not determine with accuracy the total building exhaust." ) elif does_sys_serve_lab_and_other_b: undetermined_msg = "This system serves some lab zones and some non-lab zones in a building which may have more than 15,000 cfm. In buildings with > 15,000 cfm of lab exhaust, ALL and only lab zones should be served by system type 5 or 7." elif does_two_sys_exist_on_same_fl_b == "undetermined": undetermined_msg = ( - f"This HVAC system is on the same floor as {hvac_sys2_id_b}, which servese lab zones in the building. " + f"This HVAC system is on the same floor as {hvac_sys2_id_b}, which serves lab zones in the building. " f"If the building has greater than 15,000 cfm of lab exhaust and {hvac_sys2_id_b} is System type 5 or 7 serving only lab zones, this system passes, otherwise it fails." ) diff --git a/rct229/rulesets/ashrae9012019/section19/section19rule28.py b/rct229/rulesets/ashrae9012019/section19/section19rule28.py index 8ecb1741e1..dafe1fdd35 100644 --- a/rct229/rulesets/ashrae9012019/section19/section19rule28.py +++ b/rct229/rulesets/ashrae9012019/section19/section19rule28.py @@ -24,7 +24,7 @@ def __init__(self): each_rule=Section19Rule28.HVACRule(), index_rmd=PROPOSED, id="19-28", - description="chedules for HVAC fans that provide outdoor air for ventilation in the proposed design shall be cycled ON and OFF to meet heating and cooling loads during unoccupied hours excluding HVAC systems that meet Table G3.1-4 Schedules for the proposed building exceptions #2 and #3." + description="Schedules for HVAC fans that provide outdoor air for ventilation in the proposed design shall be cycled ON and OFF to meet heating and cooling loads during unoccupied hours excluding HVAC systems that meet Table G3.1-4 Schedules for the proposed building exceptions #2 and #3." "#2 HVAC fans shall remain on during occupied and unoccupied hours in spaces that have health- and safety mandated minimum ventilation requirements during unoccupied hours." "#3 HVAC fans shall remain on during occupied and unoccupied hours in systems primarily serving computer rooms.", ruleset_section_title="HVAC - General", diff --git a/rct229/rulesets/ashrae9012019/section19/section19rule4.py b/rct229/rulesets/ashrae9012019/section19/section19rule4.py index 25655e07a6..6c81c3611d 100644 --- a/rct229/rulesets/ashrae9012019/section19/section19rule4.py +++ b/rct229/rulesets/ashrae9012019/section19/section19rule4.py @@ -272,7 +272,7 @@ def get_calc_vals(self, context, data=None): if not misc_pass_cooling_b: multiplier_sch_light_b = getattr_( misc_equip_b, - "Mmiscellaneous Equipment", + "miscellaneous_equipment", "multiplier_schedule", ) diff --git a/rct229/rulesets/ashrae9012019/section19/section19rule7.py b/rct229/rulesets/ashrae9012019/section19/section19rule7.py index 297dbc19f8..ab4273e512 100644 --- a/rct229/rulesets/ashrae9012019/section19/section19rule7.py +++ b/rct229/rulesets/ashrae9012019/section19/section19rule7.py @@ -40,7 +40,7 @@ def __init__(self): description="Minimum ventilation system outdoor air intake flow shall be the same for the proposed design and baseline building design except when any of the 4 exceptions defined in Section G3.1.2.5 are met." "Exceptions included in this RDS: 2. When designing systems in accordance with Standard 62.1, Section 6.2, `Ventilation Rate Procedure,`" "reduced ventilation airflow rates may be calculated for each HVAC zone in the proposed design with a zone air distribution effectiveness (Ez) > 1.0 as defined by Standard 62.1, Table 6-2. " - "Baseline ventilation airflow rates in those zones shall be calcu-lated using the proposed design Ventilation Rate Procedure calculation with the following change only. Zone air distribution effectiveness shall be changed to (Ez) = 1.0 in each zone having a zone air distribution effectiveness (Ez) > 1.0. " + "Baseline ventilation airflow rates in those zones shall be calculated using the proposed design Ventilation Rate Procedure calculation with the following change only. Zone air distribution effectiveness shall be changed to (Ez) = 1.0 in each zone having a zone air distribution effectiveness (Ez) > 1.0. " "Proposed design and baseline build-ing design Ventilation Rate Procedure calculations, as described in Standard 62.1, shall be submitted to the rating authority to claim credit for this exception.", ruleset_section_title="HVAC - General", standard_section="Section G3.1.2.5 and Exception 2", diff --git a/rct229/rulesets/ashrae9012019/section21/section21rule18.py b/rct229/rulesets/ashrae9012019/section21/section21rule18.py index 1475efbdf4..533552ba36 100644 --- a/rct229/rulesets/ashrae9012019/section21/section21rule18.py +++ b/rct229/rulesets/ashrae9012019/section21/section21rule18.py @@ -69,7 +69,7 @@ def __init__(self): required_fields={ "$": ["energy_source_type"], }, - manual_check_required_msg="Basline boiler fuel source is modeled as propane. Verify if natural gas is not available for the proposed building site as determined by the rating authority.", + manual_check_required_msg="Baseline boiler fuel source is modeled as propane. Verify if natural gas is not available for the proposed building site as determined by the rating authority.", ) def get_calc_vals(self, context, data=None): diff --git a/rct229/rulesets/ashrae9012019/section21/section21rule8.py b/rct229/rulesets/ashrae9012019/section21/section21rule8.py index 412096889f..291d571c19 100644 --- a/rct229/rulesets/ashrae9012019/section21/section21rule8.py +++ b/rct229/rulesets/ashrae9012019/section21/section21rule8.py @@ -29,7 +29,7 @@ def __init__(self): each_rule=Section21Rule8.HeatingFluidLoopRule(), index_rmd=BASELINE_0, id="21-8", - description="When the baseline building requires boilers, (for baseline system type = 1,5,7,11 and 12), HWST for the baseline building shall be reset using an outdoor air dry-bulb reset schedule. 180F at 20F OAT, 150Fat 50F OAT, ramped linerarly between 150F and 180F.", + description="When the baseline building requires boilers, (for baseline system type = 1,5,7,11 and 12), HWST for the baseline building shall be reset using an outdoor air dry-bulb reset schedule. 180F at 20F OAT, 150Fat 50F OAT, ramped linearly between 150F and 180F.", ruleset_section_title="HVAC - Water Side", standard_section="Section G3.1.3.3 Building System-Specific Modeling Requirements for the Baseline model", is_primary_rule=True, diff --git a/rct229/rulesets/ashrae9012019/section22/section22rule39.py b/rct229/rulesets/ashrae9012019/section22/section22rule39.py index c00e5a4aa7..52367279f0 100644 --- a/rct229/rulesets/ashrae9012019/section22/section22rule39.py +++ b/rct229/rulesets/ashrae9012019/section22/section22rule39.py @@ -25,7 +25,7 @@ def __init__(self): is_primary_rule=False, list_path="ruleset_model_descriptions[0]", manual_check_required_msg="Manual Check Required - Baseline is modeled with purchased chilled water. Make sure " - "baseline systems served by purchased chilled water are modeled with a distribution pump whose pump ower is 16W/gpm.", + "baseline systems served by purchased chilled water are modeled with a distribution pump whose pump power is 16W/gpm.", not_applicable_msg="Rule 22-39 Not Applicable - the baseline is not modeled with Purchased Chilled Water", ) diff --git a/rct229/ruletest_engine/ruletest_engine.py b/rct229/ruletest_engine/ruletest_engine.py index 5b21f5fa69..972abf0f73 100644 --- a/rct229/ruletest_engine/ruletest_engine.py +++ b/rct229/ruletest_engine/ruletest_engine.py @@ -35,7 +35,7 @@ def generate_test_rmds(test_dict): The rmd_transformations field has optional user, baseline, and proposed fields. If any of these fields is present, its corresponding RMD will be referenced. If the user, baseline, - or proposed fields are missing, then its correponding RMD is + or proposed fields are missing, then its corresponding RMD is set to None. diff --git a/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py b/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py index b4eafe4532..b1b9b609b5 100644 --- a/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py +++ b/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py @@ -29,7 +29,7 @@ def get_nested_dict(dic, keys): # Parse key and determine if this key references a list or a value. If list_index returns an integer (i.e., a # reference index in a list) this key represents a list in the dictionary and needs to be set differently # EXAMPLE: The key "buildings[0]" implies the "buildings" key represents a list. We set the value at - # element 0 in the this list + # element 0 in this list key, list_index = parse_key_string(key) is_list = isinstance(list_index, int) @@ -37,7 +37,7 @@ def get_nested_dict(dic, keys): # If this is the first key, set the reference dictionary to the highest level dictionary and work down from # there. if key == first_key: - # If first key isnt initialized, set it as a dictionary + # If first key isn'tinitialized, set it as a dictionary if key not in dic: if first_index == None: dic[key] = {} @@ -106,7 +106,7 @@ def element_exists_at_key_address_in_dictionary(dic, keys): # Parse key and determine if this key references a list or a value. If list_index returns an integer (i.e., a # reference index in a list) this key represents a list in the dictionary and needs to be set differently # EXAMPLE: The key "buildings[0]" implies the "buildings" key represents a list. We set the value at - # element 0 in the this list + # element 0 in this list key, list_index = parse_key_string(key) is_list = isinstance(list_index, int) diff --git a/rct229/schema/schema_enums.py b/rct229/schema/schema_enums.py index 3d6a7ddde0..cc75984e15 100644 --- a/rct229/schema/schema_enums.py +++ b/rct229/schema/schema_enums.py @@ -72,7 +72,7 @@ def update_schema_enum(): } -# Convert the enumerations as dictionaries to classess for easier access +# Convert the enumerations as dictionaries to classes for easier access def print_schema_enums(): diff --git a/rct229/schema/schema_utils.py b/rct229/schema/schema_utils.py index a89c579261..8de7641961 100644 --- a/rct229/schema/schema_utils.py +++ b/rct229/schema/schema_utils.py @@ -18,7 +18,7 @@ def clean_schema_units(schema_unit_str): Parameters ---------- schema_unit_str : str - String representing a display or service name representation that may be misunderstood by pint. This funciton + String representing a display or service name representation that may be misunderstood by pint. This function cleans up this unit (e.g., W/K-m2) Returns From 9ff232e0b731bc0dc5cef5ce9da7d7c33ddaea82 Mon Sep 17 00:00:00 2001 From: yunjoonjung Date: Thu, 5 Sep 2024 13:41:43 -0700 Subject: [PATCH 5/5] Added missing space --- .../ruletest_jsons/scripts/json_generation_utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py b/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py index b1b9b609b5..04af6529b7 100644 --- a/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py +++ b/rct229/ruletest_engine/ruletest_jsons/scripts/json_generation_utilities.py @@ -37,7 +37,7 @@ def get_nested_dict(dic, keys): # If this is the first key, set the reference dictionary to the highest level dictionary and work down from # there. if key == first_key: - # If first key isn'tinitialized, set it as a dictionary + # If first key isn't initialized, set it as a dictionary if key not in dic: if first_index == None: dic[key] = {}