Skip to content

Commit 95052b2

Browse files
Upgrade to Python 3.12 (#870)
* Upgrade to Python 3.12 * Increment supported Python versions in setup.py. * Update GitHub workflow testing matrix. * Upgrade eccodes and cfgrib versions * Add prominent information on Python versions --------- Co-authored-by: emanuel-schmid <[email protected]>
1 parent a8a3c78 commit 95052b2

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
# Do not abort other tests if only a single one fails
2323
fail-fast: false
2424
matrix:
25-
python-version: ["3.10", "3.11"]
25+
python-version: ["3.10", "3.11", "3.12"]
2626

2727
steps:
2828
-

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ CLIMADA is divided into two parts (two repositories):
1616
1. the core [climada_python](https://github.com/CLIMADA-project/climada_python) contains all the modules necessary for the probabilistic impact, the averted damage, uncertainty and forecast calculations. Data for hazard, exposures and impact functions can be obtained from the [data API](https://github.com/CLIMADA-project/climada_python/blob/main/doc/tutorial/climada_util_api_client.ipynb). [Litpop](https://github.com/CLIMADA-project/climada_python/blob/main/doc/tutorial/climada_entity_LitPop.ipynb) is included as demo Exposures module, and [Tropical cyclones](https://github.com/CLIMADA-project/climada_python/blob/main/doc/tutorial/climada_hazard_TropCyclone.ipynb) is included as a demo Hazard module.
1717
2. the petals [climada_petals](https://github.com/CLIMADA-project/climada_petals) contains all the modules for generating data (e.g., TC_Surge, WildFire, OpenStreeMap, ...). Most development is done here. The petals builds-upon the core and does not work as a stand-alone.
1818

19-
It is recommend for new users to begin with the core (1) and the [tutorials](https://github.com/CLIMADA-project/climada_python/tree/main/doc/tutorial) therein.
19+
For new users, we recommend to begin with the core (1) and the [tutorials](https://github.com/CLIMADA-project/climada_python/tree/main/doc/tutorial) therein.
2020

21-
This is the Python (3.10+) version of CLIMADA - please see [here](https://github.com/davidnbresch/climada) for backward compatibility with the MATLAB version.
21+
This is the Python version of CLIMADA - please see [here](https://github.com/davidnbresch/climada) for backward compatibility with the MATLAB version.
2222

2323
## Getting started
2424

doc/guide/install.rst

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,29 @@ Prerequisites
2929
Download the installer suitable for your system and follow the respective installation instructions.
3030
We do **not** recommend using the ``conda`` command anymore, rather use ``mamba`` (see :ref:`conda-instead-of-mamba`).
3131

32-
.. note:: When mentioning the terms "terminal" or "command line" in the following, we are referring to the "Terminal" apps on macOS or Linux and the "Miniforge Prompt" on Windows.
32+
.. _python-versions:
33+
34+
.. admonition:: Python Versions
35+
36+
CLIMADA is primarily tested against a **supported** Python version, but is allowed to run with others.
37+
If you follow the installation instructions exactly, you will create an environment with the supported version.
38+
Depending on your setup, you are free to choose another allowed version, but we recommend the supported one.
39+
40+
.. list-table::
41+
:width: 60%
42+
43+
* - **Supported Version**
44+
- ``3.11``
45+
* - Allowed Versions
46+
- ``3.10``, ``3.11``, ``3.12``
3347

3448
.. _install-choice:
3549

3650
Decide on Your Entry Level!
3751
^^^^^^^^^^^^^^^^^^^^^^^^^^^
3852

53+
.. hint:: When mentioning the terms "terminal" or "command line" in the following, we are referring to the "Terminal" apps on macOS or Linux and the "Miniforge Prompt" on Windows.
54+
3955
Depening on your level of expertise, we provide two different approaches:
4056

4157
* 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>`.
@@ -168,18 +184,7 @@ For advanced Python users or developers of CLIMADA, we recommed cloning the CLIM
168184
Use the wildcard ``.*`` at the end to allow a downgrade of the bugfix version of Python.
169185
This increases compatibility when installing the requirements in the next step.
170186

171-
.. note::
172-
173-
CLIMADA can be installed for different Python versions.
174-
If you want to use a different version, replace the version specification in the command above with another allowed version.
175-
176-
.. list-table::
177-
:width: 60%
178-
179-
* - **Supported Version**
180-
- ``3.11``
181-
* - Allowed Versions
182-
- ``3.10``, ``3.11``
187+
.. note:: You may choose any of the :ref:`allowed Python versions <python-versions>` from the list above.
183188

184189
#. Use the default environment specs in ``env_climada.yml`` to install all dependencies.
185190
Then activate the environment:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"Topic :: Scientific/Engineering :: Mathematics",
6060
],
6161
keywords="climate adaptation",
62-
python_requires=">=3.10,<3.12",
62+
python_requires=">=3.10,<3.13",
6363
install_requires=[
6464
"bayesian-optimization<2.0",
6565
"bottleneck",

0 commit comments

Comments
 (0)