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 75fc6173..79006e8b 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", @@ -137,10 +136,31 @@ "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", + "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", + " ```\n", + " Hit `Enter` three times to accept the default values.\n", + "\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", + " 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", @@ -726,7 +746,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",