Split ITC basis by tech part 1a: refactor single owner#1370
Split ITC basis by tech part 1a: refactor single owner#1370
Conversation
Pull Request Test Coverage Report for Build 23068101836Details
💛 - Coveralls |
…eciation to a bunch of financial models
|
Tests added in the latest round are below. These were prioritized by commonly used features for all financial models, and less commonly used features only in single owner. Results are based off of develop as of this morning. All Relevant financial models
Only Single Owner
Additionally, added a test for Single Owner Heat. |
sjanzou
left a comment
There was a problem hiding this comment.
Great refactoring! The cmod_singleowner is much cleaner and the tests seem to cover everything and match with develop (before changes.
As far as GitHub Actions - I think the failing Windows test CMPvsamv1PowerIntegration_cmod_pvsamv1.UserArraySnowModel should be made in a separate pull request as this one continues to pass/fail on Windows intermittently. Works on other runners consistently.
I also, went through and updated the SAM itc_basis_updates branch to work with the ortools merge and updated defaults and results and went through to check for other tests to add for cmod_singleowner - I did not find any.
Great work - very meticulous!
| Test("singleowner", file_inputs, file_outputs, compare_number_variables, compare_array_variables); | ||
| } | ||
|
|
||
| TEST_F(CmodSingleOwnerTest, CustomDepr) { |
There was a problem hiding this comment.
Thanks for adding all of these!
Thanks for the review! I created an issue for this here: #1372 |
Pull Request Template
Description
This is the first PR in the process of updating the ITC and depreciation bases to account for OBBBA and split things by technology. This PR adds unit tests, but is otherwise just a refactor of the other code.
The near term goal is to put ITC and depreciation calculations in a class in common financial to share code between financial models prior to making further changes to behavior. Single Owner has been refactored using the new code. The other financial models have had the depreciation code extracted from their IRR target & DSCR loop to show that this code is independent of those loops (this is "new" circa 2024 - older versions of SAM this code needed to be in the loop).
Questions for this PR include:
Happy to discuss merge strategy. (merging this to develop shouldn't break anything, but there may be a stage at which the merge makes more sense than now)
Corresponding branches and PRs:
Develop for other branches
Unit Test Impact:
Added JSON financial model unit tests that look at the combination of IRR target mode and dscr mode.
Checklist