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 2 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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ 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 in the [documentation](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html).
This change is followed in the issue [#1217](https://github.com/jupyter/docker-stacks/issues/1217).

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/notebook#notice."
romainx marked this conversation as resolved.
Show resolved Hide resolved
. /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 https://github.com/jupyter/notebook#notice."
assert msg in logs, f"Expected warning message {msg} not printed"