|
1 | 1 | .. meta:: |
2 | | - :description: Using Jupyter Notebooks for your assignments. |
| 2 | + :description: Using JupyterLab for your assignments. |
3 | 3 |
|
4 | 4 | .. _jupyter: |
5 | 5 |
|
6 | | -Jupyter |
7 | | -======= |
8 | | -You can set up your assignment to provide your students with a Jupyter Notebook as the default code editor or to open JupyterLab. More information about `Jupyter Notebook <https://jupyter.org/>`_ and `Jupyter Lab <https://jupyterlab.readthedocs.io/en/latest/>`_. |
| 6 | +JupyterLab |
| 7 | +========== |
| 8 | +You can set up your assignment to provide your students with the `JupyterLab <https://jupyterlab.readthedocs.io/en/latest/>`_ IDE. |
9 | 9 |
|
10 | | -.. Note:: The :ref:`Code Playback <code-playback>` functionality will not work for code your students enter in a Jupyter Notebook. |
| 10 | +.. Note:: |
| 11 | + :ref:`Code Playback <code-playback>` does not work with JupyterLab Notebooks. |
| 12 | + |
| 13 | + To view a timeline of events in a notebook, see :ref:`jupyter-collaboration-extension` below. |
11 | 14 |
|
12 | | -Using Jupyter Notebooks in Codio |
| 15 | +Using JupyterLab in Codio |
13 | 16 | -------------------------------- |
14 | | -If you plan to use Jupyter Notebook and optionally nbgrader, you must use a stack configured to support them. As these items are often difficult to configure, we recommend that you select the Jupyter Lab stack from our list of Certified Stacks. |
| 17 | +If you plan to use JupyterLab and optionally nbgrader, you must use a stack configured to support them. As these items are often difficult to configure, we recommend that you select the JupyterLab stack from our list of Certified Stacks. |
15 | 18 |
|
16 | | -More information about grading using :ref:`nbgrader <notebooks>`. |
17 | | - |
18 | | -.. Warning:: :ref:`Pair Programming <group-work>` should not be used for Jupyter Notebook. |
| 19 | +For information about grading notebook assignments, see :ref:`nbgrader <notebooks>`. |
19 | 20 |
|
20 | 21 | .. Note:: Notebook files are only supported in the root (`/home/codio/workspace` or `~/workspace`) folder. |
21 | 22 |
|
22 | | -Opening a Jupyter Notebook or JupyterLab |
23 | | ----------------------------------------- |
24 | | -There are multiple ways to provide your students with access to their Jupyter Notebook. |
| 23 | +Opening JupyterLab |
| 24 | +------------------ |
| 25 | +There are multiple ways to provide your students with access to JupyterLab. |
25 | 26 |
|
26 | 27 | The following are a few of the possibilities. |
27 | 28 |
|
28 | 29 | - Modify the :ref:`Preview menu <preview>` so that students can access the Jupyter server through the menu and open it in Codio or in a new browser tab. |
| 30 | + To customize the Preview button, modify this section of the **.codio** file: |
| 31 | + |
| 32 | + .. code:: ini |
| 33 | +
|
| 34 | + { |
| 35 | + // Preview button configuration |
| 36 | + "preview": { |
| 37 | + "JupyterLab": "https://{{domain3000}}/" |
| 38 | + } |
| 39 | + } |
29 | 40 |
|
30 | | - To customize the Preview button, modify this section of the **.codio** file: |
31 | 41 |
|
32 | | - .. code:: ini |
| 42 | +- Use guides to :ref:`create a layout <page>` that automatically opens a pane containing JupyterLab and a particular Notebook file. The example below shows a 2-Panel layout. |
| 43 | + - Create a **2-Panel Layout**. |
| 44 | + - Add a tab and select the "JupyterLab" type. |
| 45 | + - Enter the name of your file into the **Filename** field or drag it from the file tree. |
| 46 | + - You can change the :ref:`guide settings <global>` to **Collapsed on Start** and the Jupyter pane will open with the Guides collapsed. |
33 | 47 |
|
34 | | - { |
35 | | - // Preview button configuration |
36 | | - "preview": { |
37 | | - "Jupyter Notebook": "https://{{domain3000}}/" |
38 | | - } |
39 | | - } |
| 48 | +.. image:: /img/jlablayout.png |
| 49 | + :alt: Configuring the layout for JupyterLab |
40 | 50 |
|
| 51 | +If you don't use Guides, consider creating a README.md file with instructions on accessing JupyterLab. When there are no guides, the README.md will auto-open for students. You can tell students to click on the file in the file tree if you haven't configured another way to open it. |
41 | 52 |
|
42 | | -- Use guides to :ref:`create a layout <page>` that automatically opens a pane containing JupyterLab or a particular Jupyter NoteBook file. The example below shows a 2-Panel layout. You can also |
| 53 | +JupyterLab Extensions |
| 54 | +--------------------- |
43 | 55 |
|
44 | | - - Create a **2-Panel Layout**. |
45 | | - - Add a tab and for type select - "File" or select the "Jupyter Lab" type. |
46 | | - - Enter the name of your file into the **Filename** field or drag it into it from the file tree. |
47 | | - - You can change the :ref:`guide settings <global>` to **Collapsed on Start** and the Jupyter pane will open with the Guides collapsed. |
| 56 | +The following two features require JupyterLab. The Codio Certified Jupyter stacks based on Ubuntu 22.04 all come with JupyterLab pre-installed, so you can access these extension features immediately after opening JupyterLab. |
48 | 57 |
|
49 | | - .. image:: /img/jlablayout.png |
50 | | - :alt: Configuring the layout for Jupyter Lab |
| 58 | +If you are using a custom stack, you can check if JupyterLab is installed by running ``jupyter --version`` in the terminal. If it is not installed, you will not be able to use these features. |
51 | 59 |
|
52 | | -If you don't use Guides, consider creating a README.md file with instructions on accessing the Jupyter Notebook. When there are no guides, the README.md will auto-open for students. You can tell students to click on the file in the file tree if you haven't configured another way to open it. |
| 60 | +Virtual Coach and JupyterLab |
| 61 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
53 | 62 |
|
54 | | -Virtual Coach and Jupyter Notebook |
55 | | ----------------------------------- |
56 | 63 | An extension will allow :ref:`Virtual Coach <virtual-coach>` to access the contents of your Jupyter Notebook and detect errors when running Jupyter cells. This extension is already installed in all the Codio Certified Jupyter stacks. You can add the extension if you have your own custom Jupyter stack. |
57 | 64 |
|
58 | | -Use the **Tools > Install Software** :ref:`(more information) <box_parts>` menu item to install the **Jupyter Codio extension**. |
| 65 | +Use the **Tools > Install Software** :ref:`(more information) <box_parts>` menu item to install the **Jupyter Codio Extension**. |
| 66 | + |
| 67 | +After you have completed installing the software you will need to :ref:`create a new stack <create-stack>` or a :ref:`new stack version <update-stack>` to provide this for your students. |
| 68 | + |
| 69 | + |
| 70 | +.. _jupyter-collaboration-extension: |
| 71 | + |
| 72 | + |
| 73 | +Collaboration and Timeline |
| 74 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 75 | + |
| 76 | +.. Important:: You must have JupyterLab 4.4 or greater to use the Jupyter Collaboration Extension. |
| 77 | + |
| 78 | +This extension will allow multiple students to collaborate on a single Jupyter Notebook. You can set up groups using the :ref:`Pair Programming <group-work>` feature to facilitate notebook sharing; note that this extension does not support the Driver/Navigator and Shared Focus functionality (described in the same section). |
| 79 | + |
| 80 | +Use the **Tools > Install Software** :ref:`(more information) <box_parts>` menu item to install the **Jupyter Collaboration Extension**. |
59 | 81 |
|
60 | 82 | After you have completed installing the software you will need to :ref:`create a new stack <create-stack>` or a :ref:`new stack version <update-stack>` to provide this for your students. |
61 | 83 |
|
62 | | -The Codio Jupyter stacks based on Ubuntu 22.04 all utilize JupyterLab, and you should open the file as a JupyterLab (see above) to use all the features of the extension. |
| 84 | +For more information about the Jupyter Collaboration Extension, see the `official documentation <https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/>`_. This extension also provides a timeline of events in a Jupyter Notebook; learn more in this `blog post about timeline viewing <https://blog.jupyter.org/exploring-a-documents-timeline-in-jupyterlab-6084f96db263>`_. |
63 | 85 |
|
64 | | -You can check if JupyterLab is installed in your stack by entering the command ``jupyter --version`` in the terminal. This command will inform you which Jupyter packages are installed. If JupyterLab is not installed, you should open the Jupyter Notebook as a file. |
| 86 | +.. image:: /img/guides/timeline.gif |
| 87 | + :alt: An animated GIF showing a review of Jupyter Notebook edits |
| 88 | + :align: center |
0 commit comments