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
* Add pytest and required plugins to dev requirements
* Add settings to .coveragerc
* Update Makefile to use pytest where possible
* Update Jenkins scripts to use Makefile
* Update Jenkinsfile to install new requirements
NOTE: Revert this change once the Jenkins environment is updated
* Remove test run scripts for unit, intregration, and install tests
* Update installation instructions and reference them in CI guide
* Update CHANGELOG.md
* Update doc/guide/install.rst
---------
Co-authored-by: emanuel-schmid <[email protected]>
Co-authored-by: Emanuel Schmid <[email protected]>
-`Exposures.affected_total_value` now takes a hazard intensity threshold as argument. Affected values are only those for which at least one event exceeds the threshold. (previously, all exposures points with an assigned centroid were considered affected). By default the centroids are reassigned. [#702](https://github.com/CLIMADA-project/climada_python/pull/702)[#730](https://github.com/CLIMADA-project/climada_python/pull/730)
43
46
- Add option to pass region ID to `LitPop.from_shape`[#720](https://github.com/CLIMADA-project/climada_python/pull/720)
44
47
- Slightly improved performance on `LitPop`-internal computations [#720](https://github.com/CLIMADA-project/climada_python/pull/720)
48
+
- Use `pytest` for executing tests [#726](https://github.com/CLIMADA-project/climada_python/pull/726)
45
49
- Users can opt-out of the climada specific logging definitions and freely configure logging to their will, by setting the config value `logging.managed` to `false`. [#724](https://github.com/CLIMADA-project/climada_python/pull/724)
46
50
- Add option to read additional variables from IBTrACS when using `TCTracks.from_ibtracs_netcdf`[#728](https://github.com/CLIMADA-project/climada_python/pull/728)
Copy file name to clipboardExpand all lines: doc/guide/Guide_Continuous_Integration_and_Testing.ipynb
+37-7Lines changed: 37 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
1
{
2
2
"cells": [
3
3
{
4
+
"attachments": {},
4
5
"cell_type": "markdown",
5
6
"metadata": {},
6
7
"source": [
7
8
"# Testing and Continuous Integration"
8
9
]
9
10
},
10
11
{
12
+
"attachments": {},
11
13
"cell_type": "markdown",
12
14
"metadata": {},
13
15
"source": [
@@ -20,31 +22,43 @@
20
22
]
21
23
},
22
24
{
25
+
"attachments": {},
23
26
"cell_type": "markdown",
24
27
"metadata": {},
25
28
"source": [
26
29
"## Testing CLIMADA\n",
27
30
"\n",
31
+
"Executing the entire test suite requires you to install the additional requirements for testing.\n",
32
+
"See the [installation instructions](install.rst) for [developer dependencies](install-dev) for further information.\n",
33
+
"\n",
34
+
"\n",
28
35
"### Installation Test\n",
29
36
"\n",
30
-
"From the installation directory run\\\n",
31
-
"`make install_test`\\\n",
37
+
"From the installation directory run\n",
38
+
"```\n",
39
+
"make install_test\n",
40
+
"```\n",
32
41
"It lasts about 45 seconds. If it succeeds, CLIMADA is properly installed and ready to use.\n",
33
42
"\n",
34
43
"### Unit Tests\n",
35
44
"\n",
36
-
"From the installation directory run\\\n",
37
-
"`make unit_test`\\\n",
45
+
"From the installation directory run\n",
46
+
"```\n",
47
+
"make unit_test\n",
48
+
"```\n",
38
49
"It lasts about 5 minutes and runs unit tests for all modules.\n",
39
50
"\n",
40
51
"### Integration Tests\n",
41
52
"\n",
42
-
"From the installation directory run\\\n",
43
-
"`make integ_test`\\\n",
44
-
"It lasts about 45 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."
53
+
"From the installation directory run\n",
54
+
"```\n",
55
+
"make integ_test\n",
56
+
"```\n",
57
+
"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."
Copy file name to clipboardExpand all lines: doc/guide/install.rst
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,6 +148,8 @@ For advanced Python users or developers of CLIMADA, we recommed cloning the CLIM
148
148
If this test passes, great!
149
149
You are good to go.
150
150
151
+
.. _install-dev:
152
+
151
153
Install Developer Dependencies (Optional)
152
154
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153
155
@@ -177,6 +179,15 @@ The CLIMADA Python package defines the following `extras <https://peps.python.or
177
179
* - ``dev``
178
180
- combination of ``doc`` and ``test``
179
181
182
+
For executing the pre-defined test scripts in exactly the same way as they are executed by the automated CI pipeline, you will need ``make`` to be installed.
183
+
On macOS and on Linux it is pre-installed. On Windows, it can easily be installed with conda:
184
+
185
+
.. code-block:: shell
186
+
187
+
conda install -n climada_env make
188
+
189
+
Instructions for running the test scripts can be found in the :doc:`Testing and CI Guide <Guide_Continuous_Integration_and_Testing>`.
0 commit comments