From ebf77a4432d8577971fb61017fe64ad0a05ba012 Mon Sep 17 00:00:00 2001 From: edoardob90 Date: Wed, 19 Apr 2023 10:07:51 +0200 Subject: [PATCH 1/4] Extend how-to run tutorial locally --- README.md | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bb45dcb9..e88b93db 100644 --- a/README.md +++ b/README.md @@ -5,23 +5,51 @@ ## Run the tutorial on your computer -To run the tutorial locally, setup the environment with [conda](https://docs.conda.io/en/latest/miniconda.html) (or [mamba](https://mamba.readthedocs.io/en/latest/installation.html)): +### 0. Prerequisites + +To run the tutorial locally, you should first install [conda](https://docs.conda.io/en/latest/miniconda.html) (or [mamba](https://mamba.readthedocs.io/en/latest/installation.html)). + +It is also suggested that you have a recent version of `git`. Check out [how to install `git`](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) on your operating system. + +### 1. Download the material + +Go to the directory on your machine where you want to download the material and clone the repository: ```console -conda env create -f environment.yml +git clone https://github.com/empa-scientific-it/python-tutorial ``` +Alternatively, you can manually download a ZIP archive with the latest version of the material: + +[Download ZIP archive](https://github.com/empa-scientific-it/python-tutorial/archive/refs/heads/main.zip) + +Extract the archive in a directory of your choice. + +### 2. Create a dedicated environment + +You should now create a new environment with `conda`: + +```console +conda env create -f binder/environment.yml +``` + +> **Warning** +> If you are on Windows and using Command Prompt or the PowerShell, please make sure to adjust path in the command above accordingly. + Then activate the environment with ```console conda activate python-tutorial ``` -Finally, launch JupyterLab with +You can update the existing environment (that is, downloading the latest version of the packages) with + ```console -jupyter lab +conda env update -f environment.yml ``` -To update the existing environment, run +### 3. Launch the tutorial via Jupyter + +Finally, launch JupyterLab with ```console -conda env update -f environment.yml +jupyter lab ``` From 0aeb623b920e52edc3541462087d6f70660ba542 Mon Sep 17 00:00:00 2001 From: Edoardo Baldi Date: Wed, 19 Apr 2023 10:42:02 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e88b93db..779dbb4b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,8 @@ conda env create -f binder/environment.yml ``` > **Warning** -> If you are on Windows and using Command Prompt or the PowerShell, please make sure to adjust path in the command above accordingly. +> +> If you are on Windows and using Command Prompt or the PowerShell, please make sure to adjust the path in the command above accordingly. Then activate the environment with ```console From 85583cccaed27e404b6a90a6167f1bd1f931ec1f Mon Sep 17 00:00:00 2001 From: Edoardo Baldi Date: Tue, 25 Apr 2023 11:25:35 +0000 Subject: [PATCH 3/4] Update README.md Co-authored-by: Aliaksandr Yakutovich --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 779dbb4b..4586558e 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ conda activate python-tutorial You can update the existing environment (that is, downloading the latest version of the packages) with ```console -conda env update -f environment.yml +conda env update -f binder/environment.yml ``` ### 3. Launch the tutorial via Jupyter From c58e3bfc76aff1d43e1d184a6bee10cbd5774cb6 Mon Sep 17 00:00:00 2001 From: edoardob90 Date: Tue, 25 Apr 2023 13:28:14 +0200 Subject: [PATCH 4/4] Update README (2) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4586558e..34381e81 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,13 @@ Extract the archive in a directory of your choice. ### 2. Create a dedicated environment +Enter the tutorial folder with + +```console +cd /path/to/python-tutorial + +``` + You should now create a new environment with `conda`: ```console @@ -35,7 +42,7 @@ conda env create -f binder/environment.yml > **Warning** > -> If you are on Windows and using Command Prompt or the PowerShell, please make sure to adjust the path in the command above accordingly. +> If you are on Windows and using Command Prompt or the PowerShell, please make sure to adjust the paths in the commands above accordingly. Then activate the environment with ```console