-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refactor workflow generator #456
Conversation
Minimum allowed coverage is Generated by 🐒 cobertura-action against 1f06049 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the code really, but my recommendation in general with these sorts of changes is to strive to keep buildstockbatch backwards compatible with older versions of ResStock. Will these changes make it so this will not run ResStock with the prior workflow? If not, try to find a way to make it so it will. That could look like:
- Creating a new workflow generator for the new workflow, but leaving the old one there alongside it. This is a bit of a maintenance burden and eventually you may want to deprecate the old one.
- Make the workflow generator able to handle both the old and new workflows by being able to detect the difference between the two and default things in a smart way.
Thanks for the suggestions. This one is a plain refactor with no functional change, but will make sure to have backward compatibility in the future PRs. |
buildstockbatch/test/test_inputs/enforce-validate-measures-good-2-with-anchors.yml
Show resolved
Hide resolved
buildstockbatch/test/test_inputs/enforce-validate-measures-missing-dir.yml
Show resolved
Hide resolved
...tockbatch/test/test_inputs/test_openstudio_buildstock/measures/ReportHPXMLOutput/measure.xml
Show resolved
Hide resolved
buildstockbatch/workflow_generator/commercial/test_commercial_workflow_generator.py
Show resolved
Hide resolved
@@ -146,27 +146,27 @@ Arguments | |||
Build Existing Model Defaults | |||
............................. | |||
|
|||
.. include:: ../../buildstockbatch/workflow_generator/residential_hpxml.py | |||
.. include:: ../../buildstockbatch/workflow_generator/residential/residential_hpxml_defaults.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to be more descriptive in the changelog entry. Other than that, looks good to me.
This is in preparation of Introducing measure based upgrades.
Pull Request Description
Refactor the Workflow generator, especially the residential generator, to separate the shema and default values from the core logic.
Checklist
Not all may apply
minimum_coverage
in.github/workflows/coverage.yml
as necessary.