Skip to content

Conversation

@ValentinGebhart
Copy link
Collaborator

Changes proposed in this PR:

This PR fixes #1056

PR Author Checklist

PR Reviewer Checklist

@ValentinGebhart
Copy link
Collaborator Author

@spjuhel FYI; but I guess not relevant for the cost benefit restructuring

Copy link
Member

@peanutfun peanutfun left a comment

Choose a reason for hiding this comment

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

Thank you for the fix!

I would appreciate a test. Could you just add the minimal example from the issue as test case? The test should make sure that the computation runs even when no centroids are assigned, and that the warning is issued. Alternatively, it might also be easy to add such checks to the existing unit tests for Measures and CostBenefit.

ValentinGebhart and others added 2 commits July 3, 2025 08:28
Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com>
@ValentinGebhart
Copy link
Collaborator Author

Thanks, Lukas! I've added a small test that check that the calculation runs if no centroids are assigned and that a warning is raised, and that no warning is raised if centroids are already assigned.

@ValentinGebhart
Copy link
Collaborator Author

@peanutfun I have know changed the case when we check that the centroid warning should NOT be raised, as we discussed. I checked that it works (ie raises an error if the centroid warning is raised wrongly, and passes if no warning is raised). It somehow looks a bit awkward to me, but if you think this is good enough, we can merge.

@ValentinGebhart ValentinGebhart merged commit 0cb35ca into develop Jul 7, 2025
19 checks passed
@ValentinGebhart ValentinGebhart deleted the hotfix/assign_centroids_in_costbenefit branch July 7, 2025 09:09
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