Skip to content

Restructuring of the documentation #977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 54 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
de6d4bd
Revert "Revert "Merge branch 'feature/documentation-restructuring' in…
spjuhel Nov 15, 2024
1d05166
adds sphinx-design dependency
spjuhel Nov 15, 2024
8b5227c
fixes docstrings indentations errors
spjuhel Dec 4, 2024
80c0694
improves navbar header rendering
spjuhel Dec 4, 2024
efef761
creates the new toctrees to start seeing content
spjuhel Dec 4, 2024
567a492
renames folder to match new naming
spjuhel Dec 4, 2024
2dce78d
changes conda to mamba
spjuhel Dec 4, 2024
62dfd29
added draft for 10min intro
ValentinGebhart Jan 6, 2025
bae24b5
first version of 10min CLIMADA intro
ValentinGebhart Jan 21, 2025
ac6b540
split climada dev and git intro
ValentinGebhart Feb 3, 2025
225a734
add data flow and workflow to dev intro
ValentinGebhart Feb 3, 2025
26c1063
fixes ``sphinx.configuration`` key is missing
spjuhel Feb 3, 2025
ac2c997
moves pages around
spjuhel Feb 3, 2025
1125d36
add some warnings and info to mamba installation
ValentinGebhart Feb 3, 2025
f584983
Merge branch 'feature/documentation-restructuring' of github.com:CLIM…
ValentinGebhart Feb 3, 2025
17e1a96
fixed typos
ValentinGebhart Feb 4, 2025
e534253
Restructures development guide with subsections
spjuhel Feb 4, 2025
e958b7c
More linkref fixing
spjuhel Feb 4, 2025
f934609
Reworks getting-started section
spjuhel Feb 4, 2025
c7f76c6
Title level fixing and 10min to clim back in userguide
spjuhel Feb 4, 2025
ef1c452
forgot moving 10min climada notebook file
spjuhel Feb 4, 2025
ca6b749
updated conda installation instructions for different OS
ValentinGebhart Feb 7, 2025
c0681bd
fixed white space
ValentinGebhart Feb 7, 2025
eec2487
fixed compiling headers issues
ValentinGebhart Feb 7, 2025
993ec4a
Update website link
spjuhel Feb 24, 2025
029b81d
Adds link to new website in top bar
spjuhel Mar 5, 2025
7c850a5
Updates User Guide landing page
spjuhel Mar 5, 2025
c95b7df
Updates hazard.rst with some landing content
spjuhel Mar 5, 2025
754417f
Updates exposures.rst with some landing content
spjuhel Mar 5, 2025
2302e91
Updates impact.rst with landing content
spjuhel Mar 5, 2025
68d2f3d
Updates index.rst install title
spjuhel Mar 5, 2025
97b108b
getting started
NicolasColombi Mar 10, 2025
e0d4e7e
readd the navigation in getting started
ValentinGebhart Mar 11, 2025
b442167
Update urls in install.rst
spjuhel Mar 17, 2025
400eb73
wip on urls
spjuhel Mar 17, 2025
4102232
url fixing WIP
spjuhel Mar 17, 2025
9962555
backtracking .md file hack
spjuhel Mar 18, 2025
f4d851d
Merge branch 'develop' into feature/documentation-restructuring
spjuhel Mar 18, 2025
fb7cd37
Adds some near final touch
spjuhel Mar 18, 2025
2d81ae1
Removes some errors messages from documentation build (see details)
spjuhel Mar 18, 2025
f2c27a7
implements improvement
spjuhel Mar 18, 2025
9a0ea1f
Merge branch 'feature/improve_ee_import' into feature/documentation-r…
spjuhel Mar 18, 2025
a666977
Final touch on urls
spjuhel Mar 18, 2025
fdcb215
Avoids section navigation in Changelog
spjuhel Mar 18, 2025
2ef5bd7
This file is not used anymore
spjuhel Mar 18, 2025
6282eb7
Improves How to navigate page
spjuhel Mar 18, 2025
898240d
Merge branch 'develop' into feature/documentation-restructuring
spjuhel Mar 18, 2025
9dcc2a3
add links and images to getting started
NicolasColombi Mar 19, 2025
88e305e
Tidying up after develop merged
spjuhel Mar 19, 2025
5752673
change logo with QR code
NicolasColombi Mar 19, 2025
8062f0e
Merge branch 'feature/documentation-restructuring' of https://github.…
NicolasColombi Mar 19, 2025
004a31f
fix indent last dropdown getting started
NicolasColombi Mar 19, 2025
5517c89
Revert "change logo with QR code, the logo was ugly on the page"
NicolasColombi Mar 19, 2025
ead106c
added section to local exceedance tutorial
ValentinGebhart Mar 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ python:

formats:
- pdf

sphinx:
configuration: doc/conf.py
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(authors)=
# CLIMADA List of Authors

* Gabriela Aznar-Siguan
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Removed:
### Added

- 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)
- Read and Write methods to and from csv files for the `DiscRates` class. [#818](ttps://github.com/CLIMADA-project/climada_python/pull/818)
- Read and Write methods to and from csv files for the `DiscRates` class. [#818](https://github.com/CLIMADA-project/climada_python/pull/818)
- 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)
- 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)
- Add reset_frequency option for the impact.select() function. [#847](https://github.com/CLIMADA-project/climada_python/pull/847)
Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ For orientation, these are some categories of possible contributions we can thin
* **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.

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

## Why Should You Contribute?

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

Expand All @@ -40,7 +40,7 @@ To contribute follow these steps:
```bash
pylint
```
6. Add your name to the [AUTHORS](AUTHORS.md) file.
6. Add your name to the [AUTHORS][authors] file.
7. Push your updates to the remote repository:

```bash
Expand Down Expand Up @@ -83,4 +83,5 @@ It also contains a checklist for both pull request authors and reviewers to guid

[docs]: https://climada-python.readthedocs.io/en/latest/
[devguide]: https://climada-python.readthedocs.io/en/latest/#developer-guide
[testing]: https://climada-python.readthedocs.io/en/latest/guide/Guide_Testing.html
[testing]: https://climada-python.readthedocs.io/en/latest/development/Guide_Testing.html
[authors]: https://github.com/CLIMADA-project/climada_python/blob/main/AUTHORS.md
4 changes: 2 additions & 2 deletions climada/engine/unsequa/calc_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ def make_sample(self, N, sampling_method="saltelli", sampling_kwargs=None):
The 'ff' sampling method does not require a value for the N parameter.
The inputed N value is hence ignored in the sampling process in the case
of this method.
The 'ff' sampling method requires a number of uncerainty parameters to be
The 'ff' sampling method requires a number of uncertainty parameters to be
a power of 2. The users can generate dummy variables to achieve this
requirement. Please refer to https://salib.readthedocs.io/en/latest/api.html
for more details.

See Also
--------
SALib.sample: sampling methods from SALib SALib.sample
https://salib.readthedocs.io/en/latest/api.html
https://salib.readthedocs.io/en/latest/api.html

"""

Expand Down
3 changes: 1 addition & 2 deletions climada/engine/unsequa/calc_cost_benefit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@


class CalcCostBenefit(Calc):
"""
Cost Benefit uncertainty analysis class
"""Cost Benefit uncertainty analysis class

This is the base class to perform uncertainty analysis on the outputs of
climada.engine.costbenefit.CostBenefit().
Expand Down
12 changes: 1 addition & 11 deletions climada/engine/unsequa/unc_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,9 @@ class UncOutput:
samples_df : pandas.DataFrame
Values of the sampled uncertainty parameters. It has n_samples rows
and one column per uncertainty parameter.
sampling_method : str
Name of the sampling method from SAlib.
https://salib.readthedocs.io/en/latest/api.html#
n_samples : int
Effective number of samples (number of rows of samples_df)
param_labels : list
Name of all the uncertainty parameters
distr_dict : dict
Comon flattened dictionary of all the distr_dict of all input variables.
It represents the distribution of all the uncertainty parameters.
problem_sa : dict
The description of the uncertainty variables and their
distribution as used in SALib.
https://salib.readthedocs.io/en/latest/basics.html.
"""

_metadata = [
Expand Down Expand Up @@ -192,6 +181,7 @@ def check_salib(self, sensitivity_method):
def sampling_method(self):
"""
Returns the sampling method used to generate self.samples_df
See: https://salib.readthedocs.io/en/latest/api.html#

Returns
-------
Expand Down
38 changes: 12 additions & 26 deletions climada/hazard/centroids/centr.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import logging
import warnings
from pathlib import Path
from typing import Any, Literal, Union
from typing import Any, Literal, Optional, Union

import cartopy
import cartopy.crs as ccrs
Expand Down Expand Up @@ -52,21 +52,7 @@


class Centroids:
"""Contains vector centroids as a GeoDataFrame

Attributes
----------
lat : np.array
Latitudinal coordinates in the specified CRS (can be any unit).
lon : np.array
Longitudinal coordinates in the specified CRS (can be any unit).
crs : pyproj.CRS
Coordinate reference system. Default: EPSG:4326 (WGS84)
region_id : np.array, optional
Numeric country (or region) codes. Default: None
on_land : np.array, optional
Boolean array indicating on land (True) or off shore (False). Default: None
"""
"""Contains vector centroids as a GeoDataFrame"""

def __init__(
self,
Expand Down Expand Up @@ -116,13 +102,13 @@ def __init__(
self.set_on_land(source=on_land, overwrite=True)

@property
def lat(self):
"""Return latitudes"""
def lat(self) -> np.array:
"""Latitudinal coordinates in the specified CRS (can be any unit)."""
return self.gdf.geometry.y.values

@property
def lon(self):
"""Return longitudes"""
def lon(self) -> np.array:
"""Longitudinal coordinates in the specified CRS (can be any unit)."""
return self.gdf.geometry.x.values

@property
Expand All @@ -131,26 +117,26 @@ def geometry(self):
return self.gdf["geometry"]

@property
def on_land(self):
"""Get the on_land property"""
def on_land(self) -> Optional[np.array]:
"""Boolean array indicating on land (True) or off shore (False). Default: None"""
if "on_land" not in self.gdf:
return None
if self.gdf["on_land"].isna().all():
return None
return self.gdf["on_land"].values

@property
def region_id(self):
"""Get the assigned region_id"""
def region_id(self) -> Optional[np.array]:
"""Numeric country (or region) codes. Default: None"""
if "region_id" not in self.gdf:
return None
if self.gdf["region_id"].isna().all():
return None
return self.gdf["region_id"].values

@property
def crs(self):
"""Get the crs"""
def crs(self) -> CRS:
"""Coordinate reference system. Default: EPSG:4326 (WGS84)"""
return self.gdf.crs

@property
Expand Down
Loading
Loading