1. 26 Jul, 2021 2 commits
  2. 06 Jul, 2021 2 commits
  3. 24 Jan, 2021 3 commits
  4. 23 Jan, 2021 7 commits
    • Ludovic Courtès's avatar
      kernels: Rename 'sxml->html-string' to 'sxml->xml-string'. · 9dca44b5
      Ludovic Courtès authored
      * jupyter/kernels.scm (sxml->html-string): Rename to...
      (sxml->xml-string): ... this.
      (reply-shtml): Adjust accordingly.
      * guix-jupyter-kernel.scm (reply-for-environment-kernel): Likewise.
      * guix/jupyter/kernel.scm (build-event-reporter)
      (call-with-build-progress-report): Likewise.
    • Ludovic Courtès's avatar
      kernels: Change 'reply-html' to 'reply-shtml'. · d9497412
      Ludovic Courtès authored
      * jupyter/kernels.scm (sxml->html-string): New procedure.
      (reply-html): Rename to...
      (reply-shtml): ... this.  Expect SHTML instead of HTML and adjust
      accordingly.  Adjust all callers.
      * guix/jupyter/kernel.scm (sxml->html-string): Remove.
      * guix-jupyter-kernel.scm (sxml->html-string): Remove.
    • Ludovic Courtès's avatar
      kernel: Gracefully handle package-not-found errors. · 943c9aff
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (reply-execute-request): Wrap
      'create-environment' calls in 'guard' and send a proper HTML reply upon
      'package-not-found-error?' and 'output-not-found-error?'.
      * guix/jupyter/environment.scm (&environment-error)
      (&package-not-found-error, &output-not-found-error): Export accessors.
    • Ludovic Courtès's avatar
      kernel: Correctly deal with invalid base16 strings in ";;guix download". · 72d838cd
      Ludovic Courtès authored
      Previously we'd end up with an uncaught exception.
      * guix-jupyter-kernel.scm (handle-download): Wrap
      'base16-string->bytevector' in 'false-if-exception'.
    • Ludovic Courtès's avatar
      kernel: Fix completion of magic commands. · 60a3e5c7
      Ludovic Courtès authored
      Until now, ";;guix d<TAB>" would always return the whole list of magic
      commands instead of returning just "describe" and "download".
      * guix-jupyter-kernel.scm (reply-complete-request): Filter
      %MAGIC-COMMANDS whose prefix is COMMAND.
    • Ludovic Courtès's avatar
      kernel: Report build progress for ";;guix pin". · 0062a5fa
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (reply-execute-request): Use
      'cached-channel-instance' instead of 'inferior-for-channels'.  Use
    • Ludovic Courtès's avatar
      kernel: Report build progress via "display_data" messages. · 3ca22d80
      Ludovic Courtès authored
      * guix/jupyter/kernel.scm (sxml->html-string, build-event-reporter)
      (call-with-build-progress-report): New procedures.
      (with-build-progress-report): New macro.
      * guix-jupyter-kernel.scm (create-environment): Use
      <top level>: Add call to 'set-build-options'.
  5. 22 Jan, 2021 2 commits
    • Ludovic Courtès's avatar
      kernel: Add ";;guix search" magic. · f67aa2be
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (search-inferior-packages)
      (reply-search-results): New procedures.
      (reply-execute-request): Handle ";;guix search".
      (%magic-commands): Add "search".
      * README.org (Searching for packages): New section.
    • Ludovic Courtès's avatar
      kernel: Handle ";;guix describe" magic. · ef1c3bd1
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (channels->shtml): Move heading to...
      (reply-for-channels): ... here.
      (reply-channel-description): New procedure.
      (reply-execute-request): Handle ";;guix describe".
      (%magic-commands): Add "describe".
  6. 21 Jan, 2021 3 commits
    • Ludovic Courtès's avatar
      kernel: Obtain and display channel info from the inferior. · bd768e25
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (reply-for-channels): Add #:profile parameter
      and honor it.
      (reply-execute-request): Call 'inferior-eval' and pass #:profile to
    • Ludovic Courtès's avatar
      Switch to Guile-JSON 4.x. · 1af3c087
      Ludovic Courtès authored
      * environment.scm <propagated-inputs>: Update to GUILE-JSON-4.
      * jupyter/json.scm: Use (json parser) instead of (json).  Explain the
      difference with what Guile-JSON provides.
      * guix-jupyter-kernel.scm: Use (json parser) and (json builder) instead
      of (json).
      * guix/jupyter/kernel.scm: Likewise.
      * guix/jupyter/proxy.scm: Likewise.
      * jupyter/guile.scm: Likewise.
      * jupyter/kernels.scm: Likewise.
      * jupyter/messages.scm: Likewise.
      * jupyter/servers.scm: Likewise.
      * tests/guile.scm: Likewise.
      * tests/kernels.scm: Likewise.
      * tests/servers.scm: Likewise.
      * configure.ac: Check for (json parser) rather than JSON.
    • Ludovic Courtès's avatar
      kernel: Log startup. · d41d8c5f
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm <top level>: Log kernel startup.
  7. 07 Jan, 2020 1 commit
  8. 10 Oct, 2019 1 commit
  9. 08 Oct, 2019 1 commit
    • 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.
  10. 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.
  11. 03 Oct, 2019 3 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
      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.
  12. 30 Sep, 2019 1 commit
    • Ludovic Courtès's avatar
      Add support for a built-in Guile kernel. · 1da53a23
      Ludovic Courtès authored
      * jupyter/kernels.scm (jupyter-kernel-path, kernel-specs): Export.
      * jupyter/guile.scm (guile-kernel-specs, available-kernel-specs-files):
      New procedures.
      * guix-jupyter-kernel.scm (create-environment): Use
      'available-kernel-specs' instead of 'available-kernel-specs-files' and
      adjust accordingly.
      (start-container)[spawn]: Likewise.
      * guix-kernel-demo.ipynb: Add example.
  13. 26 Sep, 2019 1 commit
    • 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.
  14. 24 Sep, 2019 7 commits
    • Ludovic Courtès's avatar
      Complete package names. · f8d0fcbb
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (reply-complete-request): Handle package name
      completion after "guix environment _ <-".
    • Ludovic Courtès's avatar
      Handle "complete_request" messages. · 8b69cc62
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (reply-complete-request): New procedure.
      (dispatch-route): Add it.
    • Ludovic Courtès's avatar
      Strip magic commands before forwarding "execute_request" messages. · ce48e279
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (execute-request-sans-magic): New procedure.
      (reply-execute-request): In ";;guix environment NAME" requests, call it.
    • Ludovic Courtès's avatar
      Use 'match' to match on all the magic commands. · c98bb877
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (reply-execute-request): Use 'match' to
      dispatch among all the magic, getting rid of (guix jupyter magic).
    • Ludovic Courtès's avatar
      Remove references to 'guix-kernel exceptions. · e58b8b27
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (error->shtml, error->html): Remove.
      (reply-execute-request): Remove catch for 'guix-kernel exceptions.
    • Ludovic Courtès's avatar
      Use 'sxml->html-string' some more. · e1cea845
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (reply-for-environment): Use
    • Ludovic Courtès's avatar
      Get rid of ";;guix kernel" and ";;guix run". · c4e9ee3f
      Ludovic Courtès authored
      We now automatically spawn the kernel found in the environment instead
      of running the "inner proxy".  That simplifies code (the inner proxy is
      no longer used) and simplifies usage (no need to remember to do ";;guix
      kernel" once you have set up the environment.)
      * guix-jupyter-kernel.scm (reply-for-environment-kernel): New
      (create-environment): Build the profile from MANIFEST, and call
      'available-kernel-specs-files' in there.  Return an error message if we
      didn't find exactly one kernel spec.
      (reply-execute-request): Support ";;guix environment NAME" magic.
      Remove support for 'magic-run?' and 'magic-kernel?'.
      (start-container): Take a profile rather than a manifest.
      [spawn]: Use 'available-kernel-specs-files' and 'exec-kernel' rather
      than 'run-inner-proxy'.
      * guix/jupyter/magic.scm (magic-env?): Adjust accordingly.
      * guix-kernel-demo.ipynb: Update.
  15. 20 Sep, 2019 2 commits
    • 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
      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'.
  16. 19 Sep, 2019 3 commits
    • Ludovic Courtès's avatar
      Environment contents are now displayed by the kernel. · f985eaac
      Ludovic Courtès authored
      The kernel has access to the manifest, so it can display its actual
      contents (including version numbers) upfront, before the environment is
      * guix/jupyter/inner-proxy.scm (kernel-info->shtml)
      (kernel-info->html): Remove.
      (reply-execute-request): Simply reply "Done!".
      * guix-jupyter-kernel.scm (manifest->shtml)
      (reply-for-environment, create-environment): New procedures.
      (reply-execute-request): Call 'create-environment'.
    • Ludovic Courtès's avatar
      Pass the store connection as a state property. · 647d5afd
      Ludovic Courtès authored
      * guix-jupyter-kernel.scm (%store-property): New variable.
      (proxy-state-store): New procedure.
      (reply-execute-request): Use it instead of using 'with-store'.
      (kernel): Use 'with-store' and pass the store as a state property.
    • Ludovic Courtès's avatar
      Add (guix jupyter inner-proxy). · 1201d247
      Ludovic Courtès authored
      * guix-jupyter-container.scm: Rename to...
      * guix/jupyter/inner-proxy.scm: ... this, and turn into a module.
      * Makefile.am (SOURCES): Add 'inner-proxy.scm' and remove
      * guix-jupyter-kernel.scm (container-path): Remove.
      (start-container)[spawn]: Use (guix jupyter inner-proxy).