Skip to content

Fix logging of asset count in impact calculation#1195

Merged
spjuhel merged 3 commits intodevelopfrom
feature/minor-logging-fix
Dec 18, 2025
Merged

Fix logging of asset count in impact calculation#1195
spjuhel merged 3 commits intodevelopfrom
feature/minor-logging-fix

Conversation

@spjuhel
Copy link
Collaborator

@spjuhel spjuhel commented Dec 11, 2025

In the following:

LOGGER.info(
            "Calculating impact for %s assets (>0) and %s events.",
            exp_gdf.size,
            self.n_events,
        )

gdf.size return the number of cells, not the number of rows, so the logging message is wrong.

This is easily fixed by switching to len(exp_gdf)

PR Author Checklist

PR Reviewer Checklist

@spjuhel
Copy link
Collaborator Author

spjuhel commented Dec 17, 2025

@ValentinGebhart @emanuel-schmid

It should take 2min to review 😇

@spjuhel
Copy link
Collaborator Author

spjuhel commented Dec 17, 2025

Oh wait I just saw that the tests checked the logging, will update ASAP.

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.

Please fix the test and this is good to go! 😄

@spjuhel spjuhel merged commit 5db4e07 into develop Dec 18, 2025
12 of 14 checks passed
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