From b6e1a7f35ef6df9485b3af1599e33f3ea5ea5a1e Mon Sep 17 00:00:00 2001 From: Samuel Juhel <10011382+spjuhel@users.noreply.github.com> Date: Thu, 11 Dec 2025 12:12:08 +0100 Subject: [PATCH 1/3] Fix logging of asset count in impact calculation --- climada/engine/impact_calc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/climada/engine/impact_calc.py b/climada/engine/impact_calc.py index 0586166173..0f35bc904b 100644 --- a/climada/engine/impact_calc.py +++ b/climada/engine/impact_calc.py @@ -186,7 +186,7 @@ def impact( return self._return_empty(save_mat) LOGGER.info( "Calculating impact for %s assets (>0) and %s events.", - exp_gdf.size, + len(exp_gdf), self.n_events, ) imp_mat_gen = self.imp_mat_gen(exp_gdf, impf_col) From fca656fe479b77e6eb337a9f18af3271142e5d18 Mon Sep 17 00:00:00 2001 From: Samuel Juhel <10011382+spjuhel@users.noreply.github.com> Date: Thu, 11 Dec 2025 12:17:37 +0100 Subject: [PATCH 2/3] Updates Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index efe871001f..a50687cb23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ Code freeze date: YYYY-MM-DD ### Fixed +- Fixed asset count in impact logging message [#1195](https://github.com/CLIMADA-project/climada_python/pull/1195). + ### Deprecated ### Removed From 2b207842713a6c7dbb8ab6f659415c4ff1be186d Mon Sep 17 00:00:00 2001 From: spjuhel Date: Thu, 18 Dec 2025 09:42:17 +0100 Subject: [PATCH 3/3] Fixes the test that wasn't testing well --- climada/engine/test/test_impact_calc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/climada/engine/test/test_impact_calc.py b/climada/engine/test/test_impact_calc.py index bd606c6e19..9e7b2e2cb2 100644 --- a/climada/engine/test/test_impact_calc.py +++ b/climada/engine/test/test_impact_calc.py @@ -441,7 +441,7 @@ def test_calc_insured_impact_no_insurance(self): self.assertEqual( logs.output, [ - "INFO:climada.engine.impact_calc:Calculating impact for 150 assets (>0) and 14450 events." + "INFO:climada.engine.impact_calc:Calculating impact for 50 assets (>0) and 14450 events." ], ) self.assertEqual(icalc.n_events, len(impact.at_event))