Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tasks.rb: Apply HPXML modifications recursively #1864

Open
shorowit opened this issue Oct 22, 2024 · 0 comments
Open

tasks.rb: Apply HPXML modifications recursively #1864

shorowit opened this issue Oct 22, 2024 · 0 comments

Comments

@shorowit
Copy link
Contributor

In the update_hpxmls task, we only apply the HPXML modifications to the final HPXML path. This means that when one HPXML file references another as a parent, the parent's modifications are not applied and we have to explicitly specify that we want to apply the modifications again. This results in code like so:

OpenStudio-HPXML/tasks.rb

Lines 1451 to 1454 in 9332bad

if ['base-enclosure-2stories-garage.xml',
'base-enclosure-garage.xml',
'base-zones-spaces.xml',
'base-zones-spaces-multiple.xml'].include? hpxml_file

Even though base-zones-spaces.xml references base-enclosure-garage.xml as the parent, we have to include both of them in the code.

Instead, we can use the parent_hpxml_filenames array to recursively apply the modifications from all the parent HPXMLs too. This would simplify our code and be more expected/intuitive for a developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant