Skip to content

Commit d9d600d

Browse files
Merge branch 'develop-white' into feature/restructure_fitfuncs_exceedance
2 parents 13dfc8e + aa0615f commit d9d600d

18 files changed

+1013
-424
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,10 @@ data/ISIMIP_crop/
176176

177177
# climada data results folder:
178178
results/
179+
180+
# Hidden files we want to track
181+
!.gitignore
182+
!.pre-commit-config.yaml
183+
!.pylintrc
184+
!.readthedocs.yml
185+
!.github

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://pre-commit.com for more information
2+
default_language_version:
3+
python: python3
4+
5+
# See https://pre-commit.com/hooks.html for more hooks
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v3.2.0
9+
hooks:
10+
- id: end-of-file-fixer
11+
- id: trailing-whitespace
12+
13+
- repo: https://github.com/pycqa/isort
14+
rev: '5.13.2'
15+
hooks:
16+
- id: isort
17+
args: ["--profile", "black", "--filter-files"]
18+
19+
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
20+
- repo: https://github.com/psf/black-pre-commit-mirror
21+
rev: '24.4.2'
22+
hooks:
23+
- id: black-jupyter

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Code freeze date: YYYY-MM-DD
1717

1818
### Changed
1919

20+
- 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)
2021
- 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)
2122
- Renamed `climada.util.plot.subplots_from_gdf` to `climada.util.plot.plot_from_gdf` [#929](https://github.com/CLIMADA-project/climada_python/pull/929)
2223
- `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.

climada/engine/cost_benefit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from tabulate import tabulate
3333

3434
from climada.engine.impact_calc import ImpactCalc
35-
from climada.engine import Impact, ImpactFreqCurve
35+
from climada.engine.impact import Impact, ImpactFreqCurve
3636

3737
LOGGER = logging.getLogger(__name__)
3838

climada/engine/impact_calc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import geopandas as gpd
2828

2929
from climada import CONFIG
30-
from climada.engine import Impact
30+
from climada.engine.impact import Impact
3131

3232
LOGGER = logging.getLogger(__name__)
3333

climada/engine/unsequa/calc_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import numpy as np
3030

3131
from climada.util.value_representation import sig_dig as u_sig_dig
32-
from climada.engine.unsequa import UncOutput
32+
from climada.engine.unsequa.unc_output import UncOutput
3333

3434
LOGGER = logging.getLogger(__name__)
3535

climada/engine/unsequa/calc_cost_benefit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727

2828
from typing import Optional, Union
2929
import pandas as pd
30-
import numpy as np
3130
import pathos.multiprocessing as mp
3231
# use pathos.multiprocess fork of multiprocessing for compatibility
3332
# wiht notebooks and other environments https://stackoverflow.com/a/65001152/12454103
3433

3534
from climada.engine.cost_benefit import CostBenefit
36-
from climada.engine.unsequa import Calc, InputVar, UncCostBenefitOutput
37-
from climada.engine.unsequa.calc_base import _sample_parallel_iterator, _multiprocess_chunksize, _transpose_chunked_data
35+
from climada.engine.unsequa.input_var import InputVar
36+
from climada.engine.unsequa.unc_output import UncCostBenefitOutput
37+
from climada.engine.unsequa.calc_base import Calc, _sample_parallel_iterator, _multiprocess_chunksize, _transpose_chunked_data
3838
from climada.util import log_level
3939
from climada.hazard import Hazard
4040
from climada.entity import Entity

climada/engine/unsequa/calc_delta_climate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@
3434
# wiht notebooks and other environments https://stackoverflow.com/a/65001152/12454103
3535

3636
from climada.engine import ImpactCalc
37-
from climada.engine.unsequa import Calc, InputVar, UncImpactOutput
37+
from climada.engine.unsequa.input_var import InputVar
38+
from climada.engine.unsequa.unc_output import UncImpactOutput
3839
from climada.engine.unsequa.calc_base import (
40+
Calc,
3941
_sample_parallel_iterator,
4042
_multiprocess_chunksize,
4143
_transpose_chunked_data,

climada/engine/unsequa/calc_impact.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
# wiht notebooks and other environments https://stackoverflow.com/a/65001152/12454103
3434

3535
from climada.engine import ImpactCalc
36-
from climada.engine.unsequa import Calc, InputVar, UncImpactOutput
36+
from climada.engine.unsequa.input_var import InputVar
37+
from climada.engine.unsequa.unc_output import UncImpactOutput
3738
from climada.engine.unsequa.calc_base import (
39+
Calc,
3840
_sample_parallel_iterator,
3941
_multiprocess_chunksize,
4042
_transpose_chunked_data,

0 commit comments

Comments
 (0)