Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve ApplyUpgrade unit tests for heat pumps#1477

Merged
joseph-robertson merged 2 commits into
developfrom
hp-upgrade-tests
Aug 22, 2025
Merged

Improve ApplyUpgrade unit tests for heat pumps#1477
joseph-robertson merged 2 commits into
developfrom
hp-upgrade-tests

Conversation

@joseph-robertson

Copy link
Copy Markdown
Contributor

Pull Request Description

Addresses an item in #1473.

Related Pull Requests

[related PRs from different repositories]

Related Issues

[What issue(s) is the PR addressing]

Checklist

Required:

Optional (not all items may apply):

@joseph-robertson joseph-robertson self-assigned this Aug 20, 2025
heat_pump_backup_type = measure.get_heat_pump_backup_type(heating_system, heat_pump_type, heat_pump_is_ducted)
actual_values = measure.get_heat_pump_backup_values(heating_system)
actual_values['heat_pump_backup_type'] = heat_pump_backup_type
measure.set_existing_system_as_heat_pump_backup(runner, measures, hpxml_bldg)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this parent method instead. Then we can check BuildResidentialHPXML argument assignments.

hpxml.buildings.each do |hpxml_bldg|
actual_values = measure.get_duct_restriction_values(hpxml_bldg)
baseline_max_airflow_cfm = actual_values['max_airflow_cfm']
baseline_max_airflow_cfm = measure.set_autosizing_limits(runner, measures, hpxml_bldg)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this parent method instead. Then we can check BuildResidentialHPXML argument assignments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't replace calling get_adjusted_fan_watts_per_cfm with parent set_adjusted_fan_efficiency since we're not actually re-applying the BuildResidentialHPXML measure first.

@joseph-robertson joseph-robertson marked this pull request as ready for review August 20, 2025 21:23

@shorowit shorowit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't scrutinize the tests, but I was able to replicate the results in my refactor branch. Very helpful.

_test_duct_restriction('false', nil, nil, expected_values)

expected_values = {
'baseline_max_airflow_cfm' => 2182.0 / 0.75,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that some of these numbers will change when we pull this into latest-os-hpxml because of updated cfm/ton assumptions.

@shorowit shorowit mentioned this pull request Aug 21, 2025
2 tasks
shorowit added a commit that referenced this pull request Aug 21, 2025
@joseph-robertson joseph-robertson merged commit 5642658 into develop Aug 22, 2025
22 checks passed
@joseph-robertson joseph-robertson deleted the hp-upgrade-tests branch August 22, 2025 03:49
@joseph-robertson joseph-robertson added this to the ResStock v2025_R1 milestone Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants