From 598b2c7e43ab469f2ecb031df619af0395ed61a7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Thu, 26 Mar 2026 11:18:23 +0100 Subject: [PATCH 1/5] Update GitHub instructions in 10_manage_python_project.ipynb In this PR we ask users to establish passwordless connection to GitHub based on SSH key pair. --- 10_manage_python_project.ipynb | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/10_manage_python_project.ipynb b/10_manage_python_project.ipynb index 75fc6173..f870443d 100644 --- a/10_manage_python_project.ipynb +++ b/10_manage_python_project.ipynb @@ -137,10 +137,25 @@ "1. Decide which package you want to use for the following exercises, yours or the [mypackage](https://github.com/empa-scientific-it/mypackage).\n", "1. If you use the `mypackage` fork it to your own GitHub account by clicking on the `Fork` button in the top right corner.\n", "1. Clone the fork to your local machine: `git clone `.\n", - " The URL can be found by clicking on the `` dropdown and selecting __HTTPS__ tab.\n", - "1. [Create an access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-personal-access-token-classic) for your account that will be used instead of your password.\n", - " You should enable `workflow`, `write:packages`, `delete:packages`.\n", - " Make sure to store the token in some secure location.\n", + " The URL can be found by clicking on the `` dropdown and selecting the __SSH__ tab.\n", + "\n", + "
\n", + "How to set up SSH keys (click to expand)\n", + "\n", + "1. Open the Terminal and generate an SSH key pair:\n", + " ```bash\n", + " ssh-keygen -t rsa\n", + " ```\n", + " Hit `Enter` three times to accept the default values.\n", + "\n", + "2. In the File Browser, enter the `.ssh` folder and open the file named `id_rsa.pub`. Copy its content.\n", + "\n", + "3. Go to [github.com](https://github.com), click on your icon (top right corner) and select `Settings`.\n", + " In the newly opened window, select \"SSH and GPG keys\" and click on \"New SSH key\".\n", + " Provide a key title (e.g. `python-intro-tutorial`) and paste the key content in the \"Key\" field.\n", + " Click on \"Add SSH key\".\n", + "\n", + "
\n", "\n", "
\n", "In the following, we will always assume that mypackage is the package you are working on (either yours or the one you have forked).\n", From 9e1dc033653e9c83c41017eab94d74c383d20e53 Mon Sep 17 00:00:00 2001 From: Despina Adamopoulou Date: Thu, 26 Mar 2026 11:52:29 +0100 Subject: [PATCH 2/5] fix typo in header --- 10_manage_python_project.ipynb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/10_manage_python_project.ipynb b/10_manage_python_project.ipynb index f870443d..87956eeb 100644 --- a/10_manage_python_project.ipynb +++ b/10_manage_python_project.ipynb @@ -14,7 +14,6 @@ "metadata": {}, "source": [ "# Table of Contents\n", - " - [Manage Python project](#Manage-Python-project)\n", " - [References](#References)\n", " - [Introduction](#Introduction)\n", " - [Preparatory exercise](#Preparatory-exercise)\n", @@ -41,7 +40,7 @@ " - [Exercise on testing](#Exercise-on-testing)\n", " - [Documentation](#Documentation)\n", " - [Why document?](#Why-document?)\n", - " - [How document?](#How-document?)\n", + " - [How to document?](#How-to-document?)\n", " - [Comments](#Comments)\n", " - [Docstrings](#Docstrings)\n", " - [Type hints](#Type-hints)\n", @@ -741,7 +740,7 @@ "id": "28", "metadata": {}, "source": [ - "## How document?\n", + "## How to document?\n", "\n", "Usually, the documentation of a package is written in [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html) or [Markdown](https://www.sphinx-doc.org/en/master/usage/markdown.html).\n", "However, it is also possible to write the documentation in [Jupyter notebooks](https://jupyter.org/) (as we do in this tutorial).\n", From 11f516365ac9a1588b46124a38db2423d9f7b4eb Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Tue, 31 Mar 2026 09:38:18 +0200 Subject: [PATCH 3/5] Explicitly say that one should use Jupyter's Terminal --- 10_manage_python_project.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10_manage_python_project.ipynb b/10_manage_python_project.ipynb index 87956eeb..33c6d3ff 100644 --- a/10_manage_python_project.ipynb +++ b/10_manage_python_project.ipynb @@ -141,7 +141,7 @@ "
\n", "How to set up SSH keys (click to expand)\n", "\n", - "1. Open the Terminal and generate an SSH key pair:\n", + "1. Open the Jupyter Terminal (`File` -> `New Launcher`, then select `Terminal`), and generate an SSH key pair:\n", " ```bash\n", " ssh-keygen -t rsa\n", " ```\n", From 71aedeb978616d90bfc5282333fcebe8cc7cb71f Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Tue, 31 Mar 2026 09:42:38 +0200 Subject: [PATCH 4/5] Add a simple explanation about ssh key pair --- 10_manage_python_project.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/10_manage_python_project.ipynb b/10_manage_python_project.ipynb index 33c6d3ff..402f96ee 100644 --- a/10_manage_python_project.ipynb +++ b/10_manage_python_project.ipynb @@ -141,6 +141,8 @@ "
\n", "How to set up SSH keys (click to expand)\n", "\n", + "An SSH key pair is a pair of cryptographic keys (a private key that stays on your machine and a public key that you share with GitHub) that lets you authenticate securely without typing a password every time. [Learn more](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh).\n", + "\n", "1. Open the Jupyter Terminal (`File` -> `New Launcher`, then select `Terminal`), and generate an SSH key pair:\n", " ```bash\n", " ssh-keygen -t rsa\n", From 6149bf300f11cd0221a92a4a2fa6ac123c748878 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Tue, 31 Mar 2026 09:54:34 +0200 Subject: [PATCH 5/5] Explain how to get the content of id_rsa.pub --- 06_modules_and_packages.ipynb | 17 ++++++++++------- 10_manage_python_project.ipynb | 6 +++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/06_modules_and_packages.ipynb b/06_modules_and_packages.ipynb index df4e4cc1..f6f82719 100644 --- a/06_modules_and_packages.ipynb +++ b/06_modules_and_packages.ipynb @@ -881,13 +881,16 @@ "2. Enable passwordless connection to your GitHub profile.\n", "\n", " 1. For that, you first need to open the Terminal and type the following:\n", - " ```bash\n", - " ssh-keygen -t rsa\n", - " ```\n", - " Then hit `Enter` three times to accept the default values.\n", - "\n", - " 1. In the File Browser, enter the `.ssh` folder and open the file named `id_rsa.pub`.\n", - " Copy its content.\n", + " ```bash\n", + " ssh-keygen -t rsa\n", + " ```\n", + " Then hit `Enter` three times to accept the default values.\n", + "\n", + " 1. In the File Browser, enter the `.ssh` and copy the content of the file named `id_rsa.pub`.\n", + " ```bash\n", + " cat ~/.ssh/id_rsa.pub\n", + " ```\n", + " Copy the output of this command.\n", "\n", " 1. Go to [github.com](https://github.com), click on your icon (top right corner) and select `Settings`.\n", " In the newly opened window, select \"SSH and GPG keys\" and click on \"New SSH key\".\n", diff --git a/10_manage_python_project.ipynb b/10_manage_python_project.ipynb index 402f96ee..79006e8b 100644 --- a/10_manage_python_project.ipynb +++ b/10_manage_python_project.ipynb @@ -149,7 +149,11 @@ " ```\n", " Hit `Enter` three times to accept the default values.\n", "\n", - "2. In the File Browser, enter the `.ssh` folder and open the file named `id_rsa.pub`. Copy its content.\n", + "2. In the File Browser, enter the `.ssh` and copy the content of the file named `id_rsa.pub`.\n", + " ```bash\n", + " cat ~/.ssh/id_rsa.pub\n", + " ```\n", + " Copy the output of this command.\n", "\n", "3. Go to [github.com](https://github.com), click on your icon (top right corner) and select `Settings`.\n", " In the newly opened window, select \"SSH and GPG keys\" and click on \"New SSH key\".\n",