Commit graph

14 commits

Author SHA1 Message Date
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