mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-12 20:42:57 +00:00
Changes following the review
This commit is contained in:
@@ -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
|
grant additional permissions (e.g., ability to merge PRs) to anyone who shows an on-going interest
|
||||||
in working on the project.
|
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).
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
You can try a
|
You can try a
|
||||||
|
@@ -12,12 +12,9 @@ fi
|
|||||||
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
|
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
|
||||||
# launched by JupyterHub, use single-user entrypoint
|
# launched by JupyterHub, use single-user entrypoint
|
||||||
exec /usr/local/bin/start-singleuser.sh "$@"
|
exec /usr/local/bin/start-singleuser.sh "$@"
|
||||||
elif [[ ! -z "${JUPYTER_ENABLE_NB}" ]]; then
|
elif [[ ! -z "${JUPYTER_ENABLE_LAB}" ]]; then
|
||||||
echo "WARN: We encourage users to transition to JupyterLab, Notebook support could be removed"
|
|
||||||
. /usr/local/bin/start.sh $wrapper jupyter notebook "$@"
|
|
||||||
else
|
|
||||||
if [[ ! -z "${JUPYTER_ENABLE_LAB}" ]]; then
|
|
||||||
echo "WARN: The JUPYTER_ENABLE_LAB environment variable is not required anymore"
|
|
||||||
fi
|
|
||||||
. /usr/local/bin/start.sh $wrapper jupyter lab "$@"
|
. /usr/local/bin/start.sh $wrapper jupyter lab "$@"
|
||||||
|
else
|
||||||
|
echo "WARN: Jupyter Notebook deprecation notice https://github.com/jupyter/notebook#notice."
|
||||||
|
. /usr/local/bin/start.sh $wrapper jupyter notebook "$@"
|
||||||
fi
|
fi
|
||||||
|
@@ -10,9 +10,8 @@ LOGGER = logging.getLogger(__name__)
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"env,expected_server",
|
"env,expected_server",
|
||||||
[
|
[
|
||||||
(["JUPYTER_ENABLE_NB=yes"], "notebook"),
|
|
||||||
(["JUPYTER_ENABLE_LAB=yes"], "lab"),
|
(["JUPYTER_ENABLE_LAB=yes"], "lab"),
|
||||||
(None, "lab"),
|
(None, "notebook"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_start_notebook(container, http_client, env, expected_server):
|
def test_start_notebook(container, http_client, env, expected_server):
|
||||||
@@ -28,10 +27,7 @@ def test_start_notebook(container, http_client, env, expected_server):
|
|||||||
assert (
|
assert (
|
||||||
f"Executing the command: jupyter {expected_server}" in logs
|
f"Executing the command: jupyter {expected_server}" in logs
|
||||||
), f"Not the expected command (jupyter {expected_server}) was launched"
|
), f"Not the expected command (jupyter {expected_server}) was launched"
|
||||||
if env:
|
# Checking warning messages
|
||||||
# Checking warning messages
|
if not env:
|
||||||
if "JUPYTER_ENABLE_LAB=yes" in env:
|
msg = "WARN: Jupyter Notebook deprecation notice https://github.com/jupyter/notebook#notice."
|
||||||
msg = "WARN: The JUPYTER_ENABLE_LAB environment variable is not required anymore"
|
|
||||||
elif "JUPYTER_ENABLE_NB=yes" in env:
|
|
||||||
msg = "WARN: We encourage users to transition to JupyterLab, Notebook support could be removed"
|
|
||||||
assert msg in logs, f"Expected warning message {msg} not printed"
|
assert msg in logs, f"Expected warning message {msg} not printed"
|
||||||
|
Reference in New Issue
Block a user