Feature request: allow users to specify a setup shell script/batch file to install additional kernels and engines

Open
#136 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
julia, jupyter, python, r, rust, shell
Domain
cli, tooling

Research direction

The issue names no implementation files or tests. Start by locating the entry point that invokes quarto render or quarto preview, then review how platform-specific commands are handled. Done means setup commands can be supplied through a shell or batch file and run before rendering for the listed kernel and engine examples.

Written by the indexing model from the issue text.

Description

Most alternative jupyter kernels/Quarto engines only usually only require running a few lines of setup code.

Could you allow users to specify such code in say an ir-setup.sh/ir-setup.bat file (or whatever name you prefer) - you could then run that file before the quarto render/quarto preview call.

For example,

  • With ark, you need to download then run the install command
    # Download a release from https://github.com/posit-dev/ark/releases
    ark --install
    
  • For the IRkernel you'd need the IRkernel R package and its setup line
    R -e "install.packages('IRkernel'); IRkernel::installspec()"
    
  • With the nbstata Stata kernel, you need the nbstata Python package and then a Python command run within that environment
    # activate venv
    uv pip install nbstata
    python3 -m nbstata.install # --sys-prefix
    
  • For the julia jupyter kernel install Julia with say juliaup then install the IJulia package within Julia
    juliaup self update
    juliaup default release
    julia -e 'using Pkg; Pkg.add("IJulia")'
    
  • I guess for Quarto docs with engine: julia you just need to make sure Julia is installed with juliaup and then I think Quarto auto installs the engine if it's not there
    juliaup self update
    juliaup default release
    

(etc., you get the idea)

Dominant language
Rust
Stars
66
Forks
2
Avg merge
3h 22m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/ir

All issues in r-lib/ir

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.