From 3fdf756f715924c6e10adab37c53e4bbd3cda126 Mon Sep 17 00:00:00 2001 From: Lisa Bock Date: Mon, 10 Aug 2026 13:28:47 +0200 Subject: [PATCH 1/4] first changes --- _episodes/07-development-setup.md | 70 ++++++++++--------------------- 1 file changed, 22 insertions(+), 48 deletions(-) diff --git a/_episodes/07-development-setup.md b/_episodes/07-development-setup.md index 3400d875..98215413 100644 --- a/_episodes/07-development-setup.md +++ b/_episodes/07-development-setup.md @@ -109,63 +109,33 @@ nothing to commit, working tree clean ~~~ {: .output} -### 2 ESMValTool dependencies - -Please don’t forget if an esmvaltool environment is already created -following the lesson -[Installation]({{ page.root }}{% link _episodes/02-installation.md %}), -we should choose another name for the new environment in this lesson. - -ESMValTool uses `mamba` for the recommended installation. -For a minimal mamba installation, see section **Install Mamba** in lesson -[Installation]({{ page.root }}{% link _episodes/02-installation.md %}). - -It is good practice to update the version of mamba on your machine before -setting up ESMValTool. This can be done as follows: - -~~~bash -mamba update --name base mamba conda -~~~ - -To simplify the installation process, an environment file ``environment.yml`` is -provided in the ESMValTool directory. We create an environment by running: - -~~~bash -mamba env create --name esmvaltool --file environment.yml -~~~ - -The environment is called ``esmvaltool`` by default. -If an ``esmvaltool`` environment is already created following the lesson -[Installation]({{ page.root }}{% link _episodes/02-installation.md %}), -we should choose another name for the new environment in this lesson by: +### 2 ESMValTool installation +It is recommended to use [pixi](https://pixi.prefix.dev/) to manage ESMValTool +dependencies. To install pixi you can type ~~~bash -mamba env create --name a_new_name --file environment.yml +curl -fsSL https://pixi.sh/install.sh | sh ~~~ -This will create a new conda environment and install ESMValTool (with all -dependencies that are needed for development purposes) into it with a single command. - -For more information see -[Mamba User Guide](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html). - -Now, we should activate the environment: +but there are also other ways to install pixi which you find on the +[pixi installation instructions](https://pixi.prefix.dev/latest/installation/) +website. +After installing pixi you can run the following command to install all of the +required dependencies for running and developing Python diagnostics: ~~~bash -conda activate esmvaltool +pixi shell --frozen ~~~ -where ``esmvaltool`` is the name of the environment (replace by ``a_new_name`` -in case another environment name was used). - -### 3 ESMValTool installation - -ESMValTool can be installed in a ``develop`` mode by running: +Using the '--frozen' flag instructs pixi to use the versions of the packages +listed in the ``pixi.lock`` file. Using this option makes all pixi +commands run faster and makes your analyses more reproducible. +As we want to add code later, we already install ``pre-commit``, this will make +sure that our changes will be formatted correctly when we commit them. ~~~bash -pip install --no-deps --editable '.[develop]' +pre-commit install ~~~ -This will add the ``esmvaltool`` directory to the Python path in editable mode and -install the development dependencies. We should check if the installation +We should check if the installation works properly. To do this, run the tool with: ~~~bash @@ -174,8 +144,12 @@ esmvaltool --help If the installation is successful, ESMValTool prints a help message to the console. +Further information and instructions using pixi could be find the [ESMValTool +documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#install-from-source). +And if you need to exit the pixi environment, run ``exit`` or ``Ctrl+D``. + -### 4 Updating ESMValTool +### 3 Updating ESMValTool The ``main`` branch has the latest features of ESMValTool. Please make sure that the source code on your machine is up-to-date. If you obtain the source From bad9e0a8d379d818592c912b0a188000c82edd21 Mon Sep 17 00:00:00 2001 From: Lisa Bock Date: Mon, 10 Aug 2026 13:48:39 +0200 Subject: [PATCH 2/4] small fixes --- _episodes/07-development-setup.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/_episodes/07-development-setup.md b/_episodes/07-development-setup.md index 98215413..a68935ea 100644 --- a/_episodes/07-development-setup.md +++ b/_episodes/07-development-setup.md @@ -2,7 +2,7 @@ title: "Development and contribution" teaching: 10 exercises: 20 -compatibility: ESMValTool v2.14.0 +compatibility: ESMValTool v2.15.0 questions: - "What is a development installation?" @@ -112,15 +112,14 @@ nothing to commit, working tree clean ### 2 ESMValTool installation It is recommended to use [pixi](https://pixi.prefix.dev/) to manage ESMValTool -dependencies. To install pixi you can type +dependencies. There are different ways to install pixi which you find on the +[pixi installation instructions](https://pixi.prefix.dev/latest/installation/) +website. You can type for example: ~~~bash curl -fsSL https://pixi.sh/install.sh | sh ~~~ -but there are also other ways to install pixi which you find on the -[pixi installation instructions](https://pixi.prefix.dev/latest/installation/) -website. -After installing pixi you can run the following command to install all of the +After installing pixi you run the following command to install all of the required dependencies for running and developing Python diagnostics: ~~~bash pixi shell --frozen @@ -223,9 +222,8 @@ no syntax errors in our recipes and config files - [lintr](https://github.com/jimhester/lintr) for diagnostic scripts written in R - [codespell](https://pypi.org/project/codespell/) to check grammar -The good news is that ``pre-commit`` has been already installed -when we chose development installation. -``pre-commit`` is a command line and runs all of those tools. It also fixes some of those errors. +The good news is that ``pre-commit`` we installed already is a command line and runs all +of those tools. It also fixes some of those errors. To explore other tools, have a look at ESMValTool documentation on [Code quality](https://docs.esmvaltool.org/en/latest/community/ code_documentation.html#code-quality). From a640bea20c7258296eca41632a8a6c7804ffb728 Mon Sep 17 00:00:00 2001 From: Lisa Bock Date: Tue, 11 Aug 2026 13:26:40 +0200 Subject: [PATCH 3/4] Birgit's review --- _episodes/07-development-setup.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/_episodes/07-development-setup.md b/_episodes/07-development-setup.md index a68935ea..f8928a43 100644 --- a/_episodes/07-development-setup.md +++ b/_episodes/07-development-setup.md @@ -112,9 +112,9 @@ nothing to commit, working tree clean ### 2 ESMValTool installation It is recommended to use [pixi](https://pixi.prefix.dev/) to manage ESMValTool -dependencies. There are different ways to install pixi which you find on the +dependencies. There are different ways to install pixi which you can find on the [pixi installation instructions](https://pixi.prefix.dev/latest/installation/) -website. You can type for example: +website. One way to install pixi is for example: ~~~bash curl -fsSL https://pixi.sh/install.sh | sh ~~~ @@ -128,14 +128,14 @@ Using the '--frozen' flag instructs pixi to use the versions of the packages listed in the ``pixi.lock`` file. Using this option makes all pixi commands run faster and makes your analyses more reproducible. -As we want to add code later, we already install ``pre-commit``, this will make -sure that our changes will be formatted correctly when we commit them. +As we want to add new code later in teh epsiode, we already install ``pre-commit``, +this will make sure that our changes will be formatted correctly when we commit +them. ~~~bash pre-commit install ~~~ -We should check if the installation -works properly. To do this, run the tool with: +To check if the installation of pixi works properly, we run ESMValTool with: ~~~bash esmvaltool --help @@ -143,7 +143,7 @@ esmvaltool --help If the installation is successful, ESMValTool prints a help message to the console. -Further information and instructions using pixi could be find the [ESMValTool +Further information and instructions using pixi can be found in the [ESMValTool documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#install-from-source). And if you need to exit the pixi environment, run ``exit`` or ``Ctrl+D``. @@ -222,8 +222,8 @@ no syntax errors in our recipes and config files - [lintr](https://github.com/jimhester/lintr) for diagnostic scripts written in R - [codespell](https://pypi.org/project/codespell/) to check grammar -The good news is that ``pre-commit`` we installed already is a command line and runs all -of those tools. It also fixes some of those errors. +The good news is that ``pre-commit`` which we already installed earlier is a command line +and runs all of those tools. It also fixes some of those errors. To explore other tools, have a look at ESMValTool documentation on [Code quality](https://docs.esmvaltool.org/en/latest/community/ code_documentation.html#code-quality). From e428881c47695dc52a3df7e1069f1edde4c299d0 Mon Sep 17 00:00:00 2001 From: Lisa Bock Date: Tue, 11 Aug 2026 14:36:20 +0200 Subject: [PATCH 4/4] small fixes --- _episodes/07-development-setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_episodes/07-development-setup.md b/_episodes/07-development-setup.md index f8928a43..935adb74 100644 --- a/_episodes/07-development-setup.md +++ b/_episodes/07-development-setup.md @@ -128,8 +128,8 @@ Using the '--frozen' flag instructs pixi to use the versions of the packages listed in the ``pixi.lock`` file. Using this option makes all pixi commands run faster and makes your analyses more reproducible. -As we want to add new code later in teh epsiode, we already install ``pre-commit``, -this will make sure that our changes will be formatted correctly when we commit +As we want to add new code later in the epsiode, we want to install ``pre-commit``. +This will make sure that our changes will be formatted correctly when we commit them. ~~~bash pre-commit install