datalayer / rfc

Request for Comments (RFC)
https://datalayer.tech
1 stars 0 forks source link

Jupyter Kernel Parameters #1

Open echarles opened 9 months ago

echarles commented 9 months ago

The goal is to allow the

A POC (2,5 years ago, see https://github.com/jupyter/jupyter_client/pull/612#issuecomment-886686237) has been achieved and need the following changes (in jupyter-server, jupyter-client and jupyterlab):

126992664-b791dacd-d121-4616-b197-7b86460f1c59

For this POC, the Kernelspec has been updated to add a JSON Schema as additional attribute to the kernel_provisioner stanza. One important aspect of this RFC is to agree on the format of the kernelspec (it may sound more adequate to have the JSON schema under a top parameters stanza.

{
 "argv": [
  "python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}",
  "--cache-size={cache_size}",
  "--matplotlib={matplotlib}"
 ],
 "display_name": "Python 3 (ipykernel)",
 "language": "python",
 "metadata": {
   "debugger": true,
   "metadata": {
      "kernel_provisionners": {
        "provisioner_name": "local-provisioner",
        "config": {
          "title": "IPyKernel",
          "type": "object",
          "properties": {
            "cache_size": {
              "type": "integer",
              "description": "Set the size of the output cache.",
              "default": 1000,
              "minimum": 0,
              "maximum": 50000
            },
            "matplotlib": {
              "type": "string",
              "description": "Configure matplotlib for interactive use with the default matplotlib backend.",
              "default": "auto",
              "enum": ["auto", "agg", "gtk", "gtk3", "gtk4", "inline", "ipympl", "nbagg", "notebook", "osx", "pdf", "ps", "qt", "qt4", "qt5", "qt6", "svg", "tk", "webagg", "widget", "wx"]
            }
          }
        }
      }
   }
 }

Prior Art

JEP

JupyterLab

Jupyter Client

Kernel Manager

Kernel Provisonner

Jupyter Server

echarles commented 9 months ago

@fcollonval @zsailer @lresende @blink1073