Commit graph

46 commits

Author SHA1 Message Date
Nathaniel Nicandro
2f3f910598 Replace deprecated destructor method with jupyter-finalizer 2018-10-25 23:59:47 -05:00
Nathaniel Nicandro
5395d4d44a Rename connect-jupyter-repl -> jupyter-connect-repl, run-jupyter-repl -> jupyter-run-repl 2018-10-25 23:17:27 -05:00
Nathaniel Nicandro
52f32f7c6a Update jupyter-channels tests for changes in zmq 2018-10-25 23:17:27 -05:00
Nathaniel Nicandro
e02bed9a50 Add jupyter-hb-consider-dead-periods 2018-10-25 23:17:27 -05:00
Nathaniel Nicandro
4abf2daafa Update completion prefetching
* Add `jupyter-completion-prefetch-p` which determines if a
  prefetch should be performed.

* Remove `jupyter-completion-last-prefix`. Store all of the
  necessary information in `jupyter-completion-cache`.
2018-10-25 23:17:26 -05:00
Nathaniel Nicandro
a9246fcecb Rename with-jupyter-* to jupyter-with
Ensure that all functions and macros have the same
pseudo-namespace
2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
603ab12444 Ensure lock files are enabled when testing them 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
3d8049da6d Reduce the use of deprecated functions 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
4bb716e401 Update test to remove old jupyter-request slot 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
0735198579 Update channel tests 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
35433ea68d Update jupyter-hb-channel test 2018-10-25 23:17:25 -05:00
Nathaniel Nicandro
f13f18b12b Rename jupyter-completion-floating-point-p to jupyter-completion-number-p
* Add tests for `jupyter-completion-number-p`

* Simplify functions that use `jupyter-completion-number-p`
2018-10-25 23:07:46 -05:00
Nathaniel Nicandro
a8231db79b Rename jupyter-repl-current-client to jupyter-current-client
Also move `jupyter-current-client` to `jupyter-client.el`
2018-10-25 23:07:46 -05:00
Nathaniel Nicandro
883197074e Move the kernel-info slot of jupyter-repl-client' to jupyter-kernel-client'
* Define new method `jupyter-kernel-info` which takes care
  of caching the result of a kernel info request. All
  access of the kernel info plist should happen through
  this method.

* Do not return the kernel info plist in
  `jupyter-start-new-kernel`, callers should access the
  kernel info through `jupyter-kernel-info`
2018-10-25 22:57:33 -05:00
Nathaniel Nicandro
6a60250940 Add lock file mechanism to cleanup channel subprocess on Emacs crash
If Emacs crashes while a channel subprocess is still alive, the subprocess is
not cleaned up properly. Fix this by creating a file lock in the parent Emacs
process, then ensure that the file lock exists in the channel subprocess. If it
doesn't exist anymore, the channel subprocess will exit.
2018-10-25 22:57:23 -05:00
Nathaniel Nicandro
2b8be0c2cf Fix REPL history navigation
* Set the lazy highlight limit to only look at the current cell

* Simplify `jupyter-repl-history-next` and `jupyter-repl-history-previous`

* Properly restore isearch state when searching through history

* Add tests for REPL history navigation
2018-10-16 13:55:57 -05:00
Nathaniel Nicandro
61b8b1250d [WIP] Add more tests 2018-10-16 13:55:30 -05:00
Nathaniel Nicandro
7b3e4f9f84 Fix encoding/decoding time objects
* Handle the case of no time specification by defaulting to midnight when
  decoding time

* Properly handle fractions in `jupyter--decode-time`

* Implement `jupyter--encode-time`

* Consider a time object to be a length 4 list of integers and encode the
  object using `jupyter--encode-time` when encoding in `jupyter--encode`

* Add tests for time decoding/encoding
2018-10-16 13:55:30 -05:00
Nathaniel Nicandro
3a04fcfe5b Update tests 2018-05-16 21:54:30 -05:00
Nathaniel Nicandro
1841e49b5d Be consistent with message types
Only use the message symbol's as defined in `jupyter-message-types` and switch
to the string representation only when sending a message.
2018-05-16 20:46:10 -05:00
Nathaniel Nicandro
3b3fe9c43f jupyter-<type> -> jupyter-send-<type> where appropriate 2018-05-16 12:25:57 -05:00
Nathaniel Nicandro
631e0d9c80 Update tests to take into account changes in ZMQ 2018-05-15 16:45:25 -05:00
Nathaniel Nicandro
656a2d913b Add org-babel-jupyter tests 2018-02-12 10:49:41 -06:00
Nathaniel Nicandro
d879e743a4 Refactor tests 2018-02-12 10:49:28 -06:00
Nathaniel Nicandro
24eb475443 Cleanup comments 2018-02-12 10:25:13 -06:00
Nathaniel Nicandro
d07b9e66fe Update to take into account changes in emacs-zmq 2018-01-20 21:39:20 -06:00
Nathaniel Nicandro
1ce282a7a5 Indentation 2018-01-17 20:35:06 -06:00
Nathaniel Nicandro
50c507240b Add jupyter--ioloop-queue-message test 2018-01-16 11:08:10 -06:00
Nathaniel Nicandro
5d9244b17b Rename jupyter--encode-object -> jupyter--encode, jupyter-decode-string -> jupyter--decode` 2018-01-09 00:44:35 -06:00
Nathaniel Nicandro
c7dee4aa55 Simplify kernel shutdown and interruptions in a kernel manager 2018-01-09 00:44:34 -06:00
Nathaniel Nicandro
9ba6ad331e Remove uses of lexical-let 2018-01-09 00:44:34 -06:00
Nathaniel Nicandro
326ff15d92 Add standard header comments 2018-01-09 00:44:33 -06:00
Nathaniel Nicandro
f904dc7d2a Rename jupyter-push-message -> jupyter-queue-message 2018-01-09 00:44:33 -06:00
Nathaniel Nicandro
5975e0e096 Update tests
Use lexical bindings, fix byte compiler warnings.
2018-01-07 14:25:54 -06:00
Nathaniel Nicandro
346cdc78c8 Update heartbeat channel tests to take into account implementation changes 2018-01-07 14:16:17 -06:00
Nathaniel Nicandro
4944a5d75a Update callback interface
- Rename `jupyter-received-message-types` to `jupyter-message-types` and add
  message types for requests as well. Also change the keys to keywords instead
  of symbols. Using plists with keywords is in line with `jupyter-messages` and
  the arguments of the jupyter request functions.

- Rename `jupyter-request-run-callbacks` to `jupyter--run-callbacks`. This is
  more of an internal function so mark it as such.

- Change the order of the first two arguments in `jupyter-add-callback` and
  `jupyter-wait-until`. In both cases you are adding a callback to a request or
  waiting for some condition to be satisfied on the request not on the message
  type. This is also the reason why `jupyter-wait-until-received` keeps the
  message type as the first argument. We are waiting until a message of a
  certain type is received for a request, but the more important object in this
  case is the message type.

- Update other files to take into account these changes.
2018-01-06 19:55:46 -06:00
Nathaniel Nicandro
d1f57831fe Update callback tests to use jupyter-echo-client 2018-01-06 19:55:46 -06:00
Nathaniel Nicandro
e679c28dc4 Add jupyter-echo-client for tests
This `jupyter-kernel-client` subclass generates the following messages when a
message is sent on one of its channels:

status: busy
<msg>
status: idle

Where the content field of <msg> will be the same plist as the sent message and
the type of <msg> is the reply type of the request. No actual communication is
done with a kernel, the messages are just placed on each channels recv-queue
2018-01-06 19:55:46 -06:00
Nathaniel Nicandro
5f2f9fbb3a Cleanup tests to take into account changes in jupyter-client 2018-01-02 13:50:13 -06:00
Nathaniel Nicandro
8d20384bf3 Remove the need to specify a client in the callback interface
- Also rename `jupyter-add-receive-callback` to `jupyter-add-callback`
2017-12-31 14:17:56 -06:00
Nathaniel Nicandro
6c6ad568d6 Use lexical-let when needed 2017-12-22 00:36:49 -06:00
Nathaniel Nicandro
fb8c13055d Add test for sending the various message types 2017-12-19 18:15:51 -06:00
Nathaniel Nicandro
e9f04b20f8 Make the hb channel more efficient
Instead of constantly sending the subprocess input on every polling loop, poll
for input on stdin using the poller.
2017-12-19 11:47:45 -06:00
Nathaniel Nicandro
3d2aa1fe9e Update tests 2017-12-16 19:01:09 -06:00
Nathaniel Nicandro
731e5387b4 Add tests for message callbacks 2017-12-14 13:21:55 -06:00
Nathaniel Nicandro
76cf1c5eb7 Semi working prototype 2017-12-13 11:27:13 -06:00