1. 08 Oct, 2019 6 commits
    • Ludovic Courtès's avatar
      guile: Actually handle "shutdown_request". · 1ccc88b0
      Ludovic Courtès authored
      * jupyter/guile.scm (dispatch-route): Change "shutdown" to
      * tests/guile.scm ("kernel_info_request")
      ("execute_request", "execute_request, exception"): Send
      "shutdown_request", not "shutdown".
    • Ludovic Courtès's avatar
      kernel: Don't mount '%network-file-systems' in the container. · a8a4a4a2
      Ludovic Courtès authored
      * guix/jupyter/kernel.scm (%network-file-systems): Remove.
      (spawn-kernel/container)[mounts]: Remove %NETWORK-FILE-SYSTEMS.
      * guix/jupyter/containers.scm (eval/container*)[run-guile]: Create /etc.
    • Ludovic Courtès's avatar
      kernel: Add ";;guix download" magic. · c8e679ce
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (link/copy, handle-download): New procedures.
      (reply-execute-request): Handle ";;guix download".
      (%magic-commands): New variable.
      (reply-complete-request): Honor it.
      * guix-kernel-demo.ipynb: Add example.
    • Ludovic Courtès's avatar
      kernel: Record the kernel's directory and home directory. · 8b59a735
      Ludovic Courtès authored
      * guix/jupyter/kernel.scm (spawn-kernel/container)[mounts]: Take 'home'
      instead of 'root'.  Adjust 'device' field accordingly.
      Call 'set-kernel-properties' to record the kernel's root and home
    • Ludovic Courtès's avatar
      kernels: Add 'properties'. · f4d19593
      Ludovic Courtès authored
      * jupyter/kernels.scm (<kernel>)[properties]: New field.
      (kernel): Add #:properties.
    • Ludovic Courtès's avatar
      kernel: Provide kernels with a writable /home/jupyter. · 45d4e2f7
      Ludovic Courtès authored
      * guix/jupyter/kernel.scm (make-container-root-directory): Rename to...
      (make-container-directory): ... this. Create "root" and "home" sub-directories.
      (spawn-kernel/container)[spawn]: Set "HOME" and chdir to /home/jupyter.
      [fs]: Rename to...
      [mounts]: ... this, and add bind-mount for "/home/jupyter".
  2. 07 Oct, 2019 1 commit
  3. 04 Oct, 2019 1 commit
    • Ludovic Courtès's avatar
      Move kernel-in-container execution to (guix jupyter kernel). · 99f5b5b4
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (session-id): Remove.
      (create-environment): Call 'spawn-kernel/container' instead of
      'start-container', and remove 'name' argument.
      (%network-file-systems, module-to-import?, start-container): Move to...
      * guix/jupyter/kernel.scm: ... here.
      (start-container): Rename to...
      (spawn-kernel/container): ... this.  Remove 'name' parameter.  Call
      'make-container-root-directory' to create the root directory of the
      (make-container-root-directory): New procedure.
  4. 03 Oct, 2019 4 commits
    • Ludovic Courtès's avatar
      Add ";;guix pin" magic. · d981e1a5
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (channels->shtml, reply-for-channels)
      (reply-for-channel-failure): New procedures.
      (reply-execute-request): Handle ";;guix pin".
      (reply-complete-request): Complete ";;guix pin".
      * guix-kernel-demo.ipynb: Add ";;guix pin" example.
    • Ludovic Courtès's avatar
      environment: 'specification->manifest-entry' properly matches the empty list. · aa57c901
      Ludovic Courtès authored
      * guix/jupyter/environment.scm (specification->manifest-entry): Change
      first clause to the empty list.
    • Ludovic Courtès's avatar
      Make the current inferior a <proxy-state> property. · 7e4ae57f
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (%inferior-property): New variable.
      (proxy-state-inferior, set-proxy-state-inferior)
      (ensure-proxy-state-inferior): New procedures.
      (%inferior): Remove.
      (create-environment): Call 'proxy-state-inferior' instead of refering to
      (reply-execute-request): Call 'ensure-proxy-state-inferior' before
      calling 'create-environment'.
      (reply-complete-request): Call 'ensure-proxy-state-inferior' before
      calling 'inferior-available-packages'.  Return the new state.
    • Ludovic Courtès's avatar
      Handle 'inspect_request' messages. · aedb7e6f
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (environment-from-magic): New procedure, moved
      (reply-complete-request)[environment-from-magic]: ... here.  Remove.
      (reply-inspect-request): New procedure.
      (dispatch-route): Add it.
  5. 01 Oct, 2019 2 commits
  6. 30 Sep, 2019 4 commits
  7. 27 Sep, 2019 3 commits
  8. 26 Sep, 2019 3 commits
    • Ludovic Courtès's avatar
      messages: Add <execute-input>. · a038906c
      Ludovic Courtès authored
      * jupyter/messages.scm (<execute-input>): New record type.
    • Ludovic Courtès's avatar
      messages: Add <execute-request>. · 591d5814
      Ludovic Courtès authored
      * jupyter/messages.scm (<execute-request>): New record type.
      * guix-jupyter-kernel.scm (reply-execute-request): Use it.
      * tests/kernels.scm ("execute_request"): Likewise.
    • Ludovic Courtès's avatar
      messages: Add <kernel-status>. · b23ee453
      Ludovic Courtès authored
      * jupyter/messages.scm (<kernel-status>): New record type.
      * jupyter/kernels.scm (pub): Expect a <kernel-status> record and use
      (pub-busy, pub-idle): Pass a <kernel-status> record.
      * tests/kernels.scm ("run-kernel python3")
      ("kernel_info_request", "execute_request"): Use 'json->kernel-status'
      instead of alists.
  9. 24 Sep, 2019 11 commits
  10. 23 Sep, 2019 1 commit
    • Ludovic Courtès's avatar
      messages: Use a larger buffer for incoming messages. · 78d429fe
      Ludovic Courtès authored
      This "fixes" the Matplotlib example.  Previously, we'd silently truncate
      the "display_data" message containing the plot as we forwarded it,
      resulting in breakage down the road.
      * jupyter/messages.scm <top level>: Add call to 'zmq-set-buffer-size'.
  11. 20 Sep, 2019 4 commits
    • Ludovic Courtès's avatar
      Update example. · 04635011
      Ludovic Courtès authored
      * guix-kernel-demo.ipynb: Update.
    • Ludovic Courtès's avatar
      Don't spawn a default environment upfront. · beb421ac
      Ludovic Courtès authored
      This ensures we reply to "kernel_info_request" in a timely fashion, and
      that we don't spawn a useless environment.  It also allows the user to
      not repeat ";;guix run my-env" in subsequent cells since the default
      environment is now recorded across cells.
      * guix-jupyter-kernel.scm (%default-environment-property): New variable.
      (proxy-state-default-environment, set-proxy-state-default-environment):
      New procedures.
      (create-environment): Call 'set-proxy-state-default-environment'.
      (reply-execute-request): Use the environment returned by
      'proxy-state-default-environment'.  Print an error as HTML when it's
      <top level>: Remove call to 'start-container' for the "default"
    • Ludovic Courtès's avatar
      kernels: 'spawn-kernel' searches for executables in $PATH. · def14612
      Ludovic Courtès authored
      * jupyter/kernels.scm (spawn-kernel): Use 'execlp' instead of 'exec'.
      This is useful notably for "irkernel", which just says "R" without an
      absolute file name.
    • Ludovic Courtès's avatar
      Terminate and unregister existing proxy when recreating an environment. · f115d70a
      Ludovic Courtès authored
      * guix/jupyter/proxy.scm (unregister-proxied, terminate-proxied-kernel):
      New procedures.
      * guix-jupyter-kernel.scm (reply-execute-request): When 'lookup-proxied'
      returns true, call 'unmonitor-client' and 'terminate-proxied-kernel',
      and then 'create-environment'.