You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/development/Guide_Review.ipynb
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -63,19 +63,19 @@
63
63
"cell_type": "markdown",
64
64
"metadata": {},
65
65
"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",
67
67
"\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",
69
71
"\n",
70
72
"```\n",
71
73
"git fetch && git checkout <branch to review>\n",
72
74
"mamba create -n <choose a name> # restrict python version here with \"python==3.x.*\"\n",
"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)"
"- __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."
52
52
]
53
53
},
54
54
{
55
-
"attachments": {},
56
55
"cell_type": "markdown",
56
+
"id": "5819e8c6",
57
57
"metadata": {},
58
58
"source": [
59
59
"### Basic Test Procedure\n",
@@ -323,7 +323,7 @@
323
323
"```\n",
324
324
"make integ_test\n",
325
325
"```\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",
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::
15
15
16
16
mamba activate climada_env
17
17
18
18
You are good to go!
19
19
20
20
.. seealso::
21
21
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.
23
23
24
-
Climada in a Nutshell
24
+
CLIMADA in a Nutshell
25
25
---------------------
26
26
27
27
.. dropdown:: How does CLIMADA compute impacts ?
@@ -33,7 +33,7 @@ Climada in a Nutshell
33
33
(e.g., population, infrastructure), and applies vulnerability functions that estimate damage
34
34
given the hazard intensity. By aggregating these results, CLIMADA calculates expected
35
35
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.
37
37
38
38
.. image:: /user-guide/img/risk_framework.png
39
39
:width:400
@@ -43,7 +43,7 @@ Climada in a Nutshell
43
43
.. dropdown:: How do you create a Hazard ?
44
44
:color: primary
45
45
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,
47
47
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,
48
48
users can easily load historical tropical cyclone tracks (IBTracks) and apply stochastic methods to generate
49
49
a larger ensemble of tracks from the historical ones, from which they can easily compute the maximal windspeed,
Copy file name to clipboardExpand all lines: doc/getting-started/install.rst
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ All following instructions should work on any operating system (OS) that is supp
14
14
15
15
.. hint:: If you need help with the vocabulary used on this page, refer to the :ref:`Glossary <install-glossary>`.
16
16
17
+
.. _install-manager:
18
+
17
19
---------------------------
18
20
Install environment manager
19
21
---------------------------
@@ -226,6 +228,24 @@ For advanced Python users or developers of CLIMADA, cloning the CLIMADA reposito
226
228
If this test passes, great!
227
229
You are good to go.
228
230
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] ./`).
0 commit comments