Changes following the review

This commit is contained in:
romainx
2021-01-18 07:43:26 +01:00
parent b7aad78b82
commit 0660736ac0
3 changed files with 15 additions and 15 deletions

View File

@@ -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).
## Quick Start
You can try a

View File

@@ -12,12 +12,9 @@ fi
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
# launched by JupyterHub, use single-user entrypoint
exec /usr/local/bin/start-singleuser.sh "$@"
elif [[ ! -z "${JUPYTER_ENABLE_NB}" ]]; 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
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/notebook#notice."
. /usr/local/bin/start.sh $wrapper jupyter notebook "$@"
fi

View File

@@ -10,9 +10,8 @@ LOGGER = logging.getLogger(__name__)
@pytest.mark.parametrize(
"env,expected_server",
[
(["JUPYTER_ENABLE_NB=yes"], "notebook"),
(["JUPYTER_ENABLE_LAB=yes"], "lab"),
(None, "lab"),
(None, "notebook"),
],
)
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 (
f"Executing the command: jupyter {expected_server}" in logs
), f"Not the expected command (jupyter {expected_server}) was launched"
if env:
# Checking warning messages
if "JUPYTER_ENABLE_LAB=yes" in env:
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"
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"