Skip to content

Commit f312a58

Browse files
authored
Merge pull request #977 from CLIMADA-project/feature/documentation-restructuring
Restructuring of the documentation
2 parents 2995735 + 2ed84e5 commit f312a58

File tree

108 files changed

+2023
-1193
lines changed

Some content is hidden

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

108 files changed

+2023
-1193
lines changed

.readthedocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ python:
2525

2626
formats:
2727
- pdf
28+
29+
sphinx:
30+
configuration: doc/conf.py

CHANGELOG.md

Lines changed: 86 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Removed:
2626
- `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)
2727
- World Bank indicator data is now downloaded directly from their API via the function `download_world_bank_indicator`, instead of relying on the `pandas-datareader` package [#1033](https://github.com/CLIMADA-project/climada_python/pull/1033)
2828
- `Exposures.write_hdf5` pickles geometry data in WKB format, which is faster and more sustainable. [#1051](https://github.com/CLIMADA-project/climada_python/pull/1051)
29+
- The online documentation has been completely overhauled, now uses PyData theme: [#977](https://github.com/CLIMADA-project/climada_python/pull/977)
2930

3031
### Fixed
3132

@@ -59,27 +60,27 @@ Added:
5960

6061
Updated:
6162

62-
- `cartopy` >=0.23 → >=0.24
63-
- `cfgrib` >=0.9.9,<0.9.10 &rarr; >=0.9
64-
- `dask` >=2024.2,<2024.3 &rarr; >=2025.2
65-
- `eccodes` >=2.27,<2.28 &rarr; >=2.40
66-
- `gdal` >=3.6 &rarr; >=3.10
67-
- `geopandas` >=0.14 &rarr; >=0.14,<1.0
68-
- `h5py` >=3.8 &rarr; >=3.12
69-
- `haversine` >=2.8 &rarr; >=2.9
70-
- `matplotlib-base` >=3.9 &rarr; >=3.10
71-
- `netcdf4` >=1.6 &rarr; >=1.7
72-
- `numba` >=0.60 &rarr; >=0.61
73-
- `pillow` =9.4 &rarr; =11.1
74-
- `pyproj` >=3.5 &rarr; >=3.7
75-
- `pytables` >=3.7 &rarr; >=3.10
76-
- `python` =3.9 &rarr; =3.11
77-
- `rasterio` >=1.3 &rarr; >=1.4
78-
- `scikit-learn` >=1.5 &rarr; >=1.6
79-
- `scipy` >=1.13 &rarr; >=1.14,<1.15
80-
- `tqdm` >=4.66 &rarr; >=4.67
81-
- `xarray` >=2024.6 &rarr; >=2025.1
82-
- `xlsxwriter` >=3.1 &rarr; >=3.2
63+
- `cartopy` >=0.23 >=0.24
64+
- `cfgrib` >=0.9.9,<0.9.10 >=0.9
65+
- `dask` >=2024.2,<2024.3 >=2025.2
66+
- `eccodes` >=2.27,<2.28 >=2.40
67+
- `gdal` >=3.6 >=3.10
68+
- `geopandas` >=0.14 >=0.14,<1.0
69+
- `h5py` >=3.8 >=3.12
70+
- `haversine` >=2.8 >=2.9
71+
- `matplotlib-base` >=3.9 >=3.10
72+
- `netcdf4` >=1.6 >=1.7
73+
- `numba` >=0.60 >=0.61
74+
- `pillow` =9.4 =11.1
75+
- `pyproj` >=3.5 >=3.7
76+
- `pytables` >=3.7 >=3.10
77+
- `python` =3.9 =3.11
78+
- `rasterio` >=1.3 >=1.4
79+
- `scikit-learn` >=1.5 >=1.6
80+
- `scipy` >=1.13 >=1.14,<1.15
81+
- `tqdm` >=4.66 >=4.67
82+
- `xarray` >=2024.6 >=2025.1
83+
- `xlsxwriter` >=3.1 >=3.2
8384

8485
Removed:
8586

@@ -90,7 +91,7 @@ Removed:
9091
- `climada.hazard.tc_tracks.TCTracks.subset_years` function [#1023](https://github.com/CLIMADA-project/climada_python/pull/1023)
9192
- `climada.hazard.tc_tracks.TCTracks.from_FAST` function, add Australia basin (AU) [#993](https://github.com/CLIMADA-project/climada_python/pull/993)
9293
- Add `osm-flex` package to CLIMADA core [#981](https://github.com/CLIMADA-project/climada_python/pull/981)
93-
- `doc.tutorial.climada_entity_Exposures_osm.ipynb` tutorial explaining how to use `osm-flex`with CLIMADA
94+
- `doc.tutorial.climada_entity_Exposures_osm.ipynb` tutorial explaining how to use `osm-flex` with CLIMADA
9495
- `climada.util.coordinates.bounding_box_global` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
9596
- `climada.util.coordinates.bounding_box_from_countries` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
9697
- `climada.util.coordinates.bounding_box_from_cardinal_bounds` function [#980](https://github.com/CLIMADA-project/climada_python/pull/980)
@@ -122,8 +123,8 @@ Removed:
122123
- the _geometry_ column of the inherent `GeoDataFrame` is set up at initialization
123124
- 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`).
124125
- `Exposures.gdf` has been renamed to `Exposures.data` (it still works though, as it is a property now pointing to the latter)
125-
- the `check` method does not add a default "IMPF_" column to the GeoDataFrame anymore
126-
- Updated IBTrACS version from v4.0 to v4.1 ([#976](https://github.com/CLIMADA-project/climada_python/pull/976)
126+
- the `check` method does not add a default `'IMPF_'` column to the GeoDataFrame anymore
127+
- Updated IBTrACS version from v4.0 to v4.1 [#976](https://github.com/CLIMADA-project/climada_python/pull/976)
127128
- Fix xarray future warning in TCTracks for .dims to .sizes
128129
- Fix hazard.concatenate type test for pathos pools
129130

@@ -157,20 +158,20 @@ Added:
157158

158159
Updated:
159160

160-
- `bottleneck` >=1.3 &rarr; >=1.4
161-
- `cartopy` >=0.22 &rarr; >=0.23
162-
- `contextily` >=1.5 &rarr; >=1.6
163-
- `dask` >=2024.1,<2024.3 &rarr; >=2024.2,<2024.3
164-
- `matplotlib-base` >=3.8 &rarr; >=3.9
165-
- `numba` >=0.59 &rarr; >=0.60
166-
- `numexpr` >=2.9 &rarr; >=2.10
167-
- `pint` >=0.23 &rarr; >=0.24
168-
- `pycountry` >=22.3 &rarr; >=24.6
169-
- `requests` >=2.31 &rarr; >=2.32
170-
- `salib` >=1.4 &rarr; >=1.5
171-
- `scikit-learn` >=1.4 &rarr; >=1.5
172-
- `scipy` >=1.12 &rarr; >=1.13
173-
- `xarray` >=2024.2 &rarr; >=2024.6
161+
- `bottleneck` >=1.3 >=1.4
162+
- `cartopy` >=0.22 >=0.23
163+
- `contextily` >=1.5 >=1.6
164+
- `dask` >=2024.1,<2024.3 >=2024.2,<2024.3
165+
- `matplotlib-base` >=3.8 >=3.9
166+
- `numba` >=0.59 >=0.60
167+
- `numexpr` >=2.9 >=2.10
168+
- `pint` >=0.23 >=0.24
169+
- `pycountry` >=22.3 >=24.6
170+
- `requests` >=2.31 >=2.32
171+
- `salib` >=1.4 >=1.5
172+
- `scikit-learn` >=1.4 >=1.5
173+
- `scipy` >=1.12 >=1.13
174+
- `xarray` >=2024.2 >=2024.6
174175

175176
### Added
176177

@@ -276,17 +277,17 @@ Added:
276277

277278
Updated:
278279

279-
- `contextily` >=1.3 &rarr; >=1.5
280-
- `dask` >=2023 &rarr; >=2024
281-
- `numba` >=0.57 &rarr; >=0.59
282-
- `pandas` >=2.1 &rarr; >=2.1,<2.2
283-
- `pint` >=0.22 &rarr; >=0.23
284-
- `scikit-learn` >=1.3 &rarr; >=1.4
285-
- `scipy` >=1.11 &rarr; >=1.12
286-
- `sparse` >=0.14 &rarr; >=0.15
287-
- `xarray` >=2023.8 &rarr; >=2024.1
288-
- `overpy` =0.6 &rarr; =0.7
289-
- `peewee` =3.16.3 &rarr; =3.17.1
280+
- `contextily` >=1.3 >=1.5
281+
- `dask` >=2023 >=2024
282+
- `numba` >=0.57 >=0.59
283+
- `pandas` >=2.1 >=2.1,<2.2
284+
- `pint` >=0.22 >=0.23
285+
- `scikit-learn` >=1.3 >=1.4
286+
- `scipy` >=1.11 >=1.12
287+
- `sparse` >=0.14 >=0.15
288+
- `xarray` >=2023.8 >=2024.1
289+
- `overpy` =0.6 =0.7
290+
- `peewee` =3.16.3 =3.17.1
290291

291292
Removed:
292293

@@ -295,7 +296,7 @@ Removed:
295296
### Added
296297

297298
- Convenience method `api_client.Client.get_dataset_file`, combining `get_dataset_info` and `download_dataset`, returning a single file objet. [#821](https://github.com/CLIMADA-project/climada_python/pull/821)
298-
- Read and Write methods to and from csv files for the `DiscRates` class. [#818](ttps://github.com/CLIMADA-project/climada_python/pull/818)
299+
- Read and Write methods to and from csv files for the `DiscRates` class. [#818](https://github.com/CLIMADA-project/climada_python/pull/818)
299300
- Add `CalcDeltaClimate` to unsequa module to allow uncertainty and sensitivity analysis of impact change calculations [#844](https://github.com/CLIMADA-project/climada_python/pull/844)
300301
- Add function `safe_divide` in util which handles division by zero and NaN values in the numerator or denominator [#844](https://github.com/CLIMADA-project/climada_python/pull/844)
301302
- Add reset_frequency option for the impact.select() function. [#847](https://github.com/CLIMADA-project/climada_python/pull/847)
@@ -329,13 +330,13 @@ Release date: 2023-09-27
329330

330331
Added:
331332

332-
- `matplotlib-base` None &rarr; >=3.8
333+
- `matplotlib-base` None >=3.8
333334

334335
Changed:
335336

336-
- `geopandas` >=0.13 &rarr; >=0.14
337-
- `pandas` >=1.5,<2.0 &rarr; >=2.1
338-
- `salib` >=1.3.0 &rarr; >=1.4.7
337+
- `geopandas` >=0.13 >=0.14
338+
- `pandas` >=1.5,<2.0 >=2.1
339+
- `salib` >=1.3.0 >=1.4.7
339340

340341
Removed:
341342

@@ -364,37 +365,37 @@ Added:
364365

365366
Changed:
366367

367-
- `cartopy` >=0.20.0,<0.20.3 &rarr; >=0.21
368-
- `cfgrib` >=0.9.7,<0.9.10 &rarr; =0.9.9
369-
- `contextily` >=1.0 &rarr; >=1.3
370-
- `dask` >=2.25 &rarr; >=2023
371-
- `eccodes` [auto] &rarr; =2.27
372-
- `gdal` !=3.4.1 &rarr; >=3.6
373-
- `geopandas` >=0.8 &rarr; >=0.13
374-
- `h5py` >=2.10 &rarr; >=3.8
375-
- `haversine` >=2.3 &rarr; >=2.8
376-
- `matplotlib` >=3.2,< 3.6 &rarr; >=3.7
377-
- `netcdf4` >=1.5 &rarr; >=1.6
378-
- `numba` >=0.51,!=0.55.0 &rarr; >=0.57
379-
- `openpyxl` >=3.0 &rarr; >=3.1
380-
- `pandas-datareader` >=0.9 &rarr; >=0.10
381-
- `pathos` >=0.2 &rarr; >=0.3
382-
- `pint` >=0.15 &rarr; >=0.22
383-
- `proj` !=9.0.0 &rarr; >=9.1
384-
- `pycountry` >=20.7 &rarr; >=22.3
385-
- `pytables` >=3.6 &rarr; >=3.7
386-
- `rasterio` >=1.2.7,<1.3 &rarr; >=1.3
387-
- `requests` >=2.24 &rarr; >=2.31
388-
- `salib` >=1.3.0 &rarr; >=1.4
389-
- `scikit-learn` >=1.0 &rarr; >=1.2
390-
- `scipy` >=1.6 &rarr; >=1.10
391-
- `sparse` >=0.13 &rarr; >=0.14
392-
- `statsmodels` >=0.11 &rarr; >=0.14
393-
- `tabulate` >=0.8 &rarr; >=0.9
394-
- `tqdm` >=4.48 &rarr; >=4.65
395-
- `xarray` >=0.13 &rarr; >=2023.5
396-
- `xlrd` >=1.2 &rarr; >=2.0
397-
- `xlsxwriter` >=1.3 &rarr; >=3.1
368+
- `cartopy` >=0.20.0,<0.20.3 >=0.21
369+
- `cfgrib` >=0.9.7,<0.9.10 =0.9.9
370+
- `contextily` >=1.0 >=1.3
371+
- `dask` >=2.25 >=2023
372+
- `eccodes` [auto] =2.27
373+
- `gdal` !=3.4.1 >=3.6
374+
- `geopandas` >=0.8 >=0.13
375+
- `h5py` >=2.10 >=3.8
376+
- `haversine` >=2.3 >=2.8
377+
- `matplotlib` >=3.2,< 3.6 >=3.7
378+
- `netcdf4` >=1.5 >=1.6
379+
- `numba` >=0.51,!=0.55.0 >=0.57
380+
- `openpyxl` >=3.0 >=3.1
381+
- `pandas-datareader` >=0.9 >=0.10
382+
- `pathos` >=0.2 >=0.3
383+
- `pint` >=0.15 >=0.22
384+
- `proj` !=9.0.0 >=9.1
385+
- `pycountry` >=20.7 >=22.3
386+
- `pytables` >=3.6 >=3.7
387+
- `rasterio` >=1.2.7,<1.3 >=1.3
388+
- `requests` >=2.24 >=2.31
389+
- `salib` >=1.3.0 >=1.4
390+
- `scikit-learn` >=1.0 >=1.2
391+
- `scipy` >=1.6 >=1.10
392+
- `sparse` >=0.13 >=0.14
393+
- `statsmodels` >=0.11 >=0.14
394+
- `tabulate` >=0.8 >=0.9
395+
- `tqdm` >=4.48 >=4.65
396+
- `xarray` >=0.13 >=2023.5
397+
- `xlrd` >=1.2 >=2.0
398+
- `xlsxwriter` >=1.3 >=3.1
398399

399400
Removed:
400401

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ For orientation, these are some categories of possible contributions we can thin
1212
* **New Modules and Utility Functions:** Did you create a function or an entire module you find useful for your work? Maybe you are not the only one! Feel free to simply raise a pull request for functions that improve, e.g., plotting or data handling. As an entire module has to be carefully integrated into the framework, it might help if you talk to us first so we can design the module and plan the next steps. You can do that by raising an issue or starting a [discussion](https://github.com/CLIMADA-project/climada_python/discussions) on GitHub.
1313

1414
A good place to start a personal discussion is our monthly CLIMADA developers call.
15-
Please contact the [lead developers](https://wcr.ethz.ch/research/climada.html) if you want to join.
15+
Please contact the [lead developers](https://climada.ethz.ch/team/) if you want to join.
1616

1717
## Why Should You Contribute?
1818

19-
* You will be listed as author of the CLIMADA repository in the [AUTHORS](AUTHORS.md) file.
19+
* You will be listed as author of the CLIMADA repository in the [AUTHORS][authors] file.
2020
* You will improve the quality of the CLIMADA software for you and for everybody else using it.
2121
* You will gain insights into scientific software development.
2222

@@ -40,7 +40,7 @@ To contribute follow these steps:
4040
```bash
4141
pylint
4242
```
43-
6. Add your name to the [AUTHORS](AUTHORS.md) file.
43+
6. Add your name to the [AUTHORS][authors] file.
4444
7. Push your updates to the remote repository:
4545
4646
```bash
@@ -83,4 +83,5 @@ It also contains a checklist for both pull request authors and reviewers to guid
8383
8484
[docs]: https://climada-python.readthedocs.io/en/latest/
8585
[devguide]: https://climada-python.readthedocs.io/en/latest/#developer-guide
86-
[testing]: https://climada-python.readthedocs.io/en/latest/guide/Guide_Testing.html
86+
[testing]: https://climada-python.readthedocs.io/en/latest/development/Guide_Testing.html
87+
[authors]: https://github.com/CLIMADA-project/climada_python/blob/main/AUTHORS.md

climada/engine/unsequa/calc_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,15 @@ 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.
230230
231231
See Also
232232
--------
233233
SALib.sample: sampling methods from SALib SALib.sample
234-
https://salib.readthedocs.io/en/latest/api.html
234+
https://salib.readthedocs.io/en/latest/api.html
235235
236236
"""
237237

climada/engine/unsequa/calc_cost_benefit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353

5454

5555
class CalcCostBenefit(Calc):
56-
"""
57-
Cost Benefit uncertainty analysis class
56+
"""Cost Benefit uncertainty analysis class
5857
5958
This is the base class to perform uncertainty analysis on the outputs of
6059
climada.engine.costbenefit.CostBenefit().

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
-------

0 commit comments

Comments
 (0)