Skip to content

Improve the wrapper kernel experience for downstreams  #28

Open
@bollwyvl

Description

@bollwyvl

Problem

Today, it's possible to reuse the kernel labextension to get up to something that runs on top of all of the pyodide machinery, but it's still pretty non-trivial.

Upstream, ipykernel provides KernelBase, which makes it quite easy to depend on ipykernel, and create another, separately-branded kernel which only has to override the parts you want (or the full IPyKernel).

Proposed Solution

In this repo, or a new one, add, document, and test a cookiecutter or copier that makes it easier to build new, PyPI- and npm-distributable kernels that depend on jupyterlite-pyodide-kernel.

Additional context

The two in-the-wild downstream kernels I've worked on are

Today, they still pretty much need to be hard forks, but with the split from jupyterlite(_core), it should be much easier to do this simply now.

If in a new repo, it might be a bit simpler, but runs the risk of getting out-of-date.

If this was included in-tree, it could be tested (up to CI, which is tricky without act-in-GHA, which is kinda nasty). copier makes it a good deal easier to properly package these things, and could be made to extend the as-shipped CLI (behind an [extra], i guess).

A Future Family Tree of Kernels

flowchart LR

classDef abstract stroke-dasharray:4px

kernel:::abstract --> worker:::abstract --> js --> pyodide

js --> p5
worker --> xeus-*
kernel --> webr
pyodide --> pidgy
pyodide --> robot
pyodide --> lite-builder[#33: lite-in-pyodide]
kernel --> remote:::abstract
remote --> binder

subgraph third-party
    pidgy
    robot
    webr
    remote
    binder
end

subgraph legend
    abstract[abstract\nimplementation]:::abstract
end
Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions