Commit graph

19 commits

Author SHA1 Message Date
Nathaniel Nicandro
e133c34707 Add do prefix to launch,shutdown,interrupt functions of a kernel
launch,shutdown,interrupt are now monadic functions.
2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
e6dd933801 jupyter-kernel-process-io 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
d57eff4fa0 jupyter--kernel-processes: Update documentation 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
7346571275 Discard I/O connection on shutdown 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
357cc08856 jupyter-kernel-process.el: Update to use publisher/subscribers 2023-02-13 20:22:50 -06:00
Nathaniel Nicandro
d4d1e1e48c Fix byte compiler warnings for jupyter--kernel-processes 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
d18c41c9af Doc changes on jupyter--kernel-processes 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
f534172049 Remove jupyter--kernel-died-process-sentinel
Replace with a function passed to `jupyter-launch`

- Getting wrong number of argument errors on the method
- Also mention that the `jupyter-kernel-died` function should have
  been called only when the process status is signal.
2023-02-13 20:22:49 -06:00
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