Skip to content

Commit 402fa24

Browse files
peanutfunChahan Kropf
andauthored
Update installation instructions (#776)
* Add installing climada-petals to simple install instructions * Update VSCode instructions for pytest * Update changelog --------- Co-authored-by: Chahan Kropf <[email protected]>
1 parent 8e0d851 commit 402fa24

File tree

2 files changed

+35
-16
lines changed

2 files changed

+35
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Removed:
5959
- Reduce memory requirements of `TropCyclone.from_tracks` [#749](https://github.com/CLIMADA-project/climada_python/pull/749)
6060
- Support for different wind speed and pressure units in `TCTracks` when running `TropCyclone.from_tracks` [#749](https://github.com/CLIMADA-project/climada_python/pull/749)
6161
- Changed the parallel package from Pathos to Multiproess in the unsequa module [#763](https://github.com/CLIMADA-project/climada_python/pull/763)
62+
- Updated installation instructions to use conda for core and petals [#776](https://github.com/CLIMADA-project/climada_python/pull/776)
6263

6364
### Fixed
6465

doc/guide/install.rst

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,31 @@ Depening on your level of expertise, we provide two different approaches:
3737

3838
* If you have never worked with a command line, or if you just want to give CLIMADA a try, follow the :ref:`simple instructions <install-simple>`.
3939
* If you want to use the very latest development version of CLIMADA or even develop new CLIMADA code, follow the :ref:`advanced instructions <install-advanced>`.
40-
If you want to install `CLIMADA Petals`_, also follow these.
4140

4241
Both approaches are not mutually exclusive.
4342
After successful installation, you may switch your setup at any time.
4443

44+
.. _petals-notes:
45+
46+
Notes on the CLIMADA Petals Package
47+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
49+
CLIMADA is divided into two packages, CLIMADA Core (`climada_python <https://github.com/CLIMADA-project/climada_python>`_) and CLIMADA Petals (`climada_petals <https://github.com/CLIMADA-project/climada_petals>`_).
50+
The Core contains all the modules necessary for probabilistic impact, averted damage, uncertainty and forecast calculations.
51+
Data for hazard, exposures and impact functions can be obtained from the :doc:`CLIMADA Data API </tutorial/climada_util_api_client>`.
52+
Hazard and Exposures subclasses are included as demonstrators only.
53+
54+
.. attention:: CLIMADA Petals is **not** a standalone module and requires CLIMADA Core to be installed!
55+
56+
CLIMADA Petals contains all the modules for generating data (e.g., ``TC_Surge``, ``WildFire``, ``OpenStreeMap``, ...).
57+
New modules are developed and tested here.
58+
Some data created with modules from Petals is available to download from the :doc:`Data API </tutorial/climada_util_api_client>`.
59+
This works with just CLIMADA Core installed.
60+
CLIMADA Petals can be used to generate additional data of this type, or to have a look at the tutorials for all data types available from the API.
61+
62+
Both :ref:`installation approaches <install-choice>` mentioned above support CLIMADA Petals.
63+
If you are unsure whether you need Petals, you can install the Core first and later add Petals in both approaches.
64+
4565
.. _install-simple:
4666

4767
-------------------
@@ -77,6 +97,12 @@ These instructions will install the most recent stable version of CLIMADA withou
7797
In the end, you should see an "Ok".
7898
If so, great! You are good to go.
7999

100+
#. *Optional:* Install CLIMADA Petals into the environment:
101+
102+
.. code-block:: shell
103+
104+
conda install -n climada_env -c conda-forge climada-petals
105+
80106
.. _install-advanced:
81107

82108
---------------------
@@ -191,18 +217,7 @@ Instructions for running the test scripts can be found in the :doc:`Testing and
191217
Install CLIMADA Petals (Optional)
192218
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
193219

194-
CLIMADA is divided into two repositories, CLIMADA Core (`climada_python <https://github.com/CLIMADA-project/climada_python>`_) and CLIMADA Petals (`climada_petals <https://github.com/CLIMADA-project/climada_petals>`_).
195-
The Core contains all the modules necessary for probabilistic impact, averted damage, uncertainty and forecast calculations.
196-
Data for hazard, exposures and impact functions can be obtained from the :doc:`CLIMADA Data API </tutorial/climada_util_api_client>`.
197-
Hazard and Exposures subclasses are included as demonstrators only.
198-
199-
.. attention:: CLIMADA Petals is **not** a standalone module and requires CLIMADA Core to be installed!
200-
201-
CLIMADA Petals contains all the modules for generating data (e.g., ``TC_Surge``, ``WildFire``, ``OpenStreeMap``, ...).
202-
New modules are developed and tested here.
203-
Some data created with modules from Petals is available to download from the :doc:`Data API </tutorial/climada_util_api_client>`.
204-
This works with just CLIMADA Core installed.
205-
CLIMADA Petals can be used to generate additional data of this type, or to have a look at the tutorials for all data types available from the API.
220+
If you are unsure whether you need Petals, see the :ref:`notes above <petals-notes>`.
206221

207222
To install CLIMADA Petals, we assume you have already installed CLIMADA Core with the :ref:`advanced instructions <install-advanced>` above.
208223

@@ -294,13 +309,16 @@ For further information, refer to the VSCode docs on `Workspaces <https://code.v
294309
Test Explorer Setup
295310
"""""""""""""""""""
296311

297-
After you set up a workspace, you might want to configure the test explorer for easily running the CLIMADA test suite within VSCode:
312+
After you set up a workspace, you might want to configure the test explorer for easily running the CLIMADA test suite within VSCode.
313+
314+
.. note:: Please install the additional :ref:`test dependencies <install-dev>` before proceeding.
298315

299316
#. In the left sidebar, select the "Testing" symbol, and click on *Configure Python Tests*.
300317

301-
#. Select "unittest" as test framework and then select the ``test*`` pattern for test discovery.
318+
#. Select "pytest" as test framework and then select ``climada`` as the directory containing the test files.
302319

303-
#. The "Test Explorer" will display the tree structure of modules, files, test classes and individuals tests.
320+
#. Select "Testing" in the Activity Bar on the left or through *View* > *Testing*.
321+
The "Test Explorer" in the left sidebar will display the tree structure of modules, files, test classes and individual tests.
304322
You can run individual tests or test subtrees by clicking the Play buttons next to them.
305323

306324
#. By default, the test explorer will show test output for failed tests when you click on them.

0 commit comments

Comments
 (0)