Commit graph

11 commits

Author SHA1 Message Date
Nathaniel Nicandro
874cc9c043 Remove the process slot of a jupyter-kernel-process
Since the `jupyter--kernel-processes` list exists it is redundant.
2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
4c2752ef3b Add jupyter-run-handlers macro 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
7a52f6240d Update jupyter-kernel-process test 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
140284de80 Re-word doc of jupyter--kernel-processes 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
dc91912d5b Remove duplicated use of jupyter-session-with-random-ports
This is already done in `jupyter-launch`.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
9b2a66868a IO function and connections 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
eba2bcc280 Move initialization of ioloop into the context of the connection 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
5d6dd04949 Remove duplicated function call
* jupyter-kernel-process.el (jupyter-connection): Do it.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
f2c9d5fb25 Convert jupyter-kernel into a method
* jupyter-kernel-process.el
* jupyter-server-kernel.el (jupyter-kernel): New method.

* jupyter-kernel.el (jupyter-kernel): Convert.  Load files that handle
  keywords and re-dispatch when ARGS does not have any connection
  info.  Document behavior.

* test/test-helper.el (jupyter-test-with-kernel-client)
* jupyter-server.el
(jupyter-connect-server-repl)
(jupyter-server-start-new-kernel): Use `jupyter-kernel`.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
a33231b4d3 Rename many methods 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
95f3e150b4 Add jupyter-kernel.el and related
The new files added in this commit will eventually replace the manager
and kernel classes and favor struct types to represent kernels instead
of classes.  A kernel manager was a concept ripped from the
jupyter/jupyter_client reference implementation.

In Emacs the concept makes the client implementation more complicated
and is replaced by functions that manage the lifetime of a kernel:
`jupyter-launch`, `jupyter-shutdown`, and `jupyter-interrupt`.

* jupyter-kernel-manager.el
* jupyter-kernel-process-manager.el
* jupyter-server.el
* test/jupyter-server-test.el
* test/test-helper.el: Make `jupyter-kernel`, `jupyter-server-kernel`,
  and `jupyter-kernel-process` private classes.  The new files below
  use the public names, but as structs now.

* jupyter-kernel.el
* jupyter-kernel-process.el
* jupyter-server-kernel.el: New files.
2023-02-13 20:21:14 -06:00