Commit graph

17 commits

Author SHA1 Message Date
John Miller
213cea559e ein-jupyter: Add timeout to ein:jupyter-server-start
Add configurable timeout (see `ein:jupyter-server-run-timeout`) that will
hopefully abort calls to `ein:jupyter-server-run` that hang; this is to help
with issues like those reported in #176.

Also update documentation, dependencies in preparation for 0.13.0 release.
2017-09-03 10:29:54 -05:00
John Miller
c78711a7c4 Back to eieio
It seems there are enough people out there still on Emacs 24 to warrant undoing
some of my recent moves away from eieio to cl-generic. For the near future I
will try to keep any changes that are incompatible with Emacs 24 to a
development branch. There is still probably plenty of opportunity to make the
code more future-proof for an eventual move away from eieio (I'm looking at you
oref and sref...)
2017-07-12 14:38:04 -05:00
John Miller
d9c81f3d90 ein:jupyter: More robust server launching, try for emacs24 compat.
Starting ipython/jupyter notebook servers from EIN should now be more robust.
Will try to detect correct url/port whether or not token authentication is
enabled, and if not will try to alert the user.

Also using `start-process` to run the notebook server - I think this will allow
compatibility with emacs24.
2017-06-06 15:25:44 -05:00
John Miller
0196407b42 ein-core: More stable ipython version checking.
Try to be more graceful when a null sneaks in for the server version. Also
experiment using deferred:$ in `ein:jupyter-server-start'.
2017-06-02 07:24:08 -05:00
John Miller
e3eca1115d ein-notebooklist: Avoid auth issues when changing host url.
When calling `ein:notebooklist-change-url-port' first make call to
notebooklist-open to ensure cookies are properly created/refreshed before trying
to save notebook and restart kernels.

Note this uses a bit of magic from deferred, which was already being used in
ein-jedi.el, but somehow never made it into the list of required pacakges. We
are now correcting that oversite.

Extend the timeout when querying the ipython/jupyter version. Also try to detect
when timeouts occur and in such cases temporarily assume a version (4 for the
moment).
2017-05-30 14:05:02 -05:00
John Miller
39f5d329f1 Functional tests start jupyter using ein:jupyter-server-start
This reduces some of the complexity in testein.py, but unfortunately running
tests is still unreliable. Running batchwise tests don't work at all in Windows,
and running from inside emacs tests often need to be run multiple times before
they pass.

The worst offender is the delete notebook test, which will pass on usually only
1 out of 3 tries.

Testing seems to have revealed a couple bugs, so win??
2017-04-07 08:18:41 -05:00
John Miller
0ea4a9adef Cleaning up compile warnings.
Slowly move towards cl-generic instead of EIEIO.

Got rid of json encoding defadvices. So far so good.
2017-03-16 16:16:16 -05:00
John Miller
7cff07321a Whitespace cleanup. 2017-03-04 20:57:37 -06:00
John Miller
6b7e251658 Allow user to specify additional arguments to start the jupyter server.
See customizable variable `ein:jupyter-server-args'.
2017-02-20 18:07:17 -06:00
John Miller
9e1341a704 Better documentation for a better user experience.
And better jupyter server launching...
2017-02-16 16:57:37 -06:00
John Miller
06fbab9058 Preparing for a version bump. 2017-02-16 09:19:40 -06:00
John Miller
58d8142d0a Numerous documentation updates.
Get rid of ein-sections: you are not yet ready for the world young man!
2017-02-16 09:01:14 -06:00
John Miller
900d7b4375 Add some customiable variables for controlling ein:jupyter-server-start 2017-02-16 08:11:58 -06:00
John Miller
4061a58c94 John discovers M-x update-directory-autoloads
Hope this does what I mean it to do..
2017-02-15 18:58:30 -06:00
John Miller
41f1513ac7 Forgot to specify autoload for the server commands. 2017-02-15 15:06:38 -06:00
John Miller
191d27c3ac Make stopping a jupyter server more user-friendly.
When calling `ein:jupyter-server-stop` ask to user if they are sure and also
give them the option to save any unsaved notebooks before killing the server.

Before closing the server also close any open notebook buffers.
2017-02-15 15:02:07 -06:00
John Miller
05bd6c010b Support for starting and stopping the notebook server from emacs.
For the moment we only support current version of jupyter (i.e. 4.3.1 or
greater).

The special commands are `ein:jupyter-server-start` to start a notebook server
and `ein:jupyter-server-stop` to, clearly, stop a notebook server.

On starting a server EIN will try to determine the url and token for accessing
the notebook server, login and open the notebook list automatically.
2017-02-15 14:18:16 -06:00