From 74009bc06970251643a8fbef6930d3648dc01a18 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Fri, 16 May 2025 07:59:38 +0000
Subject: [PATCH 01/21] Add new file

---
 Python/QA-015-Using Pipelines for building | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Python/QA-015-Using Pipelines for building

diff --git a/Python/QA-015-Using Pipelines for building b/Python/QA-015-Using Pipelines for building
new file mode 100644
index 0000000..3d471f7
--- /dev/null
+++ b/Python/QA-015-Using Pipelines for building	
@@ -0,0 +1,53 @@
+# Using a Gitlab pipeline for building and publishing a python package
+
+## Steps
+
+## 1. Prepare Your Python Package
+
+Ensure your Python package is properly structured and includes the following:
+
+A pyproject.toml file for package configuration.
+A README.md file for documentation.
+
+## 2. Create a .gitlab-ci.yml File
+
+This file defines the pipeline stages and jobs. Below is an example .gitlab-ci.yml for building and publishing a Python package:
+
+<code>default:
+  image: python:3.13
+  cache:
+    paths:
+      - .pip-cache/
+  before_script:
+    - python --version
+    - pip install --upgrade pip
+    - pip install build twine
+
+stages:
+  - build
+  - publish
+
+variables:
+  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
+
+build:
+  stage: build
+  script:
+    - python -m build
+  artifacts:
+    paths:
+      - dist/
+
+
+publish:
+  stage: publish
+  script:
+    - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
+  rules:
+    - if: $CI_COMMIT_TAG
+</code>
+
+## 3.Push Your Code and Tags
+
+Push your code to the GitLab repository.
+To trigger the publish stage, create and push a tag
\ No newline at end of file
-- 
GitLab


From a0c9536ad4334f4752263e13cae1c3777e9fa02a Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Fri, 16 May 2025 08:03:15 +0000
Subject: [PATCH 02/21] Edit QA-015-Using Pipelines for building

---
 ...s for building => QA-015-Using Pipelines for building.md} | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
 rename Python/{QA-015-Using Pipelines for building => QA-015-Using Pipelines for building.md} (94%)

diff --git a/Python/QA-015-Using Pipelines for building b/Python/QA-015-Using Pipelines for building.md
similarity index 94%
rename from Python/QA-015-Using Pipelines for building
rename to Python/QA-015-Using Pipelines for building.md
index 3d471f7..e8003ea 100644
--- a/Python/QA-015-Using Pipelines for building	
+++ b/Python/QA-015-Using Pipelines for building.md	
@@ -12,7 +12,7 @@ A README.md file for documentation.
 ## 2. Create a .gitlab-ci.yml File
 
 This file defines the pipeline stages and jobs. Below is an example .gitlab-ci.yml for building and publishing a Python package:
-
+```sh
 <code>default:
   image: python:3.13
   cache:
@@ -45,7 +45,8 @@ publish:
     - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
   rules:
     - if: $CI_COMMIT_TAG
-</code>
+```
+
 
 ## 3.Push Your Code and Tags
 
-- 
GitLab


From a6b788fb46061522c8edd3e332a38b3f0bb44209 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Fri, 16 May 2025 08:03:44 +0000
Subject: [PATCH 03/21] Edit QA-015-Using Pipelines for building.md

---
 Python/QA-015-Using Pipelines for building.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Python/QA-015-Using Pipelines for building.md b/Python/QA-015-Using Pipelines for building.md
index e8003ea..01c40d7 100644
--- a/Python/QA-015-Using Pipelines for building.md	
+++ b/Python/QA-015-Using Pipelines for building.md	
@@ -7,6 +7,7 @@
 Ensure your Python package is properly structured and includes the following:
 
 A pyproject.toml file for package configuration.
+
 A README.md file for documentation.
 
 ## 2. Create a .gitlab-ci.yml File
-- 
GitLab


From 1ce6892c1650e35dd2009c189e65fded694ed6d6 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Fri, 16 May 2025 08:07:45 +0000
Subject: [PATCH 04/21] Edit README.md added Question on Pipelines

---
 Python/README.md | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Python/README.md b/Python/README.md
index d4e5c01..61e8c49 100644
--- a/Python/README.md
+++ b/Python/README.md
@@ -183,4 +183,9 @@ $ python -c 'import sys;print("\n".join(sys.path))'
 /jetfs/manual/enstools/v2021.11/lib/python3.8/site-packages
 # unset the variable again
 unset PYTHONNOUSERSITE
-```
\ No newline at end of file
+```
+
+## Q: How to use pipelines for building and publishing packages?
+[Magics](QA-015-Using Pipelines for building.md)
+
+Use a .gitlab-ci.yml file to automate building and publishing of your package.
\ No newline at end of file
-- 
GitLab


From d2134aac7be0a6c6253ab817385cfb2dd372e994 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Fri, 16 May 2025 08:08:55 +0000
Subject: [PATCH 05/21] Edit README.md

---
 Python/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Python/README.md b/Python/README.md
index 61e8c49..9c64e49 100644
--- a/Python/README.md
+++ b/Python/README.md
@@ -186,6 +186,6 @@ unset PYTHONNOUSERSITE
 ```
 
 ## Q: How to use pipelines for building and publishing packages?
-[Magics](QA-015-Using Pipelines for building.md)
+[Pipelines for building](QA-015-Using Pipelines for building.md)
 
 Use a .gitlab-ci.yml file to automate building and publishing of your package.
\ No newline at end of file
-- 
GitLab


From edf8a1633d01e93d458f9f0dd3bbc4fac9779180 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:03:35 +0000
Subject: [PATCH 06/21] Created Page on how to migrate from Anaconda

---
 .../QA-015-Migrate-away-from-Anaconda.ipynb   | 138 ++++++++++++++++++
 1 file changed, 138 insertions(+)
 create mode 100644 Python/QA-015-Migrate-away-from-Anaconda.ipynb

diff --git a/Python/QA-015-Migrate-away-from-Anaconda.ipynb b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
new file mode 100644
index 0000000..e3cd9bd
--- /dev/null
+++ b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
@@ -0,0 +1,138 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Migrating from Anaconda to Micromamba\n",
+    "\n",
+    "To migrate from Anacondo to Micromamba follow the steps below.\n",
+    "\n",
+    "1. First export the installed Packages into a yml"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "vscode": {
+     "languageId": "plaintext"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "conda env export -n <env-name> > <env-name>.yaml"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "2. Create the new environment from the yml file"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "vscode": {
+     "languageId": "plaintext"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "micromamba create -n <env-name> --file <env-name>.yaml"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Migrating from Anaconda to Venv\n",
+    "\n",
+    "1. Export the packages into a requirements.txt:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "vscode": {
+     "languageId": "plaintext"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "conda list --export > requirements.txt"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "\n",
+    "2. Run the following command to create a new virtual environment:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "vscode": {
+     "languageId": "plaintext"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "python -m venv <env-name>"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "3. Activate the virtual environment"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "vscode": {
+     "languageId": "plaintext"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "<env-name>\\Scripts\\activate"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "4. Now that your virtual environment is active, you can install the packages from your Conda environment."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "vscode": {
+     "languageId": "plaintext"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "pip install -r requirements.txt"
+   ]
+  }
+ ],
+ "metadata": {
+  "language_info": {
+   "name": "python"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
-- 
GitLab


From e75d5c66f35af50db7b31220ee10b57ad2870be2 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:04:05 +0000
Subject: [PATCH 07/21] Update file QA-015-Migrate-away-from-Anaconda.ipynb

---
 Python/QA-015-Migrate-away-from-Anaconda.ipynb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Python/QA-015-Migrate-away-from-Anaconda.ipynb b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
index e3cd9bd..a79f69e 100644
--- a/Python/QA-015-Migrate-away-from-Anaconda.ipynb
+++ b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
@@ -8,7 +8,7 @@
     "\n",
     "To migrate from Anacondo to Micromamba follow the steps below.\n",
     "\n",
-    "1. First export the installed Packages into a yml"
+    "1. Export the installed Packages into a yml"
    ]
   },
   {
-- 
GitLab


From 18a317b6b1a84ac3f1bc3fcf44bb40ac3d053c5f Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:04:20 +0000
Subject: [PATCH 08/21] Update file QA-015-Migrate-away-from-Anaconda.ipynb

---
 Python/QA-015-Migrate-away-from-Anaconda.ipynb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Python/QA-015-Migrate-away-from-Anaconda.ipynb b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
index a79f69e..58cab24 100644
--- a/Python/QA-015-Migrate-away-from-Anaconda.ipynb
+++ b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
@@ -21,7 +21,7 @@
    },
    "outputs": [],
    "source": [
-    "conda env export -n <env-name> > <env-name>.yaml"
+    "conda env export -n <env-name> > <env-name>.yml"
    ]
   },
   {
@@ -41,7 +41,7 @@
    },
    "outputs": [],
    "source": [
-    "micromamba create -n <env-name> --file <env-name>.yaml"
+    "micromamba create -n <env-name> --file <env-name>.yml"
    ]
   },
   {
-- 
GitLab


From 38803e4d1902fec37a8fc528efa7589f279d56b9 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:13:04 +0000
Subject: [PATCH 09/21] Update file QA-015-Migrate-away-from-Anaconda.ipynb

---
 Python/QA-015-Migrate-away-from-Anaconda.ipynb | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Python/QA-015-Migrate-away-from-Anaconda.ipynb b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
index 58cab24..d5a913f 100644
--- a/Python/QA-015-Migrate-away-from-Anaconda.ipynb
+++ b/Python/QA-015-Migrate-away-from-Anaconda.ipynb
@@ -28,7 +28,14 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "2. Create the new environment from the yml file"
+    "2. Make sure to not use the defaults channel but conda-forge instead"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "3. Create the new environment from the yml file"
    ]
   },
   {
@@ -44,6 +51,11 @@
     "micromamba create -n <env-name> --file <env-name>.yml"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": []
+  },
   {
    "cell_type": "markdown",
    "metadata": {},
-- 
GitLab


From 130ede429a9de5c6342e6544fb7c0c0e68d24491 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:13:43 +0000
Subject: [PATCH 10/21] Update 2 files

- /Python/QA-015-Migrate-away-from-Anaconda.ipynb
- /Python/QA-015-Migrate-from-Anaconda.ipynb
---
 ...way-from-Anaconda.ipynb => QA-015-Migrate-from-Anaconda.ipynb} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename Python/{QA-015-Migrate-away-from-Anaconda.ipynb => QA-015-Migrate-from-Anaconda.ipynb} (100%)

diff --git a/Python/QA-015-Migrate-away-from-Anaconda.ipynb b/Python/QA-015-Migrate-from-Anaconda.ipynb
similarity index 100%
rename from Python/QA-015-Migrate-away-from-Anaconda.ipynb
rename to Python/QA-015-Migrate-from-Anaconda.ipynb
-- 
GitLab


From a59535cb15e8ec2baab0d859c69479b0db3c798c Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:13:56 +0000
Subject: [PATCH 11/21] Update file QA-015-Migrate-from-Anaconda.ipynb

---
 Python/QA-015-Migrate-from-Anaconda.ipynb | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Python/QA-015-Migrate-from-Anaconda.ipynb b/Python/QA-015-Migrate-from-Anaconda.ipynb
index d5a913f..0538833 100644
--- a/Python/QA-015-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-015-Migrate-from-Anaconda.ipynb
@@ -51,11 +51,6 @@
     "micromamba create -n <env-name> --file <env-name>.yml"
    ]
   },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": []
-  },
   {
    "cell_type": "markdown",
    "metadata": {},
-- 
GitLab


From f4f3fa2fcee1d993fd9472c371da4eb62cc7509e Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:20:54 +0000
Subject: [PATCH 12/21] Update file QA-015-Migrate-from-Anaconda.ipynb

---
 Python/QA-015-Migrate-from-Anaconda.ipynb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Python/QA-015-Migrate-from-Anaconda.ipynb b/Python/QA-015-Migrate-from-Anaconda.ipynb
index 0538833..2e3b2b1 100644
--- a/Python/QA-015-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-015-Migrate-from-Anaconda.ipynb
@@ -28,7 +28,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "2. Make sure to not use the defaults channel but conda-forge instead"
+    "2. Make sure your yml doesn't use the defaults channel but conda-forge instead"
    ]
   },
   {
-- 
GitLab


From 0dd88f21949c89c1a546a4399a9e4f566de9d1cd Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:23:25 +0000
Subject: [PATCH 13/21] Update 3 files

- /Python/QA-015-Migrate-from-Anaconda.ipynb
- /Python/QA-016-Migrate-from-Anaconda.ipynb
- /Python/README.md
---
 ...e-from-Anaconda.ipynb => QA-016-Migrate-from-Anaconda.ipynb} | 0
 Python/README.md                                                | 2 ++
 2 files changed, 2 insertions(+)
 rename Python/{QA-015-Migrate-from-Anaconda.ipynb => QA-016-Migrate-from-Anaconda.ipynb} (100%)

diff --git a/Python/QA-015-Migrate-from-Anaconda.ipynb b/Python/QA-016-Migrate-from-Anaconda.ipynb
similarity index 100%
rename from Python/QA-015-Migrate-from-Anaconda.ipynb
rename to Python/QA-016-Migrate-from-Anaconda.ipynb
diff --git a/Python/README.md b/Python/README.md
index bab09fc..3017e1c 100644
--- a/Python/README.md
+++ b/Python/README.md
@@ -144,6 +144,8 @@ It is very easy to download and plot ERA5 data, using cdsapi and Magics.
 
 When using python it is possible to have multiple site, where packages can be installed. the default is to use the path from the python interpreter and a user site.
 
+## Q: How do I migrate from Anaconda to Venv or Micromamba
+[Magics](QA-016-Migrate-from-Anaconda)
 ```sh
 $ python -c 'import sys;print("\n".join(sys.path))'
 
-- 
GitLab


From 2f12325623ba64709978489af88d7874d71a324d Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:27:30 +0000
Subject: [PATCH 14/21] Update file README.md

---
 Python/README.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Python/README.md b/Python/README.md
index 22e78e2..96db8f0 100644
--- a/Python/README.md
+++ b/Python/README.md
@@ -144,8 +144,6 @@ It is very easy to download and plot ERA5 data, using cdsapi and Magics.
 
 When using python it is possible to have multiple site, where packages can be installed. the default is to use the path from the python interpreter and a user site.
 
-## Q: How do I migrate from Anaconda to Venv or Micromamba
-[Magics](QA-016-Migrate-from-Anaconda)
 ```sh
 $ python -c 'import sys;print("\n".join(sys.path))'
 
@@ -175,4 +173,7 @@ unset PYTHONNOUSERSITE
 ## Q: How to use pipelines for building and publishing packages?
 [Pipelines for building](QA-015-Using Pipelines for building.md)
 
-Use a .gitlab-ci.yml file to automate building and publishing of your package.
\ No newline at end of file
+Use a .gitlab-ci.yml file to automate building and publishing of your package.
+
+## Q: How do I migrate from Anaconda to Venv or Micromamba
+[Migrate away from Anaconda](QA-016-Migrate-from-Anaconda)
\ No newline at end of file
-- 
GitLab


From 377c14a98237e9107ac9276f20096e5e29cacf17 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:29:11 +0000
Subject: [PATCH 15/21] Update file README.md

---
 Python/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Python/README.md b/Python/README.md
index 96db8f0..ef9918f 100644
--- a/Python/README.md
+++ b/Python/README.md
@@ -176,4 +176,4 @@ unset PYTHONNOUSERSITE
 Use a .gitlab-ci.yml file to automate building and publishing of your package.
 
 ## Q: How do I migrate from Anaconda to Venv or Micromamba
-[Migrate away from Anaconda](QA-016-Migrate-from-Anaconda)
\ No newline at end of file
+[Migrate away from Anaconda](QA-016-Migrate-from-Anaconda.ipynb)
\ No newline at end of file
-- 
GitLab


From 35d07c4c0f78af786df2a95dd40c78e51323987e Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:36:37 +0000
Subject: [PATCH 16/21] Update file QA-016-Migrate-from-Anaconda.ipynb

---
 Python/QA-016-Migrate-from-Anaconda.ipynb | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/Python/QA-016-Migrate-from-Anaconda.ipynb b/Python/QA-016-Migrate-from-Anaconda.ipynb
index 2e3b2b1..37dd297 100644
--- a/Python/QA-016-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-016-Migrate-from-Anaconda.ipynb
@@ -8,7 +8,7 @@
     "\n",
     "To migrate from Anacondo to Micromamba follow the steps below.\n",
     "\n",
-    "1. Export the installed Packages into a yml"
+    "## Export the installed Packages into a yml"
    ]
   },
   {
@@ -28,14 +28,8 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "2. Make sure your yml doesn't use the defaults channel but conda-forge instead"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "3. Create the new environment from the yml file"
+    "## Make sure your yml doesn't use the defaults channel but conda-forge instead\n",
+    "## Create the new environment from the yml file"
    ]
   },
   {
@@ -57,7 +51,7 @@
    "source": [
     "# Migrating from Anaconda to Venv\n",
     "\n",
-    "1. Export the packages into a requirements.txt:"
+    "## Export the packages into a requirements.txt:"
    ]
   },
   {
@@ -78,7 +72,7 @@
    "metadata": {},
    "source": [
     "\n",
-    "2. Run the following command to create a new virtual environment:"
+    "## Run the following command to create a new virtual environment:"
    ]
   },
   {
@@ -98,7 +92,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "3. Activate the virtual environment"
+    "## Activate the virtual environment"
    ]
   },
   {
@@ -118,7 +112,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "4. Now that your virtual environment is active, you can install the packages from your Conda environment."
+    "## Now that your virtual environment is active, you can install the packages from your Conda environment."
    ]
   },
   {
-- 
GitLab


From afcef0f01687adeed4050478d12ec4f1ab4a41e8 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:40:29 +0000
Subject: [PATCH 17/21] Update file QA-016-Migrate-from-Anaconda.ipynb

---
 Python/QA-016-Migrate-from-Anaconda.ipynb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Python/QA-016-Migrate-from-Anaconda.ipynb b/Python/QA-016-Migrate-from-Anaconda.ipynb
index 37dd297..7e6e0c1 100644
--- a/Python/QA-016-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-016-Migrate-from-Anaconda.ipynb
@@ -16,7 +16,7 @@
    "execution_count": null,
    "metadata": {
     "vscode": {
-     "languageId": "plaintext"
+     "languageId": "powershell"
     }
    },
    "outputs": [],
@@ -29,6 +29,7 @@
    "metadata": {},
    "source": [
     "## Make sure your yml doesn't use the defaults channel but conda-forge instead\n",
+    "Open the yml file you just created an remove the channel defaults and add the channel conda-forge if isn't there already. Using both can lead to problems with the environment\n",
     "## Create the new environment from the yml file"
    ]
   },
-- 
GitLab


From ff0885cac21678155019ea75e9e8aebb1410cfdb Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:41:10 +0000
Subject: [PATCH 18/21] Update file QA-016-Migrate-from-Anaconda.ipynb

---
 Python/QA-016-Migrate-from-Anaconda.ipynb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Python/QA-016-Migrate-from-Anaconda.ipynb b/Python/QA-016-Migrate-from-Anaconda.ipynb
index 7e6e0c1..80a505c 100644
--- a/Python/QA-016-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-016-Migrate-from-Anaconda.ipynb
@@ -29,7 +29,7 @@
    "metadata": {},
    "source": [
     "## Make sure your yml doesn't use the defaults channel but conda-forge instead\n",
-    "Open the yml file you just created an remove the channel defaults and add the channel conda-forge if isn't there already. Using both can lead to problems with the environment\n",
+    "Open the yml file you just created an remove the channel defaults and add the channel conda-forge. Using both at the same timecan lead to problems with the environment.\n",
     "## Create the new environment from the yml file"
    ]
   },
-- 
GitLab


From f00967be67fa5d8b8d408111124e8e9463b9ac91 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:41:35 +0000
Subject: [PATCH 19/21] Update file QA-016-Migrate-from-Anaconda.ipynb

---
 Python/QA-016-Migrate-from-Anaconda.ipynb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Python/QA-016-Migrate-from-Anaconda.ipynb b/Python/QA-016-Migrate-from-Anaconda.ipynb
index 80a505c..f388a83 100644
--- a/Python/QA-016-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-016-Migrate-from-Anaconda.ipynb
@@ -29,7 +29,7 @@
    "metadata": {},
    "source": [
     "## Make sure your yml doesn't use the defaults channel but conda-forge instead\n",
-    "Open the yml file you just created an remove the channel defaults and add the channel conda-forge. Using both at the same timecan lead to problems with the environment.\n",
+    "Open the yml file you just created an remove the channel defaults and add the channel conda-forge. Using both at the same time can lead to problems with the environment.\n",
     "## Create the new environment from the yml file"
    ]
   },
-- 
GitLab


From 58edbfcafb5189af99864ee5f22309a0c841daf4 Mon Sep 17 00:00:00 2001
From: Emma Haslwanter <emma.haslwanter@univie.ac.at>
Date: Thu, 26 Jun 2025 08:52:42 +0000
Subject: [PATCH 20/21] Update file QA-016-Migrate-from-Anaconda.ipynb

---
 Python/QA-016-Migrate-from-Anaconda.ipynb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Python/QA-016-Migrate-from-Anaconda.ipynb b/Python/QA-016-Migrate-from-Anaconda.ipynb
index f388a83..591af28 100644
--- a/Python/QA-016-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-016-Migrate-from-Anaconda.ipynb
@@ -4,7 +4,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "# Migrating from Anaconda to Micromamba\n",
+    "# Migrating from Anaconda to Micromamba/Mamba/Miniforge\n",
     "\n",
     "To migrate from Anacondo to Micromamba follow the steps below.\n",
     "\n",
@@ -43,7 +43,9 @@
    },
    "outputs": [],
    "source": [
-    "micromamba create -n <env-name> --file <env-name>.yml"
+    "micromamba create -n <env-name> --file <env-name>.yml\n",
+    "\n",
+    "mamba env create -n my_new_env -f environment.yml"
    ]
   },
   {
-- 
GitLab


From 606acd86f0cbc89a483ed053d40f53d6e04a68ea Mon Sep 17 00:00:00 2001
From: Michael Blaschek <michael.blaschek@univie.ac.at>
Date: Thu, 26 Jun 2025 12:45:47 +0000
Subject: [PATCH 21/21] fixed a few typos and formatting.

---
 Python/QA-015-Using Pipelines for building.md |   2 +-
 Python/QA-016-Migrate-from-Anaconda.ipynb     | 151 ++++++++----------
 2 files changed, 69 insertions(+), 84 deletions(-)

diff --git a/Python/QA-015-Using Pipelines for building.md b/Python/QA-015-Using Pipelines for building.md
index 01c40d7..124ceb1 100644
--- a/Python/QA-015-Using Pipelines for building.md	
+++ b/Python/QA-015-Using Pipelines for building.md	
@@ -14,7 +14,7 @@ A README.md file for documentation.
 
 This file defines the pipeline stages and jobs. Below is an example .gitlab-ci.yml for building and publishing a Python package:
 ```sh
-<code>default:
+default:
   image: python:3.13
   cache:
     paths:
diff --git a/Python/QA-016-Migrate-from-Anaconda.ipynb b/Python/QA-016-Migrate-from-Anaconda.ipynb
index 591af28..beafbbe 100644
--- a/Python/QA-016-Migrate-from-Anaconda.ipynb
+++ b/Python/QA-016-Migrate-from-Anaconda.ipynb
@@ -8,127 +8,112 @@
     "\n",
     "To migrate from Anacondo to Micromamba follow the steps below.\n",
     "\n",
-    "## Export the installed Packages into a yml"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "vscode": {
-     "languageId": "powershell"
-    }
-   },
-   "outputs": [],
-   "source": [
-    "conda env export -n <env-name> > <env-name>.yml"
+    "1. Export the installed Packages into a yml\n",
+    "\n",
+    "```sh\n",
+    "conda env export -n <env-name> > <env-name>.yml\n",
+    "```"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Make sure your yml doesn't use the defaults channel but conda-forge instead\n",
-    "Open the yml file you just created an remove the channel defaults and add the channel conda-forge. Using both at the same time can lead to problems with the environment.\n",
-    "## Create the new environment from the yml file"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "vscode": {
-     "languageId": "plaintext"
-    }
-   },
-   "outputs": [],
-   "source": [
+    "Make sure your yml doesn't use the defaults channel but conda-forge instead\n",
+    "\n",
+    "```yaml\n",
+    "name: test\n",
+    "channels:\n",
+    "- pkgs/main   # replace with conda-forge\n",
+    "dependencies:\n",
+    "- ...\n",
+    "```\n",
+    "\n",
+    "**Open the yml file you just created and remove the channel default.**\n",
+    "Add the channel `conda-forge`. Using both at the same time can lead to problems with the environment.\n",
+    "\n",
+    "2. Create the new environment from the yml file\n",
+    "\n",
+    "```sh\n",
+    "# using micromamba, available on all IMGW servers\n",
     "micromamba create -n <env-name> --file <env-name>.yml\n",
     "\n",
-    "mamba env create -n my_new_env -f environment.yml"
+    "# or using mamba\n",
+    "mamba env create -n my_new_env -f environment.yml\n",
+    "```"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "# Migrating from Anaconda to Venv\n",
+    "**Remember that you should also remove the conda part in your `~.bashrc` file.** e.g.:\n",
     "\n",
-    "## Export the packages into a requirements.txt:"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "vscode": {
-     "languageId": "plaintext"
-    }
-   },
-   "outputs": [],
-   "source": [
-    "conda list --export > requirements.txt"
+    "```sh\n",
+    "# >>> conda initialize >>>\n",
+    "# !! Contents within this block are managed by 'conda init' !!\n",
+    "__conda_setup=\"$('/path/to/conda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)\"\n",
+    "if [ $? -eq 0 ]; then\n",
+    "    eval \"$__conda_setup\"\n",
+    "else\n",
+    "    if [ -f \"/path/to/conda/etc/profile.d/conda.sh\" ]; then\n",
+    "        . \"/path/to/conda/etc/profile.d/conda.sh\"\n",
+    "    else\n",
+    "        export PATH=\"/path/to/conda/bin:$PATH\"\n",
+    "    fi\n",
+    "fi\n",
+    "unset __conda_setup\n",
+    "# <<< conda initialize <<<\n",
+    "```\n",
+    "Remove this! You can add the micromamba shell init if you wish by running: `micromamba shell init`"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
+    "# Migrating from Anaconda to venv\n",
     "\n",
-    "## Run the following command to create a new virtual environment:"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "vscode": {
-     "languageId": "plaintext"
-    }
-   },
-   "outputs": [],
-   "source": [
-    "python -m venv <env-name>"
+    "1. Export the packages into a requirements.txt:\n",
+    "\n",
+    "```sh\n",
+    "# activate conda environment or use -n or -p options.\n",
+    "conda list -n <env_name> -p <env_path> --export > requirements.txt\n",
+    "```"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Activate the virtual environment"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "vscode": {
-     "languageId": "plaintext"
-    }
-   },
-   "outputs": [],
-   "source": [
-    "<env-name>\\Scripts\\activate"
+    "\n",
+    "2. Run the following command to create a new virtual environment:\n",
+    "\n",
+    "```sh\n",
+    "python -m venv <env-name>\n",
+    "```"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Now that your virtual environment is active, you can install the packages from your Conda environment."
+    "Activate the virtual environment\n",
+    "\n",
+    "`<env-name>\\Scripts\\activate`"
    ]
   },
   {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {
-    "vscode": {
-     "languageId": "plaintext"
-    }
-   },
-   "outputs": [],
+   "cell_type": "markdown",
+   "metadata": {},
    "source": [
-    "pip install -r requirements.txt"
+    "Now that your virtual environment is active, you can install the packages from your Conda environment.\n",
+    "\n",
+    "```sh\n",
+    "pip install -r requirements.txt\n",
+    "```\n",
+    "\n",
+    "finished."
    ]
   }
  ],
-- 
GitLab