Skip to content

Commit 8b5227c

Browse files
committed
fixes docstrings indentations errors
1 parent 1d05166 commit 8b5227c

File tree

10 files changed

+39
-36
lines changed

10 files changed

+39
-36
lines changed

climada/engine/unsequa/calc_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def make_sample(self, N, sampling_method="saltelli", sampling_kwargs=None):
207207
sampling_method : str, optional
208208
The sampling method as defined in SALib. Possible choices:
209209
'saltelli', 'latin', 'morris', 'dgsm', 'fast_sampler', 'ff', 'finite_diff',
210-
https://salib.readthedocs.io/en/latest/api.html
210+
https://salib.readthedocs.io/en/latest/api.html
211211
The default is 'saltelli'.
212212
sampling_kwargs : kwargs, optional
213213
Optional keyword arguments passed on to the SALib sampling_method.
@@ -223,7 +223,7 @@ def make_sample(self, N, sampling_method="saltelli", sampling_kwargs=None):
223223
The 'ff' sampling method does not require a value for the N parameter.
224224
The inputed N value is hence ignored in the sampling process in the case
225225
of this method.
226-
The 'ff' sampling method requires a number of uncerainty parameters to be
226+
The 'ff' sampling method requires a number of uncertainty parameters to be
227227
a power of 2. The users can generate dummy variables to achieve this
228228
requirement. Please refer to https://salib.readthedocs.io/en/latest/api.html
229229
for more details.
@@ -232,7 +232,7 @@ def make_sample(self, N, sampling_method="saltelli", sampling_kwargs=None):
232232
See Also
233233
--------
234234
SALib.sample: sampling methods from SALib SALib.sample
235-
https://salib.readthedocs.io/en/latest/api.html
235+
https://salib.readthedocs.io/en/latest/api.html
236236
237237
"""
238238

climada/engine/unsequa/calc_cost_benefit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class CalcCostBenefit(Calc):
7777
_metric_names : tuple(str)
7878
Names of the cost benefit output metrics
7979
('tot_climate_risk', 'benefit', 'cost_ben_ratio',
80-
'imp_meas_present', 'imp_meas_future')
80+
'imp_meas_present', 'imp_meas_future')
8181
8282
"""
8383

climada/engine/unsequa/calc_delta_climate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CalcDeltaImpact(Calc):
8181
_input_var_names : tuple(str)
8282
Names of the required uncertainty input variables
8383
('exp_initial_input_var', 'impf_initial_input_var', 'haz_initial_input_var',
84-
'exp_final_input_var', 'impf_final_input_var', 'haz_final_input_var'')
84+
'exp_final_input_var', 'impf_final_input_var', 'haz_final_input_var'')
8585
_metric_names : tuple(str)
8686
Names of the impact output metrics
8787
('aai_agg', 'freq_curve', 'at_event', 'eai_exp')

climada/engine/unsequa/unc_output.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,9 @@ class UncOutput:
8484
samples_df : pandas.DataFrame
8585
Values of the sampled uncertainty parameters. It has n_samples rows
8686
and one column per uncertainty parameter.
87-
sampling_method : str
88-
Name of the sampling method from SAlib.
89-
https://salib.readthedocs.io/en/latest/api.html#
90-
n_samples : int
91-
Effective number of samples (number of rows of samples_df)
92-
param_labels : list
93-
Name of all the uncertainty parameters
9487
distr_dict : dict
9588
Comon flattened dictionary of all the distr_dict of all input variables.
9689
It represents the distribution of all the uncertainty parameters.
97-
problem_sa : dict
98-
The description of the uncertainty variables and their
99-
distribution as used in SALib.
100-
https://salib.readthedocs.io/en/latest/basics.html.
10190
"""
10291

10392
_metadata = [
@@ -192,6 +181,7 @@ def check_salib(self, sensitivity_method):
192181
def sampling_method(self):
193182
"""
194183
Returns the sampling method used to generate self.samples_df
184+
See: https://salib.readthedocs.io/en/latest/api.html#
195185
196186
Returns
197187
-------

climada/hazard/base.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,16 @@ def check_matrices(self):
225225
--------
226226
:py:func:`climada.util.checker.prune_csr_matrix`
227227
228-
Todo
229-
-----
230-
* Check consistency with centroids
231-
232228
Raises
233229
------
234230
ValueError
235231
If matrices are ill-formed or ill-shaped in relation to each other
236232
"""
233+
234+
# Todo (Previously in docstring)
235+
# -----
236+
# * Check consistency with centroids
237+
237238
u_check.prune_csr_matrix(self.intensity)
238239
u_check.prune_csr_matrix(self.fraction)
239240
if self.fraction.nnz > 0:

climada/hazard/tc_clim_change.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ def get_knutson_scaling_factor(
7171
in Jewson et al., (2021).
7272
7373
Related publications:
74+
7475
- Knutson et al., (2020): Tropical cyclones and climate
7576
change assessment. Part II: Projected response to anthropogenic warming.
7677
Bull. Amer. Meteor. Soc., 101 (3), E303–E322,
7778
https://doi.org/10.1175/BAMS-D-18-0194.1.
78-
7979
- Jewson (2021): Conversion of the Knutson et al. (2020) Tropical Cyclone
8080
Climate Change Projections to Risk Model Baselines,
8181
https://doi.org/10.1175/JAMC-D-21-0102.1
@@ -94,15 +94,15 @@ def get_knutson_scaling_factor(
9494
the provided percentiles are the 10th, 25th, 50th, 75th and 90th. Please refer to the
9595
mentioned publications for more details.
9696
possible percentiles:
97-
'5/10' either the 5th or 10th percentile depending on variable (see text above)
98-
'25' for the 25th percentile
99-
'50' for the 50th percentile
100-
'75' for the 75th percentile
101-
'90/95' either the 90th or 95th percentile depending on variable (see text above)
97+
- '5/10' either the 5th or 10th percentile depending on variable (see text above)
98+
- '25' for the 25th percentile
99+
- '50' for the 50th percentile
100+
- '75' for the 75th percentile
101+
- '90/95' either the 90th or 95th percentile depending on variable (see text above)
102102
Default: '50'
103103
basin : str
104104
region of interest, possible choices are:
105-
'NA', 'WP', 'EP', 'NI', 'SI', 'SP'
105+
'NA', 'WP', 'EP', 'NI', 'SI', 'SP'
106106
baseline : tuple of int
107107
the starting and ending years that define the historical
108108
baseline. The historical baseline period must fall within

climada/hazard/tc_tracks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ class TCTracks:
198198
----------
199199
data : list(xarray.Dataset)
200200
List of tropical cyclone tracks. Each track contains following attributes:
201+
201202
- time (coords)
202203
- lat (coords)
203204
- lon (coords)
@@ -216,9 +217,12 @@ class TCTracks:
216217
- data_provider (attrs)
217218
- id_no (attrs)
218219
- category (attrs)
220+
219221
Computed during processing:
222+
220223
- on_land (bool for each track position)
221224
- dist_since_lf (in km)
225+
222226
Additional data variables such as "nature" (specifiying, for each track position, whether a
223227
system is a disturbance, tropical storm, post-transition extratropical storm etc.) might be
224228
included, depending on the data source and on use cases.

climada/hazard/trop_cyclone/trop_cyclone.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -408,20 +408,25 @@ def apply_climate_scenario_knu(
408408
are the 10th, 25th, 50th, 75th and 90th. Please refer to the mentioned publications
409409
for more details.
410410
possible percentiles:
411-
'5/10' either the 5th or 10th percentile depending on variable (see text above)
412-
'25' for the 25th percentile
413-
'50' for the 50th percentile
414-
'75' for the 75th percentile
415-
'90/95' either the 90th or 95th percentile depending on variable (see text above)
411+
412+
- '5/10' either the 5th or 10th percentile depending on variable (see text above)
413+
- '25' for the 25th percentile
414+
- '50' for the 50th percentile
415+
- '75' for the 75th percentile
416+
- '90/95' either the 90th or 95th percentile depending on variable (see text above)
417+
416418
Default: '50'
417419
scenario : str
418420
possible scenarios:
419-
'2.6' for RCP 2.6
420-
'4.5' for RCP 4.5
421-
'6.0' for RCP 6.0
422-
'8.5' for RCP 8.5
421+
422+
- '2.6' for RCP 2.6
423+
- '4.5' for RCP 4.5
424+
- '6.0' for RCP 6.0
425+
- '8.5' for RCP 8.5
426+
423427
target_year : int
424428
future year to be simulated, between 2000 and 2100. Default: 2050.
429+
425430
Returns
426431
-------
427432
haz_cc : climada.hazard.TropCyclone

climada/util/api_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,7 @@ def purge_cache(self, target_dir=SYSTEM_DIR, keep_testfiles=True):
11431143
"""Removes downloaded dataset files from the given directory if they have been downloaded
11441144
with the API client, if they are beneath the given directory and if one of the following
11451145
is the case:
1146+
11461147
- there status is neither 'active' nor 'test_dataset'
11471148
- their status is 'test_dataset' and keep_testfiles is set to False
11481149
- their status is 'active' and they are outdated, i.e., there is a dataset with the same

climada/util/coordinates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,9 +2940,11 @@ def set_df_geometry_points(df_val, scheduler=None, crs=None):
29402940
contains latitude and longitude columns
29412941
scheduler : str, optional
29422942
Scheduler type for dask map_partitions.
2943+
29432944
.. deprecated:: 5.0
29442945
This function does not use dask features anymore. The parameter has no effect
29452946
and will be removed in a future version.
2947+
29462948
crs : object (anything readable by pyproj4.CRS.from_user_input), optional
29472949
Coordinate Reference System, if omitted or None: df_val.geometry.crs
29482950
"""

0 commit comments

Comments
 (0)