Skip to content

Commit

Permalink
Loosen Jupyter pinning (#3288)
Browse files Browse the repository at this point in the history
* More flexible pinning of Jupyter optional dependencies

See #2276.

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Add Jupyter changes to release notes

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Add future note about problematic test code

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Restore notebook dependency

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Restore ipython lower bound

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Update Jupyter liveness test

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Add small pause after server aliveness check

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

---------

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
  • Loading branch information
astrojuanlu committed Dec 20, 2023
1 parent c30b94b commit 543fa8b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## Bug fixes and other changes
* Removed example pipeline requirements when examples are not selected in `tools`.
* Allowed modern versions of JupyterLab and Jupyter Notebooks.

## Breaking changes to the API
* Added logging about not using async mode in `SequentiallRunner` and `ParallelRunner`.
Expand Down
7 changes: 5 additions & 2 deletions features/steps/cli_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shutil
import textwrap
from pathlib import Path
from time import time
from time import sleep, time

import behave
import requests
Expand Down Expand Up @@ -391,9 +391,12 @@ def exec_notebook(context, command):
@then('I wait for the jupyter webserver to run for up to "{timeout:d}" seconds')
def wait_for_notebook_to_run(context, timeout):
timeout_start = time()
# FIXME: Will continue iterating after the process has returned
while time() < timeout_start + timeout:
stdout = context.result.stdout.readline()
if "http://127.0.0.1:" in stdout:
# Take a breath, and declare success
sleep(1)
break

if time() >= timeout_start + timeout:
Expand Down Expand Up @@ -661,7 +664,7 @@ def check_jupyter_nb_proc_on_port(context: behave.runner.Context, port: int):
"""
url = f"http://localhost:{port}"
try:
_check_service_up(context, url, "Jupyter Notebook")
_check_service_up(context, url, "Jupyter Server")
finally:
context.result.terminate()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
black~=22.0
ipython>=7.31.1, <8.0; python_version < '3.8'
ipython~=8.10; python_version >= '3.8'
jupyter~=1.0
jupyterlab_server>=2.11.1, <2.16.0
jupyterlab~=3.0, <3.6.0
ipython>=8.10
jupyterlab>=3.0
notebook
kedro~={{ cookiecutter.kedro_version}}
kedro-datasets[pandas.CSVDataset]
kedro-telemetry>=0.3.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
black~=22.0
ipython~=8.10; python_version >= '3.8'
jupyter~=1.0
jupyterlab_server>=2.11.1, <2.16.0
jupyterlab~=3.0, <3.6.0
ipython>=8.10
jupyterlab>=3.0
notebook
kedro~={{ cookiecutter.kedro_version }}
kedro-telemetry>=0.3.1
pytest-cov~=3.0
pytest-mock>=1.7.1, <2.0
pytest~=7.2
ruff~=0.0.290
# Pin problematic traitlets release - https://github.com/jupyter/notebook/issues/7048
traitlets<5.10.0

0 comments on commit 543fa8b

Please sign in to comment.