From ecb014c7a5507774cc941c1e9348d8c1d9383736 Mon Sep 17 00:00:00 2001 From: Pietro D'Antuono Date: Fri, 21 Apr 2023 17:13:19 +0200 Subject: [PATCH] new: dev: #154 Invoke: nb task implemented for Windows systems --- tasks/notebook.py | 14 +++++++++++--- tasks/test.py | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tasks/notebook.py b/tasks/notebook.py index e7be2ec..bb9a973 100644 --- a/tasks/notebook.py +++ b/tasks/notebook.py @@ -54,7 +54,7 @@ def start(c_r): color=Color.HEADER, bold=True ) - with c_r.cd("./jupyter-notebooks"): + with c_r.cd("./jupyter-notebooks"): if SYSTEM in [OperatingSystem.LINUX, OperatingSystem.MAC]: with c_r.prefix("export JUPYTER_CONFIG_DIR=../.jupyter"): _command = ( @@ -66,9 +66,17 @@ def start(c_r): print(f">>> {colorize(_command, color=Color.OKBLUE)}\n") elif SYSTEM == OperatingSystem.WINDOWS: _command = ( - f"wt -d . jupyter notebook --port={c_r.start_port} " - "--no-browser" + "wt -d ./jupyter-notebooks jupyter notebook " + f"--port={c_r.start_port} --no-browser" + ) + print( + colorize( + "Notebook server is not attached to this terminal process." + " Close windows terminal instance instead.", + color=Color.WARNING, + ) ) + print(f"{tmp_str}") c_r.run(_command) print(f">>> {colorize(_command, color=Color.OKBLUE)}\n") diff --git a/tasks/test.py b/tasks/test.py index 32d6621..b78a648 100644 --- a/tasks/test.py +++ b/tasks/test.py @@ -90,8 +90,8 @@ def stop(c_r): elif SYSTEM == OperatingSystem.WINDOWS: print( colorize( - "Coverage server is not attached to this process. " - "Close windows terminal instance instead", + "Coverage server is not attached to this terminal process. " + "Close windows terminal instance instead.", color=Color.WARNING, ) )