Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rct229/rulesets/ashrae9012019/section1/section1rule1.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_calc_vals(self, context, data=None):
output_bpf_list = list(set(filter(lambda x: x is not None, data.values())))
assert_(
len(output_bpf_list) >= 1,
"At least one `output_bpf_set` value must exist.",
"At least one `total_area_weighted_building_performance_factor` value must exist.",
)
bpf_building_area_type_dict = get_BPF_building_area_types_and_zones(rmd_b0)
has_undetermined = "UNDETERMINED" in bpf_building_area_type_dict
Expand All @@ -115,7 +115,7 @@ def get_calc_vals(self, context, data=None):
if not only_undetermined:
assert_(
total_area > 0,
"The `total_area ` value must be greater than 0.",
"The `total_area` value must be greater than 0.",
)

return {
Expand Down
13 changes: 7 additions & 6 deletions rct229/rulesets/ashrae9012019/section1/section1rule4.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ def get_calc_vals(self, context, data=None):
pci_set = list(set(filter(lambda x: x is not None, pci_set)))

assert_(
len(pci_target_set) >= 1, "At least one `pci_target_set` value must exist."
len(pci_target_set) >= 1,
"At least one `performance_cost_index_target` value must exist.",
)
assert_(
len(pci_set) >= 1, "At least one `performance_cost_index` value must exist."
)
assert_(len(pci_set) >= 1, "At least one `pci_set` value must exist.")

return {
"pci_target_set": pci_target_set,
Expand Down Expand Up @@ -88,10 +91,8 @@ def get_fail_msg(self, context, calc_vals=None, data=None):

FAIL_MSG = ""
if len(pci_target_set) != 1:
FAIL_MSG = "Ruleset expects exactly one PCI Target value to be used in the project."
FAIL_MSG = "Ruleset expects exactly one `performance_cost_index_target` value to be used in the project."
elif len(pci_set) != 1:
FAIL_MSG = (
"Ruleset expects exactly one PCI value to be used in the project."
)
FAIL_MSG = "Ruleset expects exactly one `performance_cost_index` value to be used in the project."

return FAIL_MSG
10 changes: 5 additions & 5 deletions rct229/rulesets/ashrae9012019/section1/section1rule5.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ def is_applicable(self, context, data=None):

assert_(
len(pbp_set) >= 1,
"Ruleset expects exactly one PBP value to be used in the project.",
"Ruleset expects exactly one 'total_proposed_building_energy_cost_including_renewable_energy' value to be used in the project.",
)
assert_(
len(bbp_set) >= 1,
"Ruleset expects exactly one BBP value to be used in the project.",
"Ruleset expects exactly one 'baseline_building_performance_energy_cost' value to be used in the project.",
)
assert_(
len(pbp_nre_set) >= 1,
"Ruleset expects exactly one PBP_nre value to be used in the project.",
"Ruleset expects exactly one 'total_proposed_building_energy_cost_excluding_renewable_energy' value to be used in the project.",
)
assert_(
bbp_set[0] > 0,
Expand Down Expand Up @@ -141,11 +141,11 @@ def get_calc_vals(self, context, data=None):

assert_(
len(pci_set) >= 1,
"Ruleset expects exactly one PCI value to be used in the project.",
"Ruleset expects exactly one 'performance_cost_index' value to be used in the project.",
)
assert_(
len(pci_target_set) >= 1,
"Ruleset expects exactly one PCI Target value to be used in the project.",
"Ruleset expects exactly one 'performance_cost_index_target' value to be used in the project.",
)

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
"Test": "d",
"test_description": "A one building segment, single zone building has a performance cost index that is less than the performance cost index target, but the performance cost index is not specified uniformly in any/all ruleset model descriptions.",
"expected_rule_outcome": "fail",
"expected_raised_message_includes": "Ruleset expects exactly one PCI value to be used in the project.",
"expected_raised_message_includes": "Ruleset expects exactly one `performance_cost_index` value to be used in the project.",
"standard": {
"rule_id": "1-4",
"ruleset_reference": "4.2.1.1",
Expand Down Expand Up @@ -566,7 +566,7 @@
"Test": "e",
"test_description": "A one building segment, single zone building does not have performance cost index specified in any ruleset model descriptions.",
"expected_rule_outcome": "undetermined",
"expected_raised_message_includes": "At least one `pci_set` value must exist.",
"expected_raised_message_includes": "At least one `performance_cost_index` value must exist.",
"standard": {
"rule_id": "1-4",
"ruleset_reference": "4.2.1.1",
Expand Down Expand Up @@ -704,7 +704,7 @@
"Test": "f",
"test_description": "A one building segment, single zone building does not have performance cost index target specified in any ruleset model descriptions.",
"expected_rule_outcome": "undetermined",
"expected_raised_message_includes": "At least one `pci_target_set` value must exist.",
"expected_raised_message_includes": "At least one `performance_cost_index_target` value must exist.",
"standard": {
"rule_id": "1-4",
"ruleset_reference": "4.2.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
"Test": "d",
"test_description": "A one building segment, single zone building has proposed on site renewable energy production and the proposed building performance is not specified in any ruleset model descriptions.",
"expected_rule_outcome": "undetermined",
"expected_raised_message_includes": "Ruleset expects exactly one PBP value to be used in the project.",
"expected_raised_message_includes": "Ruleset expects exactly one 'total_proposed_building_energy_cost_including_renewable_energy' value to be used in the project.",
"standard": {
"rule_id": "1-5",
"ruleset_reference": "4.2.1.2",
Expand Down Expand Up @@ -568,7 +568,7 @@
"Test": "e",
"test_description": "A one building segment, single zone building has proposed on site renewable energy production and baseline building performance is not specified in any ruleset model descriptions.",
"expected_rule_outcome": "undetermined",
"expected_raised_message_includes": "Ruleset expects exactly one BBP value to be used in the project.",
"expected_raised_message_includes": "Ruleset expects exactly one 'baseline_building_performance_energy_cost' value to be used in the project.",
"standard": {
"rule_id": "1-5",
"ruleset_reference": "4.2.1.2",
Expand Down Expand Up @@ -708,7 +708,7 @@
"Test": "f",
"test_description": "A one building segment, single zone building has proposed on site renewable energy production and performance cost index is not specified in any ruleset model descriptions.",
"expected_rule_outcome": "undetermined",
"expected_raised_message_includes": "Ruleset expects exactly one PCI value to be used in the project.",
"expected_raised_message_includes": "Ruleset expects exactly one 'performance_cost_index' value to be used in the project.",
"standard": {
"rule_id": "1-5",
"ruleset_reference": "4.2.1.2",
Expand Down Expand Up @@ -848,7 +848,7 @@
"Test": "g",
"test_description": "A one building segment, single zone building has proposed on site renewable energy production and performance cost index target is not specified in any ruleset model descriptions.",
"expected_rule_outcome": "undetermined",
"expected_raised_message_includes": "Ruleset expects exactly one PCI Target value to be used in the project.",
"expected_raised_message_includes": "Ruleset expects exactly one 'performance_cost_index_target' value to be used in the project.",
"standard": {
"rule_id": "1-5",
"ruleset_reference": "4.2.1.2",
Expand Down
Loading