-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(jupyter): use runtimelib for Jupyter structures and directory paths #23826
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rgbkrk
force-pushed
the
jupyter-runtimelib
branch
7 times, most recently
from
May 15, 2024 21:06
8e886da
to
6747162
Compare
rgbkrk
force-pushed
the
jupyter-runtimelib
branch
8 times, most recently
from
May 16, 2024 16:50
78b41de
to
d573de6
Compare
rgbkrk
changed the title
refactor(jupyter): use runtimelib for Jupyter structs
refactor(jupyter): use runtimelib for Jupyter structures and directory paths
May 16, 2024
11 tasks
bartlomieju
reviewed
May 16, 2024
Closed
7 tasks
rgbkrk
force-pushed
the
jupyter-runtimelib
branch
2 times, most recently
from
May 17, 2024 02:20
0135cb7
to
b0bf650
Compare
rgbkrk
commented
May 17, 2024
littledivy
reviewed
May 17, 2024
rgbkrk
force-pushed
the
jupyter-runtimelib
branch
from
May 17, 2024 16:36
b0bf650
to
128b4ee
Compare
rgbkrk
force-pushed
the
jupyter-runtimelib
branch
from
May 17, 2024 20:58
128b4ee
to
dd508bd
Compare
bartlomieju
reviewed
May 20, 2024
bartlomieju
approved these changes
May 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we went through this PR during a call and clarified all the details.
This PR moves a lot of code related to zeromq handling to a separate library and opens up a possibility for several refactors that would unblock even more features in the Jupyter kernel.
bartlomieju
pushed a commit
that referenced
this pull request
May 21, 2024
…y 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 #21619
bartlomieju
pushed a commit
that referenced
this pull request
May 21, 2024
…y 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 #21619
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This brings in
runtimelib
to use:Fully typed structs for Jupyter Messages
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.
Closes #21619
I tested this out across all the notebooks in https://github.com/rgbkrk/denotebooks, which was also a great chance for me to switch them all to
jsr:
wherever possible. Update: anywidget is also working (cc @manzt)!