Skip to content

Commit

Permalink
Merge pull request #1209 from romainx/feat-1207-1
Browse files Browse the repository at this point in the history
Jupyter Notebook Deprecation Notice
  • Loading branch information
romainx authored Jan 19, 2021
2 parents 7e07b80 + 21a94a2 commit aec555e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ Anyone in the community can jump in and help with these activities at any time.
grant additional permissions (e.g., ability to merge PRs) to anyone who shows an on-going interest
in working on the project.

## Jupyter Notebook Deprecation Notice

Following [Jupyter Notebook notice](https://github.com/jupyter/notebook#notice), we encourage users to transition to JupyterLab.
This can be done by passing the environment variable `JUPYTER_ENABLE_LAB=yes` at container startup,
more information is available in the [documentation](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#docker-options).

In April 2021 JupyterLab will become the default for all of the Jupyter Docker stack images, however a new environment variable will be introduced to switch back to Jupyter Notebook if needed.

After the change of default, and according to the Jupyter Notebook project status and its compatibility with JupyterLab, these Docker images may remove the classic Jupyter Notebook interface altogether in favor of another *classic-like* UI built atop JupyterLab.

This change is tracked in the issue [#1217](https://github.com/jupyter/docker-stacks/issues/1217), please check its content for more information.

## Quick Start

You can try a
Expand Down
1 change: 1 addition & 0 deletions base-notebook/start-notebook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
elif [[ ! -z "${JUPYTER_ENABLE_LAB}" ]]; then
. /usr/local/bin/start.sh $wrapper jupyter lab "$@"
else
echo "WARN: Jupyter Notebook deprecation notice https://github.com/jupyter/docker-stacks#jupyter-notebook-deprecation-notice."
. /usr/local/bin/start.sh $wrapper jupyter notebook "$@"
fi
33 changes: 33 additions & 0 deletions base-notebook/test/test_start_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

import logging
import pytest

LOGGER = logging.getLogger(__name__)


@pytest.mark.parametrize(
"env,expected_server",
[
(["JUPYTER_ENABLE_LAB=yes"], "lab"),
(None, "notebook"),
],
)
def test_start_notebook(container, http_client, env, expected_server):
"""Test the notebook start-notebook script"""
LOGGER.info(
f"Test that the start-notebook launches the {expected_server} server from the env {env} ..."
)
c = container.run(tty=True, environment=env, command=["start-notebook.sh"])
resp = http_client.get("http://localhost:8888")
assert resp.status_code == 200, "Server is not listening"
logs = c.logs(stdout=True).decode("utf-8")
LOGGER.debug(logs)
assert (
f"Executing the command: jupyter {expected_server}" in logs
), f"Not the expected command (jupyter {expected_server}) was launched"
# Checking warning messages
if not env:
msg = "WARN: Jupyter Notebook deprecation notice"
assert msg in logs, f"Expected warning message {msg} not printed"

0 comments on commit aec555e

Please sign in to comment.