Skip to content

Commit

Permalink
Merge branch 'develop' into feature/cyclostrophic-as-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Dec 13, 2024
2 parents 22ff62a + 595b31f commit a8d1b2c
Show file tree
Hide file tree
Showing 22 changed files with 2,046 additions and 473 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ jobs:
needs: build-and-test
with:
core_branch: ${{ github.ref }}
petals_branch: feature/exposures_crs
petals_branch: develop
permissions:
checks: write
50 changes: 50 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: GitHub CI

# Execute this for every pull request (opened, reopened, and synchronized)
on: [pull_request]

jobs:
pre-commit-checks:
name: 'Core / Pre-Commit Checks'
runs-on: ubuntu-latest

steps:
-
name: Checkout Repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
-
name: Checkout target commit
run: git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin ${{ github.event.pull_request.base.ref }}
-
name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
-
# Store the current date to use it as cache key
name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
-
name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.cache/pre-commit
key: ${{ github.event.pull_request.head.ref }}-${{ steps.date.outputs.date }}
restore-keys: |
${{ github.event.pull_request.head.ref }}
${{ github.event.pull_request.base.ref }}
develop
main
-
name: Install pre-commit and hooks
run: |
pip install pre-commit
pre-commit install --install-hooks
-
name: Run pre-commit checks
run: pre-commit run --show-diff-on-failure --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Code freeze date: YYYY-MM-DD

### Added

- `climada.engine.impact.Impact.local_return_period` method [#971](https://github.com/CLIMADA-project/climada_python/pull/971)
- `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)
- `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)
- `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)
- `climada.exposures.exposures.Exposures.geometry` property
- `climada.exposures.exposures.Exposures.latitude` property
Expand All @@ -28,11 +31,15 @@ Code freeze date: YYYY-MM-DD
- 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)
- 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)
- Renamed `climada.util.plot.subplots_from_gdf` to `climada.util.plot.plot_from_gdf` [#929](https://github.com/CLIMADA-project/climada_python/pull/929)
- `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.
- Exposures complete overhaul. Notably
- the _geometry_ column of the inherent `GeoDataFrame` is set up at initialization
- 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`).
- `Exposures.gdf` has been renamed to `Exposures.data` (it still works though, as it is a property now pointing to the latter)
- the `check` method does not add a default "IMPF_" column to the GeoDataFrame anymore
- Updated IBTrACS version from v4.0 to v4.1 ([#976](https://github.com/CLIMADA-project/climada_python/pull/976)
- Fix xarray future warning in TCTracks for .dims to .sizes
- Fix hazard.concatenate type test for pathos pools

### Fixed

Expand All @@ -44,6 +51,10 @@ Code freeze date: YYYY-MM-DD
- `climada.entity.exposures.Exposures.meta` attribute
- `climada.entity.exposures.Exposures.set_lat_lon` method
- `climada.entity.exposures.Exposures.set_geometry_points` method
- `climada.hazard.Hazard.local_exceedance_inten` method
- `climada.hazard.Hazard.plot_rp_intensity` method
- `climada.engine.impact.Impact.local_exceedance_imp` method
- `climada.engine.impact.Impact.plot_rp_imp` method

### Removed

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

- climada.hazard.base.Hazard.clear
- climada.hazard.base.Hazard.from_mat
- climada.hazard.base.Hazard.raster_to_vector
- climada.hazard.base.Hazard.read_mat
- climada.hazard.base.Hazard.reproject_raster
Expand Down
Loading

0 comments on commit a8d1b2c

Please sign in to comment.