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
feat(cli/tools/jupyter) Add --directory flag to control where jupyter kernelspec installs #23595
base: main
Are you sure you want to change the base?
Conversation
…pec installs Closes: denoland#20744 Adds ability to specify the kernelspec location for deno kernel with --directory flag Continued default behavior installs in user's kernelspec folder via jupyter shelling out: `deno jupyter --install` Advanced installs can specify their own path: `deno jupyter --install --directory ~/.kernelspec_custom_location/deno` In the advanced case deno builds and installs the files directly rather than relying on calling out to jupyter to determine path. This is useful in the circumstance where jupyter is not on PATH at time of installing deno jupyter, but it is available and used via a wrapping library.
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.
Looks great! @zph do you need any pointers for adding tests for this functionality?
if !dir.ends_with("deno") { | ||
dir.push("deno"); | ||
} |
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.
Good for the first pass 👍 for the future we might want to derive the name from the current version - eg. in Deno v1.43 this would add deno-v1.43
and for Deno v1.44.2 it would add deno-v1.44
. That would make it very handy managing multiple Deno installations.
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.
@bartlomieju I can try it out and confirm it works, if we want it later, may as well start with that behavior.
This reverts commit 5286f0a.
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Signed-off-by: Zander Hill <zander@xargs.io>
I'll see what I can do and then get feedback. I'll need to find where we're doing a form of end to end testing. So far I only found the struct building tests for JupyterFlags. |
Closes: #20744
Adds ability to specify the kernelspec location for deno's jupyter kernel during install with --directory flag without the requirement of having Jupyter binary on the PATH.
Advanced installs can specify their own path:
deno jupyter --install --dir ~/.kernelspec_custom_location/deno
(Edited from directory -> dir)
Standard installs continue with default behavior by installing in user's kernelspec folder via jupyter shelling out:
deno jupyter --install
In the advanced case deno builds and installs the files directly rather than relying on calling out to jupyter to determine path.
This is useful in the circumstance where jupyter is not on PATH at time of installing deno jupyter, but it is available and used via a wrapping library.
Action Items
cargo test
passes../tools/format.js
passes without changing files../tools/lint.js
passes.all steps, but you can add '[ci]' to a commit message to force it to.
If you would like to run the benchmarks on the CI, add the 'ci-bench' label.