Skip to content

Commit 0c888ae

Browse files
Improve the documentation for Notebook 7 (#6813)
* [pre-commit.ci] pre-commit autoupdate (#6814) updates: - [github.com/python-jsonschema/check-jsonschema: 0.21.0 → 0.22.0](python-jsonschema/check-jsonschema@0.21.0...0.22.0) - [github.com/psf/black: 23.1.0 → 23.3.0](psf/black@23.1.0...23.3.0) - [github.com/charliermarsh/ruff-pre-commit: v0.0.254 → v0.0.260](astral-sh/ruff-pre-commit@v0.0.254...v0.0.260) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Add note and warning on the extension landing page * fix nbclassic url * fix seealso blocks * Fix note * add changelog to the navbar * update faq * Update screencasts and screenshots * Remove old screenshots and screencasts * rename migrating file * Split the migration guide * dedicate a page to new features * document themes * Iterate on the new features * expand docs on extensions * add Binder link * mention the interface dropdown * iterate on features * Mention nbgrader and RISE * Lint * Add server extension docs * fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 65da1cd commit 0c888ae

20 files changed

+353
-455
lines changed
-24.6 KB
Binary file not shown.

docs/source/_static/images/blank-notebook-ui.svg

Lines changed: 0 additions & 397 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-518 KB
Binary file not shown.

docs/source/development_faq.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
1. How do I install a prerelease version such as a beta or release candidate?
66

7+
You can install a prerelease version of the notebook using the `--pre` flag with `pip`:
8+
79
```bash
810
python -m pip install notebook --pre --upgrade
911
```
12+
13+
If you are using `conda` or `mamba`, you can install a prerelease version of the notebook using the alpha or beta label. For example, to install the latest alpha release, you can run:
14+
15+
```bash
16+
conda install -c conda-forge -c conda-forge/label/notebook_alpha notebook=7.0.0a18
17+
```

docs/source/extending/frontend_extensions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ This describes the basic steps to write a TypeScript extension for the Jupyter
66
notebook front-end. This allows you to customize the behaviour of the various
77
pages like the dashboard, the notebook, or the text editor.
88

9-
Starting with Notebook v7, front-end extensions for the notebook can be developed
9+
Starting with Notebook 7, front-end extensions for the notebook can be developed
1010
as prebuilt JupyterLab extensions.
1111

12-
This means Notebook v7 is able to reuse many of the existing extensions from the JupyterLab ecosystem as is.
12+
This means Notebook 7 is able to reuse many of the existing extensions from the JupyterLab ecosystem as is.
1313

14-
If you would like to develop a prebuilt extension for Notebook v7, check out:
14+
If you would like to develop a prebuilt extension for Notebook 7, check out:
1515

1616
- [JupyterLab Extension Tutorial](https://jupyterlab.readthedocs.io/en/latest/extension/extension_tutorial.html): A tutorial to learn how to make a simple JupyterLab extension.
17-
- The [JupyterLab Extension Examples Repository](https://github.com/jupyterlab/extension-examples): A short tutorial series to learn how to develop extensions for JupyterLab by example.
17+
- The [JupyterLab Extension Examples Repository](https://github.com/jupyterlab/extension-examples): A repository containing many examples of JupyterLab extensions for performing various tasks: adding commands, adding a new widget, handling user settings, etc.

docs/source/extending/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Extending the Notebook
22

3+
```{warning}
4+
Please note that the extension system for Notebook 7 is radically different
5+
from the one used in Notebook 6.5.x and earlier. If you are looking for
6+
information on how to extend the classic Notebook, please refer to the
7+
[documentation for NbClassic](https://nbclassic.readthedocs.io/en/latest/extending/index.html).
8+
```
9+
10+
```{note}
11+
With Notebook 7 being developed on top of JupyterLab and Jupyter Server, the
12+
frontend extension system is now based on the same extension system used by JupyterLab.
13+
14+
Server extensions are also now based on the same system used by Jupyter Server.
15+
You will find below a link to the relevant documentations.
16+
```
17+
318
Certain subsystems of the notebook server are designed to be extended or
419
overridden by users. These documents explain these systems, and show how to
520
override the notebook's defaults with your own custom behavior.

docs/source/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
user-documentation
1414
configuration
15+
migrating
1516
contributor
16-
migrate_to_notebook7
17+
changelog
1718
```

docs/source/migrating.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Migrating to Notebook 7
2+
3+
```{warning}
4+
The Jupyter Notebook application is undergoing a major refactoring to
5+
improve the user experience and to make it easier to maintain and extend.
6+
7+
This set of migration guides are intended to help you migrate your Classic Notebook
8+
setup and extensions to the new Jupyter Notebook 7, which is built on top of JupyterLab 4.
9+
```
10+
11+
## Sunrising the Jupyter Notebook 7
12+
13+
For the past few years, the Classic Jupyter Notebook has been in maintenance mode.
14+
15+
Development has mostly moved to alternative user interfaces like JupyterLab, which is a more
16+
modern and extensible web application. This has resulted in a lot of new
17+
features and improvements in JupyterLab, but also in a lot of new features and
18+
improvements that were not possible to integrate to the Classic Notebook.
19+
20+
For a while the plan was to progressively _sunset_ the Classic Notebook and not maintain it anymore. However, the Classic Notebook is still widely used and it is still the default user interface for Jupyter in many scenarios. Many users and organizations have not been able to switch to JupyterLab yet. For some users, JupyterLab can also be a more complex environment to use, especially for beginners.
21+
22+
Following the feedback from the community, it was decided late 2021 to continue developing the Jupyter Notebook application and _sunrise_ it as Notebook 7. Notebook 7 is built on top of JupyterLab components and delivers new features like realtime collaboration, debugger, and theming.
23+
24+
You can find more details about the changes currently taking place in the Jupyter Ecosystem in the [JEP 79] and [team-compass note].
25+
26+
## New features in Notebook 7
27+
28+
```{toctree}
29+
:maxdepth: 2
30+
31+
notebook_7_features.md
32+
```
33+
34+
## Migration Guides
35+
36+
```{toctree}
37+
:maxdepth: 2
38+
39+
migrating/frontend-extensions.md
40+
migrating/server-extensions.md
41+
migrating/custom-themes.md
42+
migrating/multiple-interfaces.md
43+
```
44+
45+
[jep 79]: https://jupyter.org/enhancement-proposals/79-notebook-v7/notebook-v7.html
46+
[team-compass note]: https://github.com/jupyter/notebook-team-compass/issues/5#issuecomment-1085254000
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Custom themes in Notebook 7
2+
3+
In Notebook 7, the way to create custom themes has changed. This means that custom themes developed for Notebook 6 or earlier will not work with Notebook 7 and upwards.
4+
5+
This is for example the case for community contributed themes such as [jupyter-themes](https://github.com/dunovank/jupyter-themes).
6+
7+
## Using a custom theme
8+
9+
Fortunately installing a custom theme for Notebook 7 is very easy. It is the same process as installing a regular extension.
10+
11+
For exampe let's say you want to install the [JupyterLab Night](https://github.com/martinRenou/jupyterlab-night) theme. You can do so by running the following command:
12+
13+
```bash
14+
pip install jupyterlab-night
15+
```
16+
17+
Then refresh the page and you should see the new theme available in the settings menu:
18+
19+
![a screencast showing how to install a custom theme](https://user-images.githubusercontent.com/591645/229583076-de3c0541-246f-4781-8941-fcbec2204038.gif)
20+
21+
There are already many themes available on [PyPI](https://pypi.org/search/?q=jupyterlab-theme).
22+
23+
You can also find other themes using the `jupyterlab-theme` topic on GitHub: https://github.com/topics/jupyterlab-theme
24+
25+
For example:
26+
27+
- [https://github.com/johnnybarrels/jupyterlab_onedarkpro](https://github.com/johnnybarrels/jupyterlab_onedarkpro)
28+
- [https://github.com/dunovank/jupyterlab_legos_ui](https://github.com/dunovank/jupyterlab_legos_ui)
29+
- [https://github.com/timkpaine/jupyterlab_miami_nights](https://github.com/timkpaine/jupyterlab_miami_nights)
30+
31+
## Creating a custom theme
32+
33+
Creating a custom theme for Notebook 7 follows the same process as creating a custom theme for JupyterLab 4.
34+
35+
See the {ref}`Frontend Extension Guide <frontend-extensions>` to get you started. When creating the extension, select the `Theme` option in the cookiecutter prompt.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Frontend Extensions in Notebook 7
2+
3+
```{warning}
4+
Any extension developed for Notebook \< 7 or NbClassic will not be
5+
compatible with Notebook 7 and upwards.
6+
7+
Some extensions like nbgrader have already been ported. We invite you to
8+
check if the extensions you are using have already been ported.
9+
```
10+
11+
You can check the following resources to see if your extension is available for Notebook 7:
12+
13+
## List of available Notebook 7 extensions
14+
15+
To get an idea of the extensions available for Notebook 7, you can check the following resources:
16+
17+
- [List of JupyterLab extensions][list of jupyterlab extensions]
18+
- [Awesome Jupyter][awesome jupyter]
19+
20+
These resources are for JupyterLab, but many of them are compatible with Notebook 7 since Notebook 7 is based on JupyterLab.
21+
22+
[list of jupyterlab extensions]: https://jupyterlab-contrib.github.io/extensions.html
23+
[awesome jupyter]: https://github.com/markusschanta/awesome-jupyter#jupyterlab-extensions
24+
25+
## JupyterLab equivalent extensions to the Classic Notebook
26+
27+
The `jupyterlab-contrib` organization maintains a list of extensions to ease the transition from the Classic Notebook to Notebook 7 and / or JupyterLab.
28+
29+
The list is available at the following URL: [Migrating from the Classic Notebook][migrate from classic]
30+
31+
![a screenshot showing extensions in classic and lab](https://user-images.githubusercontent.com/591645/229616855-94d34762-6666-4edd-a969-e85b285d7094.png)
32+
33+
[migrate from classic]: https://jupyterlab-contrib.github.io/migrate_from_classical.html

docs/source/migrate_to_notebook7.md renamed to docs/source/migrating/multiple-interfaces.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
1-
# Migrating to Notebook 7
1+
# Simultaneous usage of different versions of Notebook 7 and the Classic Notebook UI
22

3-
## Build Jupyter Notebook v7 off of JupyterLab components
3+
With the release of Notebook 7, the classic Notebook UI is now
4+
available as a Jupyter Server extension, NbClassic. This means that
5+
NbClassic can be installed independently of Notebook 7, and can be also
6+
installed alongside Notebook 7.
47

5-
Read more details about the changes currently taking place in the
6-
Jupyter Ecosystem in the [JEP 79] and [team-compass note].
8+
Below are different scenarios that you might consider when updating to Notebook 7.
79

8-
Notebook 7 is built on top of JupyterLab components and delivers new features
9-
like realtime collaboration, debugger, theming.
10+
## Try it on Binder
1011

11-
## Compatibility with older versions
12+
You can try JupyterLab, Notebook 7 and NBClassic installed together using [this gist][lab-nb-nbclassic] on Binder:
1213

13-
Any extension developed for Notebook \< 7 or NbClassic will not be
14-
compatible with Notebook 7 and upwards.
14+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/jtpio/35a72862c8be13dee31b61ebac2d9786/master?urlpath=/tree)
1515

16-
Some extensions like nbgrader have already been ported. We invite you to
17-
check if the extensions you are using have already been ported.
16+
[lab-nb-nbclassic]: https://gist.github.com/jtpio/35a72862c8be13dee31b61ebac2d9786
1817

19-
## Simultaneous usage of different versions
18+
## Using the `Interface` dropdown
2019

21-
**NbClassic and Notebook 7**
20+
Notebook 7 provides a dropdown menu to switch between the different user interfaces available on the same server.
21+
22+
It is available in the Notebook toolbar:
23+
24+
![image](https://user-images.githubusercontent.com/591645/229729077-a91bc9dd-9bb9-4510-a266-599bf2f97745.png)
25+
26+
```{note}
27+
This dropdown is only available when using Notebook 7 or JupyterLab.
28+
It is not displayed when using NbClassic.
29+
```
30+
31+
## NbClassic and Notebook 7
2232

2333
You can install NbClassic, Notebook 7 and JupyterLab, all three of
2434
which will provide different user interfaces
@@ -30,7 +40,7 @@ dependency of Notebook 7, and these front ends will be available
3040
through the following base paths: JupyterLab at `/lab`, Notebook 7 at
3141
`/tree`, and NbClassic at `/nbclassic/tree`.
3242

33-
**NbClassic and Notebook 6.5.x**
43+
## NbClassic and Notebook 6.5.x
3444

3545
As NbClassic provides the static assets for Notebook 6.5.x, while
3646
having both installed should cause no issues, the user interface provided
@@ -42,7 +52,7 @@ static assets. When starting an instance of JupyterLab you will be able
4252
to access the classic view of Notebook with NbClassic served on the same
4353
server at `/tree`.
4454

45-
**NbClassic and Notebook \<= 6.4.x**
55+
## NbClassic and Notebook \<= 6.4.x
4656

4757
When using NbClassic and Notebook \<= 6.4.x you can expect that these UIs
4858
will not be only presented at different servers, meaning they will both
@@ -52,20 +62,20 @@ reflected in Notebook versions \<= 6.4.x. In this case as well, you would
5262
be able to access the classic view of Notebook with NbClassic served on
5363
the same server, at `/tree`.
5464

55-
**NbClassic and JupyterLab 3.x**
65+
## NbClassic and JupyterLab 3.x
5666

5767
When only JupyterLab 3.x is installed, then NbClassic does not have to be
5868
explicitly installed as JupyterLab 3.x depends on it. They will run on
5969
the same server, and are reachable via `/tree` for NbClassic and
6070
`/lab` for JupyterLab.
6171

62-
**NbClassic and JupyterLab 4.x**
72+
## NbClassic and JupyterLab 4.x
6373

6474
When only JupyterLab 4.x is installed, then NbClassic has to be installed
6575
explictly. They will run on the same server, and are reachable via
6676
`/tree` for NbClassic, and `/lab` for JupyterLab.
6777

68-
**NbClassic Independently**
78+
## NbClassic Independently
6979

7080
When you choose to install only NbClassic via `pip install nbclassic`,
7181
the classic Notebook UI will be presented at the `/tree` path. As the
@@ -76,6 +86,3 @@ way to view the NbClassic frontend. You would be able to manually
7686
enable the extension when running an instance of Jupyter Server,
7787
`> jupyter server --ServerApp.jpserver_extensions="nbclassic=True"`,
7888
which will provide the NbClassic frontend at `/tree` path when visited.
79-
80-
[jep 79]: https://jupyter.org/enhancement-proposals/79-notebook-v7/notebook-v7.html
81-
[team-compass note]: https://github.com/jupyter/notebook-team-compass/issues/5#issuecomment-1085254000
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Server Extensions in Notebook 7
2+
3+
Notebook 7 is now based on Jupyter Server, which is a new server application that allows to run multiple Jupyter applications (e.g. Notebook, JupyterLab, NBClassic, etc.) on the same server.
4+
5+
This means that Notebook 7 is able to reuse many of the existing server extensions from the Jupyter ecosystem as is.
6+
7+
## Migration from the Notebook Server
8+
9+
The Jupyter Server documentation provides a [guide for migrating from the classic notebook server to Jupyter Server](https://jupyter-server.readthedocs.io/en/latest/operators/migrate-from-nbserver.html)
10+
11+
## Authoring Server Extensions
12+
13+
The Jupyter Server documentation provides a [guide for authoring server extensions](https://jupyter-server.readthedocs.io/en/latest/developers/extensions.html)

0 commit comments

Comments
 (0)