Commit graph

1481 commits

Author SHA1 Message Date
Nathaniel Nicandro
0b970e857d Add jupyter-eval-short-result-max-lines to README 2019-05-21 18:43:45 -05:00
Nathaniel Nicandro
4aff8ae975 jupyter-eval-defun: Don't error if no function exists at point 2019-05-21 18:31:14 -05:00
Nathaniel Nicandro
3a6aa0f840 .travis.yml: Fix core dump command 2019-05-20 23:44:21 -05:00
Nathaniel Nicandro
7429755f39 Add jupyter-display-current-buffer-guess-where 2019-05-20 23:14:18 -05:00
Nathaniel Nicandro
b5ea944d05 Update README and CHANGELOG 2019-05-20 22:46:46 -05:00
Nathaniel Nicandro
e05ef4f8d5 org-babel-jupyter-initiate-session-by-key: Support remote kernel starts 2019-05-20 22:46:46 -05:00
Nathaniel Nicandro
e9f7683d68 .travis.yml: Show core dump when it happens
From http://jsteemann.github.io/blog/2014/10/30/getting-core-dumps-of-failed-travisci-builds/
2019-05-20 22:03:56 -05:00
Nathaniel Nicandro
24b6dbadac Add test for `jupyter-locate-python' 2019-05-20 18:17:51 -05:00
Nathaniel Nicandro
7bb7e46e1f jupyter-start-kernel (jupyter-command-kernel): Change wording of comment 2019-05-20 17:34:32 -05:00
Nathaniel Nicandro
edf3097b04 org-babel-jupyter-override-src-block: Be more robust
Fixes #118
2019-05-20 14:52:26 -05:00
Nathaniel Nicandro
240dc7ab08 org-babel-expand-body:jupyter: Correct arguments to language specific expander
The language specific expander only expects (BODY PARAMS)
2019-05-19 23:16:46 -05:00
jackkamm
1befd70e98 Handle isolated metadata property for HTML results of the R kernel (#115) 2019-05-19 22:40:51 -05:00
Nathaniel Nicandro
8a74e030db Update CHANGELOG 2019-05-19 19:56:20 -05:00
Nathaniel Nicandro
7554293d18 Add bindings for jupyter-repl-history-(previous|next)-matching
These are the same bindings as found in `comint-mode`
2019-05-19 19:39:11 -05:00
Nathaniel Nicandro
d7757d6de4 jupyter-repl-history--rotate: Handle an empty history 2019-05-19 19:34:07 -05:00
poppyschmo
b7b0162572 Add prev/next-matching REPL-input-history commands (#108) 2019-05-19 19:13:14 -05:00
Nathaniel Nicandro
005f2e30bf jupyter-with-display-buffer: Let bind jupyter-current-client
Since `jupyter-current-client` is a buffer local variable, its value inside the
display buffer is always `nil` when we usually want it to take on the value it
has before this macro is called.
2019-05-19 00:40:12 -05:00
Nathaniel Nicandro
111d105b51 Add jupyter-repl-history-add tests 2019-05-18 20:35:28 -05:00
Nathaniel Nicandro
107fa8042d Generalize jupyter-repl-history navigation functions 2019-05-18 20:35:28 -05:00
Nathaniel Nicandro
ff0a228939 jupyter-command: Return nil if command fails 2019-05-13 12:27:47 -05:00
Nathaniel Nicandro
497ba05aa5 Skip jupyter-write-connect-file test on Windows 2019-05-13 12:23:02 -05:00
Nathaniel Nicandro
d8e3408856 Guard against missing status messages when requesting kernel info 2019-05-13 12:23:02 -05:00
Nathaniel Nicandro
18f108f144 Use jupyter-ert-info in jupyter-repl-prompts test 2019-05-13 12:23:02 -05:00
Nathaniel Nicandro
d01dd82713 Once again increase timeouts during tests 2019-05-13 12:23:02 -05:00
Nathaniel Nicandro
b6d221c835 Be more diligent with processes used during testing 2019-05-13 12:21:59 -05:00
Nathaniel Nicandro
db3bf0b681 Add FIXME for jupyter-shutdown-kernel 2019-05-13 12:07:22 -05:00
Nathaniel Nicandro
3705243179 jupyter-start-kernel (jupyter-kernel-process): Don't verify executable path
Doesn't work on remote hosts since `executable-find` is only meant for the
local Emacs instance.
2019-05-13 12:07:22 -05:00
Nathaniel Nicandro
904434c510 jupyter-locate-python: Always return the file-local-name of the path 2019-05-13 12:01:13 -05:00
Nathaniel Nicandro
4c7b7d61cd appveyor.yml: Use ert-runner batch script 2019-05-12 18:00:39 -05:00
Nathaniel Nicandro
a775ac29bd Add jupyter-comm-client-loop 2019-05-11 09:48:08 -05:00
Nathaniel Nicandro
dae02fa7d4 jupyter-interrupt-kernel: Don't use a signal when its not possible 2019-05-11 09:48:08 -05:00
Nathaniel Nicandro
eaf6478aa3 jupyter-make-client: Do boilerplate in less specialized methods 2019-05-11 09:48:08 -05:00
Nathaniel Nicandro
0f06ea1407 Add jupyter-kernel-lifetime test 2019-05-10 17:28:04 -05:00
Nathaniel Nicandro
c9abe85be7 jupyter-available-kernelspecs: Fix for remote hosts 2019-05-09 21:41:26 -05:00
Nathaniel Nicandro
d7ce2b0c38 jupyter-repl-preserve-window-margins: Remove superfluous doc 2019-05-09 20:10:49 -05:00
Nathaniel Nicandro
f7b0ab2bc1 Rework jupyter-requests-pending-p test
Getting failures on Appveyor
2019-05-09 20:10:49 -05:00
Nathaniel Nicandro
ea8176d6fa jupyter-start-new-kernel: Remove unreliable jupyter-wait-until-startup 2019-05-09 20:10:49 -05:00
Nathaniel Nicandro
099d2b6511 jupyter-start-kernel (jupyter-command-kernel): Directly use Jupyter's python
instead of relying on the `jupyter kernel` command
2019-05-09 20:10:49 -05:00
Nathaniel Nicandro
258d1edfdb Shutdown kernel after jupyter-command-kernel test 2019-05-09 19:49:45 -05:00
Nathaniel Nicandro
f158f10c12 jupyter-start-kernel (jupyter-kernel-process): Display process arguments 2019-05-09 19:49:45 -05:00
Nathaniel Nicandro
ac7ed04488 appveyor.yml: Swap stderr and stdout when running cask 2019-05-09 19:49:45 -05:00
Nathaniel Nicandro
3f0a4b7829 Make jupyter-write-connection-file test more reliable 2019-05-09 19:49:45 -05:00
Nathaniel Nicandro
7945b6f444 jupyter-available-kernelspecs: Use --json argument to jupyter command 2019-05-09 19:49:18 -05:00
Nathaniel Nicandro
b715ada492 Always name method arguments
If method arguments are not named it gives rise to errors like

    `Args out of range: "", 0`

that originate in `help-function-arglist` when calling `describe-function` on
those methods.
2019-05-09 13:32:45 -05:00
Nathaniel Nicandro
64d9c773df Make jupyter-weak-ref test more reliable 2019-05-09 12:51:00 -05:00
Nathaniel Nicandro
eb3708fa0c .travis.yml: Limit output when installing Emacs 2019-05-09 12:50:00 -05:00
Nathaniel Nicandro
3628cab446 Refactor of jupyter-kernel-manager.el
This refactor implements a new class hierarchy to manage the lifetime of a
Jupyter kernel. The first node in this hierarchy is the
`jupyter-kernel-lifetime` class which defines a set of methods to manage the
lifetime of a kernel. An object that inherits from `jupyter-kernel-lifetime` is
stating that it has an association with a kernel and can be used to manage the
lifetime of the associated kernel.

The `jupyter-meta-kernel` class inherits from `jupyter-kernel-lifetime` and
mainly defines a `spec` slot used to hold the `kernelspec` from which a command
can be constructed to start a kernel and a `session` slot used to hold the
`jupyter-session` object that clients can use to establish communication with a
kernel once its live. Concrete classes that actually launch kernels are
intended to inherit from this class and use its slots.

`jupyter-kernel-process` manages the lifetime of a kernel started as a process
using the function `start-file-process`, `jupyter-command-kernel` calls the
`jupyter kernel` shell command to start a kernel, finally `jupyter-spec-kernel`
uses the `spec` slot to construct a shell command to start a kernel.

A `jupyter-kernel-manager` now consists of a `kernel` slot that holds a
`jupyter-meta-kernel` and a `control-channel` slot and inherits from
`jupyter-kernel-lifetime`. The `jupyter-kernel-lifetime` methods of the manager
just defer to those of `kernel` while also taking into account the
`control-channel`.

* jupyter-base.el (jupyter-write-connection-file): New function.

* jupyter-channel-ioloop.el
(jupyter-channel-ioloop-add-start-channel-event): Remove `sleep-for` call.
The startup message is not so important anymore.

* jupyter-client.el (jupyter-wait-until-startup: New function.

* jupyter-kernel-manager.el (jupyter-kernel-lifetime)
(jupyter-kernel, jupyter-kernel-process, jupyter-command-kernel)
(jupyter-spec-kernel): New classes.
(jupyter-kernel-manager): Inherit from jupyter-kernel-lifetime only and
implement its methods.
(jupyter-kernel-manager--cleanup, jupyter-kernel-managers)
(jupyter-delete-all-kernels, jupyter--kernel-sentinel)
(jupyter--start-kernel): Remove and remove related, their functionality has
been generalized in the new classes.
(jupyter-interrupt-kernel, jupyter-shutdown-kernel)
(jupyter-start-channels, jupyter-start-kernel, jupyter-kernel-alive-p)
(jupyter-kill-kernel): Refactor and implement to use the new class hierarchy.

* test/jupyter-test.el: Refactor tests to account for changes.
(jupyter-write-connect-file, jupyter-command-kernel): New tests.

* jupyter-kernelspec.el (jupyter-guess-kernelspec): New function.
2019-05-09 12:20:27 -05:00
Nathaniel Nicandro
ab79985580 Fix initialize-instance method signature 2019-05-09 10:56:02 -05:00
Nathaniel Nicandro
edb452618e jupyter-test-with-client-cache: Call accept-process-output 2019-05-09 10:36:43 -05:00
Nathaniel Nicandro
cdfefd5002 Increase timeouts during testing 2019-05-09 09:41:19 -05:00