Skip to content

Commit b139e8f

Browse files
committed
Merge branch 'develop' into feature/remove_implicit_use_crs
2 parents 2bc5c6a + 86061e2 commit b139e8f

35 files changed

+2434
-645
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 }}

.readthedocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
version: 2
22

3+
sphinx:
4+
configuration: doc/conf.py
5+
36
build:
47
os: "ubuntu-22.04"
58
tools:

CHANGELOG.md

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

1313
### Added
1414

15+
- `climada.util.coordinates.bounding_box_global` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
16+
- `climada.util.coordinates.bounding_box_from_countries` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
17+
- `climada.util.coordinates.bounding_box_from_cardinal_bounds` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
18+
- `climada.engine.impact.Impact.local_return_period` method [#971](https://github.com/CLIMADA-project/climada_python/pull/971)
19+
- `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)
20+
- `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)
1521
- `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)
1622
- `climada.exposures.exposures.Exposures.geometry` property
1723
- `climada.exposures.exposures.Exposures.latitude` property
@@ -25,17 +31,24 @@ Code freeze date: YYYY-MM-DD
2531

2632
### Changed
2733

34+
- `Centroids.append` now takes multiple arguments and provides a performance boost when doing so [#989](https://github.com/CLIMADA-project/climada_python/pull/989)
35+
- `climada.util.coordinates.get_country_geometries` function: Now throwing a ValueError if unregognized ISO country code is given (before, the invalid ISO code was ignored) [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
2836
- 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)
2937
- 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)
3038
- Renamed `climada.util.plot.subplots_from_gdf` to `climada.util.plot.plot_from_gdf` [#929](https://github.com/CLIMADA-project/climada_python/pull/929)
39+
- `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.
3140
- Exposures complete overhaul. Notably
3241
- the _geometry_ column of the inherent `GeoDataFrame` is set up at initialization
3342
- 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`).
3443
- `Exposures.gdf` has been renamed to `Exposures.data` (it still works though, as it is a property now pointing to the latter)
3544
- the `check` method does not add a default "IMPF_" column to the GeoDataFrame anymore
45+
- Updated IBTrACS version from v4.0 to v4.1 ([#976](https://github.com/CLIMADA-project/climada_python/pull/976)
46+
- Fix xarray future warning in TCTracks for .dims to .sizes
47+
- Fix hazard.concatenate type test for pathos pools
3648

3749
### Fixed
3850

51+
- Resolved an issue where windspeed computation was much slower than in Climada v3 [#989](https://github.com/CLIMADA-project/climada_python/pull/989)
3952
- File handles are being closed after reading netcdf files with `climada.hazard` modules [#953](https://github.com/CLIMADA-project/climada_python/pull/953)
4053
- Avoids a ValueError in the impact calculation for cases with a single exposure point and MDR values of 0, by explicitly removing zeros in `climada.hazard.Hazard.get_mdr` [#933](https://github.com/CLIMADA-project/climada_python/pull/948)
4154

@@ -44,6 +57,10 @@ Code freeze date: YYYY-MM-DD
4457
- `climada.entity.exposures.Exposures.meta` attribute
4558
- `climada.entity.exposures.Exposures.set_lat_lon` method
4659
- `climada.entity.exposures.Exposures.set_geometry_points` method
60+
- `climada.hazard.Hazard.local_exceedance_inten` method
61+
- `climada.hazard.Hazard.plot_rp_intensity` method
62+
- `climada.engine.impact.Impact.local_exceedance_imp` method
63+
- `climada.engine.impact.Impact.plot_rp_imp` method
4764

4865
### Removed
4966

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

132149
- climada.hazard.base.Hazard.clear
150+
- climada.hazard.base.Hazard.from_mat
133151
- climada.hazard.base.Hazard.raster_to_vector
134152
- climada.hazard.base.Hazard.read_mat
135153
- climada.hazard.base.Hazard.reproject_raster

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ install_test : ## Test installation was successful
2929

3030
.PHONY : data_test
3131
data_test : ## Test data APIs
32-
python script/jenkins/test_data_api.py
32+
pytest $(PYTEST_JUNIT_ARGS) script/jenkins/test_data_api.py
3333

3434
.PHONY : notebook_test
3535
notebook_test : ## Test notebooks in doc/tutorial
36-
python script/jenkins/test_notebooks.py report
36+
pytest $(PYTEST_JUNIT_ARGS) script/jenkins/test_notebooks.py
3737

3838
.PHONY : integ_test
3939
integ_test : ## Integration tests execution with xml reports

0 commit comments

Comments
 (0)