Skip to content

Commit a8b45c6

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/eq_methods_for_impf
2 parents 1606896 + ba6457c commit a8b45c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2807
-1094
lines changed

.github/scripts/prepare_release.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
66
- update version numbers in _version.py and setup.py
77
- purge the "Unreleased" section of CHANGELOG.md and rename it to the new version number
8-
- copy the README.md file to doc/misc/README.md,
9-
but without the badges as they interfere with the sphinx doc builder
108
119
All changes are immediately commited to the repository.
1210
"""
@@ -51,17 +49,6 @@ def bump_version_number(version_number: str, level: str) -> str:
5149
return ".".join([major, minor, patch])
5250

5351

54-
def update_readme(_nvn):
55-
"""align doc/misc/README.md with ./README.md but remove the non-markdown header lines from"""
56-
with open("README.md", "r", encoding="UTF-8") as rmin:
57-
lines = [line for line in rmin.readlines() if not line.startswith("[![")]
58-
while not lines[0].strip():
59-
lines = lines[1:]
60-
with open("doc/misc/README.md", "w", encoding="UTF-8") as rmout:
61-
rmout.writelines(lines)
62-
return GitFile("doc/misc/README.md")
63-
64-
6552
def update_changelog(nvn):
6653
"""Rename the "Unreleased" section, remove unused subsections and the code-freeze date,
6754
set the release date to today"""
@@ -108,7 +95,7 @@ def update_changelog(nvn):
10895
if section_name:
10996
changelog.write(f"### {section_name}\n")
11097
lines = [
111-
ln.strip()
98+
ln.rstrip()
11299
for ln in section
113100
if "code freeze date: " not in ln.lower()
114101
]
@@ -227,7 +214,6 @@ def prepare_new_release(level):
227214
update_setup(new_version_number).gitadd()
228215
update_version(new_version_number).gitadd()
229216
update_changelog(new_version_number).gitadd()
230-
update_readme(new_version_number).gitadd()
231217

232218
Git().commit(new_version_number)
233219

.github/scripts/setup_devbranch.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ git pull
1111

1212
git checkout origin/main \
1313
setup.py \
14-
doc/misc/README.md \
1514
CHANGELOG.md \
1615
*/_version.py
1716

1817
release=`python .github/scripts/setup_devbranch.py`
1918

2019
git add \
2120
setup.py \
22-
doc/misc/README.md \
2321
CHANGELOG.md \
2422
*/_version.py
2523

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
# Do not abort other tests if only a single one fails
2323
fail-fast: false
2424
matrix:
25-
python-version: ["3.9", "3.10", "3.11"]
25+
python-version: ["3.10", "3.11"]
2626

2727
steps:
2828
-
@@ -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/make-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will create a new release from main
22

33
# the new version number is the old one increased by 1 in the given level [major, minor, patch]
4-
# first, some files are modified (_version.py, setup.py, CHANGELOG.md and doc/misc/README.md)
4+
# first, some files are modified (_version.py, setup.py and CHANGELOG.md
55
# then, a new release is created on GitHub, tagged with v[new version number]
66

77
name: Create a new release

.github/workflows/postrelease-setup-devbranch.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# the version number of setup.py and _version.py will be taken from main, but have a "-dev" appendix
44
# the CHANGELOG.md file will be updated and have a vanila "Unreleased" section
5-
# the doc/misc/README.md file is taken over from main
65

76
name: Post-release develop setup
87

.readthedocs.yml

Lines changed: 4 additions & 1 deletion
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:
@@ -8,7 +11,7 @@ build:
811
# Append fixed Python version to requirements
912
jobs:
1013
pre_create_environment:
11-
- echo " - python=3.9" >> requirements/env_climada.yml
14+
- echo " - python=3.11" >> requirements/env_climada.yml
1215

1316
conda:
1417
environment: requirements/env_climada.yml

.zenodo.json

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"title": "CLIMADA Core Python Package",
3+
4+
"description": "CLIMADA (CLIMate ADAptation) is a free and open-source software framework for climate risk assessment and adaptation option appraisal. Designed by a large scientific community, it helps reasearchers, policymakers, and businesses analyse the impacts of natural hazards and explore adaptation strategies.",
5+
6+
"creators": [
7+
{
8+
"name": "Gabriela Aznar Siguan",
9+
"affiliation": "MeteoSwiss"
10+
},
11+
{
12+
"name": "David N. Bresch",
13+
"affiliation": "ETH Z\u00fcrich"
14+
},
15+
{
16+
"name": "Samuel Eberenz",
17+
"affiliation": "ETH Z\u00fcrich"
18+
},
19+
{
20+
"name": "Jan Hartman",
21+
"affiliation": "CelsiusPro"
22+
},
23+
{
24+
"name": "Marine Perus",
25+
"affiliation": "CelsiusPro"
26+
},
27+
{
28+
"name": "Thomas R\u00f6\u00f6sli"
29+
},
30+
{
31+
"name": "Dario Stocker"
32+
},
33+
{
34+
"name": "Veronica Bozzini"
35+
},
36+
{
37+
"name": "Carmen B. Steinmann"
38+
},
39+
{
40+
"name": "Evelyn M\u00fchlhofer",
41+
"affiliation": "MeteoSwiss"
42+
},
43+
{
44+
"name": "Rachel Bungerer"
45+
},
46+
{
47+
"name": "Inga J. Sauer"
48+
},
49+
{
50+
"name": "Samuel L\u00fcthi",
51+
"affiliation": "ETH Z\u00fcrich"
52+
},
53+
{
54+
"name": "Pui Man (Mannie) Kam",
55+
"affiliation": "ETH Z\u00fcrich"
56+
},
57+
{
58+
"name": "Simona Meiler",
59+
"affiliation": "ETH Z\u00fcrich"
60+
},
61+
{
62+
"name": "Alessio Ciullo",
63+
"affiliation": "ETH Z\u00fcrich"
64+
},
65+
{
66+
"name": "Thomas Vogt",
67+
"affiliation": "Potsdam Institute for Climate Impact Research"
68+
},
69+
{
70+
"name": "Benoit P. Guillod",
71+
"affiliation": "CLIMADA Technologies"
72+
},
73+
{
74+
"name": "Chahan M. Kropf",
75+
"affiliation": "ETH Z\u00fcrich"
76+
},
77+
{
78+
"name": "Emanuel Schmid",
79+
"affiliation": "ETH Z\u00fcrich"
80+
},
81+
{
82+
"name": "Chris Fairless",
83+
"affiliation": "CelsiusPro"
84+
},
85+
{
86+
"name": "Jan W\u00fcthrich"
87+
},
88+
{
89+
"name": "Z\u00e9lie Stalhandske",
90+
"affiliation": "ETH Z\u00fcrich"
91+
},
92+
{
93+
"name": "Yue Yu"
94+
},
95+
{
96+
"name": "Lukas Riedel",
97+
"affiliation": "ETH Z\u00fcrich"
98+
},
99+
{
100+
"name": "Raphael Portmann",
101+
"affiliation": "Agroscope"
102+
},
103+
{
104+
"name": "Nicolas Colombi",
105+
"affiliation": "ETH Z\u00fcrich"
106+
},
107+
{
108+
"name": "Leonie Villiger"
109+
},
110+
{
111+
"name": "Timo Schmid"
112+
},
113+
{
114+
"name": "Luca Severino"
115+
},
116+
{
117+
"name": "Samuel Juhel",
118+
"affiliation": "ETH Z\u00fcrich"
119+
},
120+
{
121+
"name": "Valentin Gebhart"
122+
}
123+
]
124+
}

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Emanuel Schmid
2424
* Chris Fairless
2525
* Jan Wüthrich
26-
* Zélie Standhanske
26+
* Zélie Stalhandske
2727
* Yue Yu
2828
* Lukas Riedel
2929
* Raphael Portmann

CHANGELOG.md

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

1313
### Added
1414

15+
### Changed
16+
- `Hazard.local_exceedance_intensity`, `Hazard.local_return_period` and `Impact.local_exceedance_impact`, `Impact.local_return_period`, using the `climada.util.interpolation` module: New default (no binning), binning on decimals, and faster implementation [#1012](https://github.com/CLIMADA-project/climada_python/pull/1012)
17+
### Fixed
18+
19+
### Deprecated
20+
21+
### Removed
22+
- `climada.util.interpolation.round_to_sig_digits` [#1012](https://github.com/CLIMADA-project/climada_python/pull/1012)
23+
24+
## 6.0.1
25+
26+
Release date: 2025-03-13
27+
28+
### Fixed
29+
30+
- bug in `climada.util.coordinates.bounding_box_from_countries` occurring if the country is a polygon and not a multipolygon
31+
[#1018](https://github.com/CLIMADA-project/climada_python/pull/1018)
32+
33+
## 6.0.0
34+
35+
Release date: 2025-03-03
36+
37+
### Dependency Changes
38+
39+
Added:
40+
41+
- `osm-flex` >=1.1
42+
43+
Updated:
44+
45+
- `cartopy` >=0.23 → >=0.24
46+
- `cfgrib` >=0.9.9,<0.9.10 &rarr; >=0.9
47+
- `dask` >=2024.2,<2024.3 &rarr; >=2025.2
48+
- `eccodes` >=2.27,<2.28 &rarr; >=2.40
49+
- `gdal` >=3.6 &rarr; >=3.10
50+
- `geopandas` >=0.14 &rarr; >=0.14,<1.0
51+
- `h5py` >=3.8 &rarr; >=3.12
52+
- `haversine` >=2.8 &rarr; >=2.9
53+
- `matplotlib-base` >=3.9 &rarr; >=3.10
54+
- `netcdf4` >=1.6 &rarr; >=1.7
55+
- `numba` >=0.60 &rarr; >=0.61
56+
- `pillow` =9.4 &rarr; =11.1
57+
- `pyproj` >=3.5 &rarr; >=3.7
58+
- `pytables` >=3.7 &rarr; >=3.10
59+
- `python` =3.9 &rarr; =3.11
60+
- `rasterio` >=1.3 &rarr; >=1.4
61+
- `scikit-learn` >=1.5 &rarr; >=1.6
62+
- `scipy` >=1.13 &rarr; >=1.14,<1.15
63+
- `tqdm` >=4.66 &rarr; >=4.67
64+
- `xarray` >=2024.6 &rarr; >=2025.1
65+
- `xlsxwriter` >=3.1 &rarr; >=3.2
66+
67+
Removed:
68+
69+
- `pyepsg`
70+
71+
### Added
72+
73+
- `climada.hazard.tc_tracks.TCTracks.subset_years` function [#1023](https://github.com/CLIMADA-project/climada_python/pull/1023)
74+
- `climada.hazard.tc_tracks.TCTracks.from_FAST` function, add Australia basin (AU) [#993](https://github.com/CLIMADA-project/climada_python/pull/993)
75+
- Add `osm-flex` package to CLIMADA core [#981](https://github.com/CLIMADA-project/climada_python/pull/981)
76+
- `doc.tutorial.climada_entity_Exposures_osm.ipynb` tutorial explaining how to use `osm-flex`with CLIMADA
77+
- `climada.util.coordinates.bounding_box_global` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
78+
- `climada.util.coordinates.bounding_box_from_countries` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
79+
- `climada.util.coordinates.bounding_box_from_cardinal_bounds` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
1580
- `climada.engine.impact.Impact.local_return_period` method [#971](https://github.com/CLIMADA-project/climada_python/pull/971)
1681
- `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)
1782
- `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)
@@ -28,23 +93,32 @@ Code freeze date: YYYY-MM-DD
2893

2994
### Changed
3095

96+
- `Centroids.append` now takes multiple arguments and provides a performance boost when doing so [#989](https://github.com/CLIMADA-project/climada_python/pull/989)
97+
- `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)
3198
- 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)
3299
- 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)
33100
- Renamed `climada.util.plot.subplots_from_gdf` to `climada.util.plot.plot_from_gdf` [#929](https://github.com/CLIMADA-project/climada_python/pull/929)
34101
- `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.
102+
- elements of `event_name` are now explicitly converted to `str` in `from_raster`, `from_xarray_raster`, `from_excel` and `from_csv`. [#951](https://github.com/CLIMADA-project/climada_python/pull/951), [#910](https://github.com/CLIMADA-project/climada_python/issues/910)
103+
- `event_id` and `event_name` are now explicitly converted to respectively a `np.ndarray` (`event_id`), a `list` (`event_name`) in readers. [#951](https://github.com/CLIMADA-project/climada_python/pull/951), [#950](https://github.com/CLIMADA-project/climada_python/issues/950)
35104
- Exposures complete overhaul. Notably
36-
- the _geometry_ column of the inherent `GeoDataFrame` is set up at initialization
37-
- 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`).
38-
- `Exposures.gdf` has been renamed to `Exposures.data` (it still works though, as it is a property now pointing to the latter)
39-
- the `check` method does not add a default "IMPF_" column to the GeoDataFrame anymore
105+
- the _geometry_ column of the inherent `GeoDataFrame` is set up at initialization
106+
- 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`).
107+
- `Exposures.gdf` has been renamed to `Exposures.data` (it still works though, as it is a property now pointing to the latter)
108+
- the `check` method does not add a default "IMPF_" column to the GeoDataFrame anymore
109+
- Updated IBTrACS version from v4.0 to v4.1 ([#976](https://github.com/CLIMADA-project/climada_python/pull/976)
110+
- Fix xarray future warning in TCTracks for .dims to .sizes
111+
- Fix hazard.concatenate type test for pathos pools
40112

41113
### Fixed
42114

115+
- Resolved an issue where windspeed computation was much slower than in Climada v3 [#989](https://github.com/CLIMADA-project/climada_python/pull/989)
43116
- File handles are being closed after reading netcdf files with `climada.hazard` modules [#953](https://github.com/CLIMADA-project/climada_python/pull/953)
44117
- 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)
45118

46119
### Deprecated
47120

121+
- `climada.hazard.trop_cyclone.trop_cyclone_windfields.compute_angular_windspeeds.cyclostrophic` argument
48122
- `climada.entity.exposures.Exposures.meta` attribute
49123
- `climada.entity.exposures.Exposures.set_lat_lon` method
50124
- `climada.entity.exposures.Exposures.set_geometry_points` method
@@ -53,8 +127,6 @@ Code freeze date: YYYY-MM-DD
53127
- `climada.engine.impact.Impact.local_exceedance_imp` method
54128
- `climada.engine.impact.Impact.plot_rp_imp` method
55129

56-
### Removed
57-
58130
## 5.0.0
59131

60132
Release date: 2024-07-19

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)