Skip to content

test: regression tests for the pandas-2 fixes in #1325 - #1320

Open
EnvDroneSense wants to merge 1 commit into
CLIMADA-project:developfrom
EnvDroneSense:fix/1319-pandas2-removals
Open

EnvDroneSense wants to merge 1 commit into
CLIMADA-project:developfrom
EnvDroneSense:fix/1319-pandas2-removals

Conversation

@EnvDroneSense

@EnvDroneSense EnvDroneSense commented Sep 7, 2026 •

Copy link
Copy Markdown

Changes proposed in this PR:

  • Add regression tests for the pandas 2.0 fixes merged in minimal fixes #1325, one per affected entry point: LitPop.from_shape_and_countries (GeoSeries shape, and overlapping shapes), impact_data.hit_country_per_hazard, calibration_opt.calib_all and calibration_opt.calib_instance (multi-row df_out with yearly_impact=True).
  • Add the CHANGELOG entry for minimal fixes #1325.

The source changes originally in this PR were dropped in favour of #1325.

This PR fixes #1319

PR Author Checklist

PR Reviewer Checklist

@emanuel-schmid emanuel-schmid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for pointing this out, the suggested fixes and writing tests.
I've made some remarks. You can address them as you wish.

In any case, I'm going to just apply minimal fixes without much ado soon. 🤷 There bugs and ought to be removed.

Comment thread climada/engine/calibration_opt.py Outdated
Comment thread climada/engine/impact_data.py Outdated
Comment thread climada/entity/exposures/litpop/litpop.py
Comment thread climada/entity/exposures/test/test_litpop.py
Comment thread climada/engine/test/test_impact_data.py
Comment thread climada/test/test_calibration.py Outdated
Comment thread climada/test/test_calibration.py Outdated
Comment thread climada/test/test_calibration.py Outdated
@EnvDroneSense
EnvDroneSense force-pushed the fix/1319-pandas2-removals branch from 0a248d3 to 4a5b1ab Compare September 30, 2026 11:30
@EnvDroneSense EnvDroneSense changed the title fix: replace pandas APIs removed in 2.0 that leave four entry points … test: regression tests for the pandas-2 fixes in #1325 Sep 30, 2026
@EnvDroneSense

EnvDroneSense commented Sep 30, 2026 •

Copy link
Copy Markdown
Author

@emanuel-schmid thanks for the review (sorry for the delay, the semester has just started, so it was quite busy). I rebased onto your fixes on develop and reworked the tests as suggested:

  • calibration tests merged into TestCalib, with plain docstrings; the multi-param test is now test_calib_all
  • new test_overlapping_shapes for LitPop.from_shape_and_countries
  • CHANGELOG entry covering minimal fixes #1325

So the PR is now is tests + changelog only.

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