diff options
author | Kyle Kelley <rgbkrk@gmail.com> | 2024-05-21 13:35:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 22:35:21 +0200 |
commit | 8698e80304815353ec52be1b16f96483ebe559a0 (patch) | |
tree | 9abd53d5b656cd8cc0c1aa3940684f3ce1d9c8ef /tests/specs/jupyter/install_command_not_exists | |
parent | cc8c0609ebec9f101a1739a0c42c91718ca2abba (diff) |
refactor(jupyter): use runtimelib for Jupyter structures and directory paths (#23826)
This brings in [`runtimelib`](https://github.com/runtimed/runtimed) to
use:
## Fully typed structs for Jupyter Messages
```rust
let msg = connection.read().await?;
self
.send_iopub(
runtimelib::Status::busy().as_child_of(msg),
)
.await?;
```
## Jupyter paths
Jupyter paths are implemented in Rust, allowing the Deno kernel to be
installed completely via Deno without a requirement on Python or
Jupyter. Deno users will be able to install and use the kernel with just
VS Code or other editors that support Jupyter.
```rust
pub fn status() -> Result<(), AnyError> {
let user_data_dir = user_data_dir()?;
let kernel_spec_dir_path = user_data_dir.join("kernels").join("deno");
let kernel_spec_path = kernel_spec_dir_path.join("kernel.json");
if kernel_spec_path.exists() {
log::info!("✅ Deno kernel already installed");
Ok(())
} else {
log::warn!("ℹ️ Deno kernel is not yet installed, run `deno jupyter --install` to set it up");
Ok(())
}
}
```
Closes https://github.com/denoland/deno/issues/21619
Diffstat (limited to 'tests/specs/jupyter/install_command_not_exists')
-rw-r--r-- | tests/specs/jupyter/install_command_not_exists/__test__.jsonc | 8 | ||||
-rw-r--r-- | tests/specs/jupyter/install_command_not_exists/install_command_not_exists.out | 5 |
2 files changed, 0 insertions, 13 deletions
diff --git a/tests/specs/jupyter/install_command_not_exists/__test__.jsonc b/tests/specs/jupyter/install_command_not_exists/__test__.jsonc deleted file mode 100644 index 9552157bd..000000000 --- a/tests/specs/jupyter/install_command_not_exists/__test__.jsonc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "args": "jupyter --install", - "output": "install_command_not_exists.out", - "envs": { - "PATH": "" - }, - "exitCode": 1 -} diff --git a/tests/specs/jupyter/install_command_not_exists/install_command_not_exists.out b/tests/specs/jupyter/install_command_not_exists/install_command_not_exists.out deleted file mode 100644 index 1bb176e20..000000000 --- a/tests/specs/jupyter/install_command_not_exists/install_command_not_exists.out +++ /dev/null @@ -1,5 +0,0 @@ -Warning "deno jupyter" is unstable and might change in the future. -error: Failed to spawn 'jupyter' command. Is JupyterLab installed (https://jupyter.org/install) and available on the PATH? - -Caused by: -[WILDCARD] |