Skip to content

Commit

Permalink
new: dev: #154 Invoke: nb task implemented for Windows systems
Browse files Browse the repository at this point in the history
  • Loading branch information
pietrodantuono committed Apr 21, 2023
1 parent 853ef25 commit ecb014c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions tasks/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand All @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions tasks/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
)
Expand Down

0 comments on commit ecb014c

Please sign in to comment.