Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions 06_modules_and_packages.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
34 changes: 27 additions & 7 deletions 10_manage_python_project.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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 <url-to-your-repository>`.\n",
" The URL can be found by clicking on the `<Code>` 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 `<Code>` dropdown and selecting the __SSH__ tab.\n",
"\n",
"<details>\n",
"<summary>How to set up SSH keys (click to expand)</summary>\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",
"</details>\n",
"\n",
"<div class=\"alert alert-block alert-info\">\n",
"In the following, we will always assume that <code>mypackage</code> is the package you are working on (either yours or the one you have forked).\n",
Expand Down Expand Up @@ -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",
Expand Down