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

Refactor for easier testing #897

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

petersalemink95
Copy link
Member

This PR will not change behavior: only includes a refactor + additional tests

petersalemink95 and others added 5 commits February 11, 2025 15:54
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
@petersalemink95 petersalemink95 marked this pull request as ready for review February 14, 2025 14:03
Comment on lines 590 to 591
void iterate_ranks(auto const& regulator_order, auto adjust_transformer_in_rank, bool& tap_changed,
std::vector<IntS>& iterations_per_rank, Idx& rank_index) {
Copy link
Member

Choose a reason for hiding this comment

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

do you think it makes more sense to make iterations_per_rank and rank_index member variables (private + public constexpr getters for testability)? The adjust_transformer_in_rank can then be provided into the constructor, and tap_changed can be an output parameter (just like it is for adjust_transformer_in_rank). That way, you can also really test per iteration

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't get why we would do that

Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
petersalemink95 and others added 3 commits February 19, 2025 13:33
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
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.

2 participants