|
13 | 13 | "tags": [] |
14 | 14 | }, |
15 | 15 | "source": [ |
16 | | - "# Table of contents\n", |
17 | | - "- [Welcome! 🐍](#Welcome!-🐍)\n", |
| 16 | + "## Table of Contents\n", |
| 17 | + "\n", |
18 | 18 | "- [Timetable](#Timetable)\n", |
19 | 19 | "- [How to interact](#How-to-interact)\n", |
20 | | - "- [Binder only](#Binder-only)\n", |
| 20 | + "- [How to run the tutorial](#How-to-run-the-tutorial)\n", |
| 21 | + " - [With GitHub Codespaces](#With-GitHub-Codespaces)\n", |
| 22 | + " - [With Binder](#With-Binder)\n", |
| 23 | + " - [On your laptop](#On-your-laptop)\n", |
21 | 24 | "- [How to use Jupyter Lab and the notebooks](#How-to-use-Jupyter-Lab-and-the-notebooks)\n", |
22 | | - " - [Cells](#Cells)\n", |
23 | | - " - [Store your progress](#Store-your-progress)\n", |
24 | | - " - [Simple view](#Simple-view)\n", |
25 | | - " - [File browser](#File-browser)\n", |
26 | | - " - [Terminal](#Terminal)\n", |
| 25 | + " - [Cells](#Cells)\n", |
| 26 | + " - [Store your progress](#Store-your-progress)\n", |
| 27 | + " - [Simple view](#Simple-view)\n", |
| 28 | + " - [File browser](#File-browser)\n", |
| 29 | + " - [Terminal](#Terminal)\n", |
27 | 30 | "- [Exercises 🌶️](#Exercises-🌶️)\n", |
28 | | - " - [Exercise example](#Exercise-example)\n", |
29 | | - " - [Exercise variables](#Exercise-variables)\n", |
30 | | - " - [Exercise difficulty](#Exercise-difficulty)\n", |
31 | | - "- [Hands-on sessions](#Hands-on-sessions)\n", |
32 | | - "- [Let's get started! 🐍](#Let's-get-started!-🐍)" |
| 31 | + " - [Exercise example](#Exercise-example)\n", |
| 32 | + " - [Exercise variables](#Exercise-variables)\n", |
| 33 | + " - [Exercise difficulty](#Exercise-difficulty)\n", |
| 34 | + "- [Hands-on sessions](#Hands-on-sessions)" |
33 | 35 | ] |
34 | 36 | }, |
35 | 37 | { |
|
96 | 98 | "cell_type": "markdown", |
97 | 99 | "metadata": {}, |
98 | 100 | "source": [ |
99 | | - "# Binder only\n", |
| 101 | + "# How to run the tutorial\n", |
| 102 | + "\n", |
| 103 | + "We designed the tutorial as a hands-on workshop. You should try to write as much code as possible to practice the foundational concepts." |
| 104 | + ] |
| 105 | + }, |
| 106 | + { |
| 107 | + "cell_type": "markdown", |
| 108 | + "metadata": {}, |
| 109 | + "source": [ |
| 110 | + "## With GitHub Codespaces\n", |
| 111 | + "\n", |
| 112 | + "GitHub Codespaces is a cloud-based development environment that allows developers to code directly within their web browser, through Visual Studio Code, or Jupyter Lab.\n", |
| 113 | + "It provides a fully configured development environment, including the necessary tools, libraries, and dependencies, tailored to the specific needs of your project.\n", |
| 114 | + "\n", |
| 115 | + "We are going to show you in practice how to create a codespace and run the tutorial inside it, but here a step-by-step guide.\n", |
| 116 | + "From the repository on GitHub:\n", |
| 117 | + "\n", |
| 118 | + "**(1) Sign in to GitHub:**\n", |
100 | 119 | "\n", |
101 | | - "During the tutorial, we request participants to **exclusively** use [Binder](https://mybinder.org/).\n", |
102 | | - "Everyone has their own combination of operating systems and software.\n", |
103 | | - "Supporting all of them is a challenge, which also takes time away from the actual content of the tutorial.\n", |
| 120 | + "- Ensure you are logged into your GitHub account.\n", |
104 | 121 | "\n", |
105 | | - "Binder is a service that allows you to run Jupyter Notebooks in the cloud.\n", |
| 122 | + "**(2) Open the Codespaces Tab:**\n", |
| 123 | + "\n", |
| 124 | + "- Once you are on the repository's main page, look for the \"Code\" button (usually green) near the top right of the page.\n", |
| 125 | + "- Click on the \"Code\" button to reveal a dropdown menu.\n", |
| 126 | + "- In the dropdown menu, you will see a \"Codespaces\" tab. Click on it.\n", |
| 127 | + "\n", |
| 128 | + "**(3) Create a New Codespace:**\n", |
| 129 | + "\n", |
| 130 | + "- In the \"Codespaces\" tab, you will see an option to create a new Codespace. Click on the \"New codespace\" button.\n", |
| 131 | + "- GitHub will start setting up your Codespace. This process involves provisioning a virtual machine, cloning the repository, and setting up the development environment based on the repository's configuration files.\n", |
| 132 | + "\n", |
| 133 | + "**(4) Access Your Codespace:**\n", |
| 134 | + "\n", |
| 135 | + "- Once the setup is complete, you will be automatically redirected to your new Codespace. This environment will be accessible either through your web browser or through Visual Studio Code if you prefer a desktop application.\n", |
| 136 | + "- You can now start coding, running, and debugging your application directly within this environment\n", |
| 137 | + "\n", |
| 138 | + "<div class=\"alert alert-block alert-info\">\n", |
| 139 | + " <h4><b>Note</b></h4>\n", |
| 140 | + " We <b>strongly</b> suggest you to work with the tutorial material via Jupyter Lab because Visual Studio Code is not 100% compatible with all the notebooks' features.\n", |
| 141 | + " You can start Jupyter Lab in your Codespace from the \"Code\" button as shown in the following screenshot.\n", |
| 142 | + "</div>\n", |
| 143 | + "\n", |
| 144 | + "<img src=\"images/codespaces-jupyterlab.png\" alt=\"Jupyter Lab in Codespaces\" width=\"600\"/>" |
| 145 | + ] |
| 146 | + }, |
| 147 | + { |
| 148 | + "cell_type": "markdown", |
| 149 | + "metadata": {}, |
| 150 | + "source": [ |
| 151 | + "## With Binder\n", |
| 152 | + "\n", |
| 153 | + "[Binder](https://mybinder.org/) is a service that allows you to run Jupyter Notebooks in the cloud.\n", |
106 | 154 | "It's free and requires no installation.\n", |
107 | 155 | "You can use it by clicking the `launch|binder` button on the main page of the [official repository on GitHub](https://github.com/empa-scientific-it/python-tutorial) of the tutorial.\n", |
108 | 156 | "\n", |
|
115 | 163 | "\n", |
116 | 164 | "\n", |
117 | 165 | "<div class=\"alert alert-block alert-warning\">\n", |
118 | | - "<b>Warning:</b> Binder is free, so it provides limited resources.\n", |
| 166 | + " <h4><b>Warning</b></h4>\n", |
| 167 | + " Binder is free, so it provides limited resources.\n", |
119 | 168 | "After 10 minutes of inactivity, your Binder instance will be shut down.\n", |
120 | 169 | "You will lose all your work.\n", |
121 | 170 | "To avoid this, please save your work regularly.\n", |
122 | 171 | "See more about saving later in this notebook.\n", |
123 | | - "</div>\n" |
| 172 | + "</div>" |
| 173 | + ] |
| 174 | + }, |
| 175 | + { |
| 176 | + "cell_type": "markdown", |
| 177 | + "metadata": {}, |
| 178 | + "source": [ |
| 179 | + "## On your laptop\n", |
| 180 | + "\n", |
| 181 | + "You can also run the tutorial locally, on your laptop.\n", |
| 182 | + "We warmly suggest you to choose this route as a last resort since it might take some time to properly install/configure all the prerequisites.\n", |
| 183 | + "Please, refer to the [README](https://github.com/empa-scientific-it/python-tutorial/blob/main/README.md#run-the-tutorial-on-your-computer) for detailed instructions.\n" |
124 | 184 | ] |
125 | 185 | }, |
126 | 186 | { |
|
192 | 252 | "## Store your progress\n", |
193 | 253 | "\n", |
194 | 254 | "While working on the notebooks, you will probably want to save your progress.\n", |
195 | | - "Since Binder runs in the cloud, you cannot just press `Ctrl+S` to save your work - the notebook will be stored on the server, which is not accessible to you.\n", |
| 255 | + "How to do it depends on where you are running the tutorial.\n", |
| 256 | + "\n", |
| 257 | + "### In GitHub Codespaces\n", |
| 258 | + "\n", |
| 259 | + "With either Jupyter Lab or Visual Studio Code, saving your work in your Codespace works the same as if you were working on your laptop.\n", |
| 260 | + "\n", |
| 261 | + "In Jupyter Lab, you can use the \"File\" menu (`File > Save Notebook`) or simply use the shortcuts `Ctrl+S` (Windows/Linux) or `Cmd+S` (macOS).\n", |
| 262 | + "\n", |
| 263 | + "<div class=\"alert alert-block alert-info\">\n", |
| 264 | + " <h4><b>Note</b></h4>\n", |
| 265 | + " <h5>Codespace resources</h5>\n", |
| 266 | + " Running a GitHub Codespace consume resources (storage and compute). GitHub will provide each Free plan account 120 core hours, or 60 hours of run time for a 2 core codespace, plus 15 GB of storage to use <b>each month</b>. If you exceed these quotas, you are going to be <a href=\"https://docs.github.com/en/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces\">billed</a> for the extra resources.\n", |
| 267 | + "</div>\n", |
| 268 | + "\n", |
| 269 | + "<div class=\"alert alert-block alert-warning\">\n", |
| 270 | + " <h4><b>Warning</b></h4>\n", |
| 271 | + " <h5>Automatic deletion</h5>\n", |
| 272 | + " By default, a Codespace that has been stopped for <b>more than 30 days</b> is automatically deleted by GitHub. Make sure you save your work <b>outside</b> your Codespace before stopping it. If you need help, don't hesitate to ask during the tutorial.\n", |
| 273 | + "</div>\n", |
| 274 | + "\n", |
| 275 | + "### In Binder\n", |
| 276 | + "\n", |
| 277 | + "With Binder you cannot just press `Ctrl+S` (or `Cmd+S`) to save your work - the notebook will be stored on the server, which is not accessible to you.\n", |
196 | 278 | "A better solution is to use those buttons in the toolbar:\n", |
197 | 279 | "\n", |
198 | 280 | "<img src=\"images/save_binder.png\" alt=\"Save\"/>\n", |
|
227 | 309 | "metadata": {}, |
228 | 310 | "source": [ |
229 | 311 | "<div class=\"alert alert-block alert-warning\">\n", |
230 | | - "<b>Warning:</b> The procedure described above will only work if you don't close the browser window.\n", |
| 312 | + " <h4><b>Warning</b></h4>\n", |
| 313 | + " The procedure described above will only work if you don't close the browser window.\n", |
231 | 314 | "If you close your browser, it would be better to download the notebook to your computer.\n", |
232 | 315 | "To do so, go to <code>File</code> -> <code>Download</code>.\n", |
233 | 316 | "</div>" |
|
387 | 470 | "After 3 failed attempts, a proposed solution will be revealed.\n", |
388 | 471 | "\n", |
389 | 472 | "<div class=\"alert alert-block alert-warning\">\n", |
390 | | - "<b>Important:</b> The input arguments or the expected results of an exercise can be <strong>quite long</strong>. The output of the tests might be a bit difficult to navigate. If you need help with that, just <strong>ask</strong> 😉.\n", |
| 473 | + " <h4><b>Note</b></h4>\n", |
| 474 | + " The input arguments or the expected results of an exercise can be <strong>quite long</strong>. The output of the tests might be a bit difficult to navigate. If you need help with that, just <strong>ask</strong> 😉.\n", |
391 | 475 | "</div>" |
392 | 476 | ] |
393 | 477 | }, |
|
0 commit comments