Skip to content

Commit a8d1b2c

Browse files
Merge branch 'develop' into feature/cyclostrophic-as-parameter
2 parents 22ff62a + 595b31f commit a8d1b2c

22 files changed

+2046
-473
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ jobs:
7474
needs: build-and-test
7575
with:
7676
core_branch: ${{ github.ref }}
77-
petals_branch: feature/exposures_crs
77+
petals_branch: develop
7878
permissions:
7979
checks: write

.github/workflows/pull-request.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: GitHub CI
2+
3+
# Execute this for every pull request (opened, reopened, and synchronized)
4+
on: [pull_request]
5+
6+
jobs:
7+
pre-commit-checks:
8+
name: 'Core / Pre-Commit Checks'
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
-
13+
name: Checkout Repo
14+
uses: actions/checkout@v4
15+
with:
16+
ref: ${{ github.event.pull_request.head.sha }}
17+
-
18+
name: Checkout target commit
19+
run: git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin ${{ github.event.pull_request.base.ref }}
20+
-
21+
name: Set up Python 3.11
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.11'
25+
-
26+
# Store the current date to use it as cache key
27+
name: Get current date
28+
id: date
29+
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
30+
-
31+
name: Cache dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: |
35+
~/.cache/pip
36+
~/.cache/pre-commit
37+
key: ${{ github.event.pull_request.head.ref }}-${{ steps.date.outputs.date }}
38+
restore-keys: |
39+
${{ github.event.pull_request.head.ref }}
40+
${{ github.event.pull_request.base.ref }}
41+
develop
42+
main
43+
-
44+
name: Install pre-commit and hooks
45+
run: |
46+
pip install pre-commit
47+
pre-commit install --install-hooks
48+
-
49+
name: Run pre-commit checks
50+
run: pre-commit run --show-diff-on-failure --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Code freeze date: YYYY-MM-DD
1212

1313
### Added
1414

15+
- `climada.engine.impact.Impact.local_return_period` method [#971](https://github.com/CLIMADA-project/climada_python/pull/971)
16+
- `doc.tutorial.climada_util_local_exceedance_values.ipynb` tutorial explaining `Hazard.local_exceedance_intensity`, `Hazard.local_return_period`, `Impact.local_exceedance_impact`, and `Impact.local_return_period` methods [#971](https://github.com/CLIMADA-project/climada_python/pull/971)
17+
- `Hazard.local_exceedance_intensity`, `Hazard.local_return_period` and `Impact.local_exceedance_impact`, that all use the `climada.util.interpolation` module [#918](https://github.com/CLIMADA-project/climada_python/pull/918)
1518
- `climada.util.interpolation` module for inter- and extrapolation util functions used in local exceedance intensity and return period functions [#930](https://github.com/CLIMADA-project/climada_python/pull/930)
1619
- `climada.exposures.exposures.Exposures.geometry` property
1720
- `climada.exposures.exposures.Exposures.latitude` property
@@ -28,11 +31,15 @@ Code freeze date: YYYY-MM-DD
2831
- Improved scaling factors implemented in `climada.hazard.trop_cyclone.apply_climate_scenario_knu` to model the impact of climate changes to tropical cyclones [#734](https://github.com/CLIMADA-project/climada_python/pull/734)
2932
- In `climada.util.plot.geo_im_from_array`, NaNs are plotted in gray while cells with no centroid are not plotted [#929](https://github.com/CLIMADA-project/climada_python/pull/929)
3033
- Renamed `climada.util.plot.subplots_from_gdf` to `climada.util.plot.plot_from_gdf` [#929](https://github.com/CLIMADA-project/climada_python/pull/929)
34+
- `Hazard.local_exceedance_inten`, `Hazard.local_return_period`, and `Impact.local_exceedance_imp` call the corresponding new functions and a deprecation warning is added [#918](https://github.com/CLIMADA-project/climada_python/pull/918). Some inconsistencies in the previous versions are removed and the default method is changed. To reconstruct results from the previous versions, use CLIMADA v5.0.0 or less.
3135
- Exposures complete overhaul. Notably
3236
- the _geometry_ column of the inherent `GeoDataFrame` is set up at initialization
3337
- latitude and longitude column are no longer present there (the according arrays can be retrieved as properties of the Exposures object: `exp.latitude` instead of `exp.gdf.latitude.values`).
3438
- `Exposures.gdf` has been renamed to `Exposures.data` (it still works though, as it is a property now pointing to the latter)
3539
- the `check` method does not add a default "IMPF_" column to the GeoDataFrame anymore
40+
- Updated IBTrACS version from v4.0 to v4.1 ([#976](https://github.com/CLIMADA-project/climada_python/pull/976)
41+
- Fix xarray future warning in TCTracks for .dims to .sizes
42+
- Fix hazard.concatenate type test for pathos pools
3643

3744
### Fixed
3845

@@ -44,6 +51,10 @@ Code freeze date: YYYY-MM-DD
4451
- `climada.entity.exposures.Exposures.meta` attribute
4552
- `climada.entity.exposures.Exposures.set_lat_lon` method
4653
- `climada.entity.exposures.Exposures.set_geometry_points` method
54+
- `climada.hazard.Hazard.local_exceedance_inten` method
55+
- `climada.hazard.Hazard.plot_rp_intensity` method
56+
- `climada.engine.impact.Impact.local_exceedance_imp` method
57+
- `climada.engine.impact.Impact.plot_rp_imp` method
4758

4859
### Removed
4960

@@ -130,6 +141,7 @@ CLIMADA tutorials. [#872](https://github.com/CLIMADA-project/climada_python/pull
130141
### Removed
131142

132143
- climada.hazard.base.Hazard.clear
144+
- climada.hazard.base.Hazard.from_mat
133145
- climada.hazard.base.Hazard.raster_to_vector
134146
- climada.hazard.base.Hazard.read_mat
135147
- climada.hazard.base.Hazard.reproject_raster

0 commit comments

Comments
 (0)