Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter Notebook Deprecation Notice #1209

Merged
merged 6 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
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).
romainx marked this conversation as resolved.
Show resolved Hide resolved

In April 2021 JupyterLab will become the default, however a new environment variable will be introduced to switch back to Jupyter Notebook if needed.
romainx marked this conversation as resolved.
Show resolved Hide resolved

Next, and according to the Jupyter Notebook project status and its compatibility with JupyterLab, it could be abandoned in favor of another *classic-like* UI.
romainx marked this conversation as resolved.
Show resolved Hide resolved

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

romainx marked this conversation as resolved.
Show resolved Hide resolved
## 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
romainx marked this conversation as resolved.
Show resolved Hide resolved
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"