Skip to content

Commit fccc4a0

Browse files
committed
doc(notebooks and rst files): Applies changes from review, fixes some url
1 parent f8611bb commit fccc4a0

File tree

13 files changed

+67
-56
lines changed

13 files changed

+67
-56
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
# further. For a list of options available for each theme, see the
132132
# documentation.
133133
html_theme_options = {
134-
"header_links_before_dropdown": 8,
134+
"header_links_before_dropdown": 6,
135135
"navbar_align": "left",
136136
# "icon_links": [
137137
# {

doc/development/Guide_Euler.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@
7272
"\n",
7373
"(The last two lines may seem odd but they are working around a conficting dependency version situation.)\n",
7474
"\n",
75-
"You need to execute this every time you login to Euler before Climada can be used. \n",
75+
"You need to execute this every time you login to Euler before Climada can be used.\n",
7676
"To safe yourself from doing it manually, append these lines to the ~/.bashrc script, which is automatically executed upon logging in to Euler."
7777
]
7878
},
7979
{
8080
"cell_type": "markdown",
81+
"id": "4dad7c27",
8182
"metadata": {},
8283
"source": [
8384
"\n",
@@ -144,12 +145,13 @@
144145
},
145146
{
146147
"cell_type": "markdown",
148+
"id": "479e0ac2",
147149
"metadata": {},
148150
"source": [
149151
"\n",
150152
"### 5. Adjust the Climada configuration\n",
151153
"\n",
152-
"Edit a configuration file according to your needs (see [Guide_Configuration](../guide/Guide_Configuration.ipynb)).\n",
154+
"Edit a configuration file according to your needs (see [Configuration](../development/Guide_Configuration.ipynb)).\n",
153155
"Create a climada.conf file e.g., in /cluster/home/$USER/.config with the following content:\n",
154156
"\n",
155157
"```json\n",
@@ -186,12 +188,13 @@
186188
"\n",
187189
"Look for the \"`OK`\" in the hereby created `slurm-[XXXXXXX].out` file\n",
188190
"\n",
189-
"Please see the docs at https://slurm.schedmd.com/ on how to use the `slurm` batch system \n",
191+
"Please see the docs at https://slurm.schedmd.com/ on how to use the `slurm` batch system\n",
190192
"and the Wiki https://scicomp.ethz.ch/wiki/Transition_from_LSF_to_Slurm for a mapping of `lsf` commands to their `slurm` equivalents."
191193
]
192194
},
193195
{
194196
"cell_type": "markdown",
197+
"id": "e5c90bff",
195198
"metadata": {},
196199
"source": [
197200
"\n",

doc/development/Guide_Review.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@
6363
"cell_type": "markdown",
6464
"metadata": {},
6565
"source": [
66-
"This is a generic set of instruction which should always work.\n",
66+
"In order to make your review, you will have to have climada installed from source (see [here](../getting-started/install.rst#install-advanced)), and switch to the branch you are reviewing (see [here](../getting-started/install.rst#change-branch))\n",
6767
"\n",
68-
"Assuming you already cloned the climada repository, and are at the root of that folder:\n",
68+
"Creating a new python environment is often not necessary (*e.g.*, for minor feature branch that do not change the dependencies you can probably use a generic `develop` environment where you installed climada in editable mode), but can help in some cases (for instance changes in dependencies), to do so:\n",
69+
"\n",
70+
"Here is a generic set of instructions which should always work, assuming you already cloned the climada repository, and are at the root of that folder:\n",
6971
"\n",
7072
"```\n",
7173
"git fetch && git checkout <branch to review>\n",
7274
"mamba create -n <choose a name> # restrict python version here with \"python==3.x.*\"\n",
7375
"mamba env update -n <same name> -f requirements/env_climada.yml\n",
7476
"mamba activate <same name>\n",
7577
"pip install -e ./\n",
76-
"```\n",
77-
"\n",
78-
"Creating a new python environment is strongly recommended, but not always necessary (*e.g.*, for minor feature branch that do not change the dependencies you can probably use a generic `develop` environment where you installed climada in editable mode)"
78+
"```\n"
7979
]
8080
},
8181
{

doc/development/Guide_Testing.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@
4747
" `python -m unittest climada.x.test_y.TestY.test_z`\\\n",
4848
" _Interactively:_ \\\n",
4949
" `climada.x.test_y.TestY().test_z()`\n",
50-
"- __Right after implementation.__ In case the coverage analysis shows that there are missing tests, see [Test Coverage](#CICover).\n",
51-
"- __Later, when a bug was encountered.__ Whenever a bug gets fixed, also the tests need to be adapted or amended. "
50+
"- __Right after implementation.__ In case the coverage analysis shows that there are missing tests, see [Test Coverage](#test-coverage).\n",
51+
"- __Later, when a bug was encountered.__ Whenever a bug gets fixed, also the tests need to be adapted or amended."
5252
]
5353
},
5454
{
55-
"attachments": {},
5655
"cell_type": "markdown",
56+
"id": "5819e8c6",
5757
"metadata": {},
5858
"source": [
5959
"### Basic Test Procedure\n",
@@ -323,7 +323,7 @@
323323
"```\n",
324324
"make integ_test\n",
325325
"```\n",
326-
"It lasts about 15 minutes and runs extensive integration tests, during which also data from external resources is read. An open internet connection is required for a successful test run. \n",
326+
"It lasts about 15 minutes and runs extensive integration tests, during which also data from external resources is read. An open internet connection is required for a successful test run.\n",
327327
"\n",
328328
"### Coverage\n",
329329
"\n",

doc/development/dev-git.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

doc/development/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This developer guide regroups all information intended for contributors.
66

77
Very minimal instruction for contributing can be found below.
88

9-
If you are interested in contributing to Climada, we recommand you to start with the
9+
If you are interested in contributing to CLIMADA, we recommand you to start with the
1010
:doc:`Overview <Guide_CLIMADA_Development>` part of this guide.
1111

1212
.. include:: ../../CONTRIBUTING.md
@@ -18,7 +18,8 @@ If you are interested in contributing to Climada, we recommand you to start with
1818
:hidden:
1919

2020
Overview <Guide_CLIMADA_Development>
21-
Developing with Git <dev-git>
21+
Development with Git <Guide_Git_Development>
22+
Guide_continuous_integration_GitHub_actions
2223
Coding in python <coding-in-python>
2324
CLIMADA Coding Conventions <Guide_CLIMADA_conventions>
2425
CLIMADA Configuration convention <Guide_Configuration>

doc/getting-started/index.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ Getting started
55
Quick Installation
66
--------------------
77

8+
The simple CLIMADA installation only requires the `mamba` (or `conda`) python environment manager (look :ref:`here <install-manager>`).
89

9-
10-
Are you already working with mamba or conda? proceed to install CLIMADA by executing the following line in the terminal::
10+
If you are already working with mamba or conda, you can install CLIMADA by executing the following line in the terminal:
1111

1212
mamba create -n climada_env -c conda-forge climada
1313

14-
Each time you will want to work with CLIMADA, simply activate the environnment::
14+
Each time you will want to work with CLIMADA, simply activate the environment::
1515

1616
mamba activate climada_env
1717

1818
You are good to go!
1919

2020
.. seealso::
2121

22-
You don't have mamba or conda installed or you are looking for advanced installation instructions? Look up our :doc:`detailed instructions <install>` on CLIMADA installation.
22+
You don't have mamba or conda installed, or you are looking for advanced installation instructions? Look up our :doc:`detailed instructions <install>` on CLIMADA installation.
2323

24-
Climada in a Nutshell
24+
CLIMADA in a Nutshell
2525
---------------------
2626

2727
.. dropdown:: How does CLIMADA compute impacts ?
@@ -33,7 +33,7 @@ Climada in a Nutshell
3333
(e.g., population, infrastructure), and applies vulnerability functions that estimate damage
3434
given the hazard intensity. By aggregating these results, CLIMADA calculates expected
3535
impacts, such as economic losses or affected populations. See the dedicated :doc:`impact tutorial </user-guide/climada_engine_Impact>`
36-
for more informations.
36+
for more information.
3737

3838
.. image:: /user-guide/img/risk_framework.png
3939
:width: 400
@@ -43,7 +43,7 @@ Climada in a Nutshell
4343
.. dropdown:: How do you create a Hazard ?
4444
:color: primary
4545

46-
From a risk perspective, the intersting aspect of a natural hazard is its location and intensity. For such,
46+
From a risk perspective, the interesting aspect of a natural hazard is its location and intensity. For such,
4747
CLIMADA allows you to load your own :doc:`hazard </user-guide/climada_hazard_Hazard>` data or to directly define it in the platform. As an example,
4848
users can easily load historical tropical cyclone tracks (IBTracks) and apply stochastic methods to generate
4949
a larger ensemble of tracks from the historical ones, from which they can easily compute the maximal windspeed,

doc/getting-started/install.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ All following instructions should work on any operating system (OS) that is supp
1414

1515
.. hint:: If you need help with the vocabulary used on this page, refer to the :ref:`Glossary <install-glossary>`.
1616

17+
.. _install-manager:
18+
1719
---------------------------
1820
Install environment manager
1921
---------------------------
@@ -226,6 +228,24 @@ For advanced Python users or developers of CLIMADA, cloning the CLIMADA reposito
226228
If this test passes, great!
227229
You are good to go.
228230

231+
.. _change-branch:
232+
233+
How to switch branch
234+
^^^^^^^^^^^^^^^^^^^^^^
235+
236+
Advanced users, or reviewers, may also want to check the feature of a specific branch other than develop.
237+
To do so, **assuming you did install CLIMADA in editable mode (`pip install` with the `-e` flag)**, you just have to:
238+
239+
```
240+
git fetch
241+
git checkout <branch>
242+
git pull
243+
```
244+
245+
This will work most of the time, except if the target branch defines new dependencies that you don't have already in your environment (as they will not get installed this way), in that case you can install these dependencies yourself, or create a new environment with the *new* requirements from the branch.
246+
247+
If you did not install CLIMADA in editable mode, you can also reinstall CLIMADA from its folder after switching the branch (`pip install [-e] ./`).
248+
229249
.. _devdeps:
230250

231251
Install Developer Dependencies (Optional)

doc/index.rst

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
Welcome to CLIMADA!
55
===================
66

7-
.. raw:: html
8-
9-
<div class="hero">
10-
<b style="font-size: 1.5rem; display: block;">CLIMADA (CLIMate ADAptation)</b>
11-
<p style="font-size: 1.5rem; display: block;">
12-
is a free and open-source software framework for climate risk assessment and
13-
adaptation option appraisal. Designed by a large scientific community, it
14-
helps reasearchers, policymakers, and businesses analyse the impacts of
15-
natural hazards and explore adaptation strategies.
16-
</p>
17-
</div>
7+
.. card:: CLIMADA (CLIMate ADAptation)
8+
:text-align: center
9+
:width: 75%
10+
:margin: auto
11+
12+
CLIMADA is a free and open-source software framework for climate risk assessment and
13+
adaptation option appraisal.
14+
Designed by a large scientific community, it
15+
helps researchers, policymakers, and businesses analyse the impacts of
16+
natural hazards and explore adaptation strategies.
17+
1818

1919
CLIMADA is primarily developed and maintained by the `Weather and Climate Risks
2020
Group <https://wcr.ethz.ch/>`_ at `ETH Zürich <https://ethz.ch/en.html>`_.
@@ -31,12 +31,14 @@ specialized applications can be found in the `CLIMADA Petals
3131
**Useful links:** `WCR Group <https://wcr.ethz.ch/>`_ | `CLIMADA Petals <https://climada-petals.readthedocs.io/en/stable/>`_ | `CLIMADA website <https://climada.ethz.ch>`_ | `Mailing list <https://sympa.ethz.ch/sympa/info/climada-users>`_
3232

3333
.. grid:: 1 2 2 2
34-
:gutter: 4
35-
:padding: 2 2 0 0
34+
:margin: 5
35+
:gutter: 0 2 3 4
36+
:padding: 0 0 2 2
3637
:class-container: sd-text-center
3738

3839
.. grid-item-card:: Getting Started
3940
:shadow: md
41+
:width: 75%
4042

4143
Getting started with CLIMADA: How to install?
4244
What are the basic concepts and functionalities?
@@ -52,6 +54,7 @@ specialized applications can be found in the `CLIMADA Petals
5254

5355
.. grid-item-card:: User Guide
5456
:shadow: md
57+
:width: 75%
5558

5659
Want to go more in depth? Check out the User guide. It contains detailed
5760
tutorials on the different concepts, modules and possible usage of CLIMADA.
@@ -70,6 +73,7 @@ specialized applications can be found in the `CLIMADA Petals
7073

7174
.. grid-item-card:: Implementation API reference
7275
:shadow: md
76+
:width: 75%
7377

7478
The reference guide contains a detailed description of
7579
the CLIMADA API. The API reference describes each module, class,
@@ -87,6 +91,7 @@ specialized applications can be found in the `CLIMADA Petals
8791

8892
.. grid-item-card:: Developer guide
8993
:shadow: md
94+
:width: 75%
9095

9196
Saw a typo in the documentation? Want to improve
9297
existing functionalities? Want to extend them?

doc/misc/CONTRIBUTING.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)