Commit graph

71 commits

Author SHA1 Message Date
dickmao
f8e6bebbab scratch one scratch all 2020-01-11 20:52:58 -05:00
dickmao
fbbace4b34 make sense of scratchsheet kill behavior 2020-01-11 18:19:34 -05:00
dickmao
702f04064a :image/png not :png 2020-01-11 16:03:54 -05:00
dickmao
8a545c508b close notebook on delete 2020-01-10 23:58:51 -05:00
dickmao
8626a4fa3c better 2020-01-09 14:05:56 -05:00
dickmao
98742013df less confused 2020-01-09 13:51:56 -05:00
dickmao
9ac1bf62e5 confused about pyouts 2020-01-09 13:12:41 -05:00
dickmao
5de0c8b8a4 remove multilang 2020-01-07 16:44:22 -05:00
dickmao
b7188ff51f remove ein:polymode 2020-01-04 11:28:56 -05:00
dickmao
290e5fc88e gha 2020-01-04 10:46:21 -05:00
dickmao
f7180405d6 makes test 2020-01-02 20:09:42 -05:00
dickmao
2d362f6898 fix ipynb mode for containers 2019-11-26 14:28:22 -05:00
dickmao
e12a33588d replace ein:aif with aif 2019-11-24 00:17:52 -05:00
dickmao
d4a2034613 at some point, purcell/nix-emacs-ci emacs-25-1 lost libxml-parse-html capability 2019-11-14 20:04:21 -05:00
dickmao
dc9bbbb627 remove log/README 2019-11-14 19:35:40 -05:00
dickmao
b8d265f419 fix some old tramp tests 2019-11-13 12:50:45 -05:00
dickmao
bcf1c2ac55 purge
purge

align pm:get-span no major mode error with diagnostic

purge
2019-11-08 16:05:11 -05:00
dickmao
61238485e0 Closes #580 2019-08-13 08:04:47 -04:00
John Miller
ce419a12a5
Appveyor iterating (WIP) (#573)
* ob-ein: Bring back old functionality.

Bring back some old features to babel edit buffers while trying to respect
recent addition of polymode support.

* Override polymode if the user really wants.

Polymode is really for notebook buffers in any case, but this will override
whatever completion backmode a user has configured for python-mode.

* Install cask using python2.

For now python2 is the easiest option for testing on Windows since cask does
not properly support python3 when in Windows.

* Let's throw in the ert-runner, see what happens.

* Can I use my fork of cask?

Work around smartrep weirdness, try to live without command line wildcard
expansion.

* Get the url for the fork right.

* Experiment with python37, use test_script.

* Unstick appveyor, I hope.

* Fix parsing error.

* test_script is not executing. Why?

* Add ert testing.

But why are the test_script commands not executing?

* tasks: Automate building and testing using invoke.

Invoke leverages Python, which I hope will allow us to abstract out differences
in platforms when it comes to building and testing ein.

* Use invoke on appveyor.

* appveyor: Use the environment python.

So we can test versions other than python 2.7.

* Parsing error.

Is
https://packaging.python.org/guides/supporting-windows-using-appveyor/#setting-up
lying to me?

* Quote commands, just in case.

* Get python onto the path.

* Appveyor is catching up to travis.

* Parsing error.

* Update pip, try to get quoted syntax right.

* Still not liking my pip call.

Last try, next step we go to a requirements.txt file.

* Go to using a requirements file for pip.

* ecukes needs bash to work.

* Cleaning up and fiddling.

Seems like the emacs-jupyter guy has his act together - maybe we can take some
inspiration for our appveyor config.

* Syntax error in environment.

* More syntax errros.

* Maybe we need quoting.

* I give up.

* Formatting and cleanup.

* Add customization, yet another syntax error.

New customizable variable `ob-ein-babel-edit-polymode-ignore' to override
keybinding for \C-c\C-c in an org source code edit buffer.

* John learned some Powershell today.

* Fix the executable path.

Sometimes there is more than one curl installed on the system, make sure we can
account for that in testing.

* Handle updating the path inside invoke.

* Report which curl we are using before starting functional tests.

* Enable RDP so we can see error logs.

* Keep the build alive even when it finishes.

* Fix #568.

Apparently we need to specify the user agent when on windows, otherwise tornado
will start throwing 403 responses. Currently using Mozilla/4.0 as the agent, but
might be a good idea to make this value customizable.

* Clean up emacs config.

* Why is appveyor dropping the xsrf token?

* xsrf cookie found, what does the header look like?

* Try different user-agent header, reenable rdp.

* JSON encoding issues on Python side, it appears. Let's try an older Python.

Login works, contents query to get notebooklist works (i.e. GET on
/contents/api), but creating a notebook (i.e. POST on /contents/api) fails with
invalid JSON. ein and emacs-request appear to be generating the proper json, but
jupyter notebook does not see the same thing that is being written. Could be
bytes vs. text issue with modern v3.x python, so let us see how this all works
with Python 2.7.

* Python27 does not have pathlib out of the box.

* Make amends with Python27

* Back to python37.

Tornado/notebook still isn't reading the POST'ed json correctly.

* Do we need to specify content type?

* Must be selective in specifying application/json content.

* Re-enable rdp.

* Let's try a different curl.

* Ensure most recent curl is on path

* Try a different path.

* Try to warn user if suspicious curl detected.

* Remove debugging statements.

* EVM depends on trusty for 26.x

See issue #125 (https://github.com/rejeep/evm/issues/125). Let's hope I got the
travis.yml syntax right.

* Minimal support for ecukes from invoke.

* Cleaner server shutdowns, better ecukes support from invoke.

Use the /api/shutdown REST API call now to shutdown running server. Also support
more command line options for ecukes from invoke.

* Almost full support of ecukes using invoke.

But! Also disabling integration testing for the time being until I understand
why ecukes fails even though everything else is working.

* Just do integration and functional testing on appveyor.

Better than nothing while I work out what is breaking the integration tests.
2019-07-28 18:20:13 -06:00
dickmao
452d0e01b4 tkf/emacs-request 0.3.1 defaults encoding to utf-8
ein seems to have preferred the old default encoding of `binary` versus
`utf-8`.  Explicity set encoding back to `binary` but this
necessitates our using the latest emacs-request.

Fixes #566
2019-07-02 00:12:52 -04:00
John Miller
4e7d56a7d9
Document and dependency updates. (#561)
* Documentation chasing the commit tail.

* This really belongs with the project.

No longer 100% up to date, but worth including if nothing more than for
historical purposes.

* Update ob-ein documentation.

* Fix testing for emacs 27.

Shouldn't setq a structure accessor.

* Add the changelog.

* Workaround for issue #559.

Force ein to use an earlier version (0.9) of websocket.

* Update to v0.16.1

* Add changelog.

One of these days I will remember.

* Get my links right.

* Revert now that websocket is working again.

* Doc updates, dependency updates, prepare for another release.

Make sure we point to a working version of websocket. Documenting some changes
so we can release v0.16.2.

* Make sure we get all the documentation changes in.

* Latest IPython version is 7.5.

Update travis accordingly.
2019-06-22 10:01:50 -05:00
dickmao
dcea37d02e Forestall Polymode "Contamination"
`advice.el` suggests the `ad-default-compilation-action=maybe` admits
inadvertent byte-compilation of advised syntax-ppss in non-EIN
packages reported in #537.

Prevent this by setting `ad-default-compilation-action=never`
when ein:polymode is activated.
2019-05-29 18:56:57 -04:00
dickmao
a969736a03 gate the add-functions in ein:polymode 2019-05-26 00:28:23 -04:00
dickmao
e491ac6f1c Ob-ein Improvements
Bring the org offering to feature parity.
2019-05-20 10:59:43 -04:00
dickmao
dcda68310b half-baked cookie jar messes up websocket 2019-05-07 22:46:37 -04:00
dickmao
f4d301d8c9 Cleanup save-before-quit logic, and polymode kill buffer bugfix
Before: Exit emacs with modified notebooks.  Be asked "You have
unsaved notebooks.  Discard changes?"  Respond no, and manually figure
out which notebooks haven't been saved.

After: Exit emacs with modified notebooks.  Be asked "Save A?".
Respond yes.  Quit without further ado.

Also, bugfix killing of buffers in polymode.  Must kill host buffer,
not indirect buffers.
2019-05-07 09:54:20 -04:00
John Miller
5736cb3716 Fortify tests, tweak cursor motion in notebooklist buffers. 2019-04-03 17:34:37 -05:00
dickmao
234cf391f9 Polymode
M-x customize-group RET ein
Toggle Ein:Polymode

Avoid trying to emulate jump-to-definition, eldoc, and autocompletion
functionalities that Elpy will always do better.

Fixes #497 #482 #418
2019-04-02 09:35:17 -04:00
dickmao
2f19904fe7 travis buttressing 2019-02-19 15:29:18 -05:00
dickmao
ed6482096e Add ob-ein tests
Also, speed up login and other cleanups
2019-02-19 10:06:15 -05:00
dickmao
129afa5fb4 Respect cursor_start and cursor_end in matches
The :cursor_start and :cursor_end fields tell us whether we need to
prepend the prefix ourselves.

Fixes #436
2018-12-28 21:14:11 -05:00
dickmao
e328e86105 Clarify what notebook version means
Say `Contents API 5.7.4` instead of `Notebook v5` in notebooklist.

EIN doesn't care about the python version (2.7, 3.5) or the
ipython version (5.8.0, 6.2.1).  The "jupyter notebook contents api"
version (currently at 5.7.4) is the thing that matters.
2018-12-25 10:59:18 -05:00
dickmao
bead667ee0 Clean up multilang
Do not assume python... leverage ESS to improve R interaction.
Fix both undo and fontify in the presence of toggling cells (`C-c
C-t`)
Fix and test switching kernels
2018-12-08 21:25:48 -05:00
dickmao
f0984eab55 jupyterhub basic (PAM only)
`ein:login` or `ein:notebooklist-login` is the preferred way to access
jupyterhub, although `ein:jupyterhub-connect` is still autoloaded.
2018-12-04 18:31:44 -05:00
dickmao
36727c9415 new notebook needs more time 2018-12-02 17:11:55 -05:00
dickmao
8c3d4fc502 keep fortifying 2018-11-28 22:25:20 -05:00
dickmao
52ac49cc5e fortify travis defences 2018-11-28 21:29:32 -05:00
dickmao
d4ef4ed81c Allow disabling of autocomplete
```
M-x customize-group RET ein-completion
```
Set `Ein:Completion Backend` to `ein:use-none-backend`, Set `State` to
`Save for Future Sessions`.

Also use `featurep` and `with-eval-after-load` to clean up the
subpackage requiring gymnastics.
2018-11-28 17:45:23 -05:00
John Miller
6a23dded5a Update tests for change in notification messages. 2018-11-13 20:58:43 -06:00
dickmao
6ca6752319 C-c C-q improved visual feedback
As `ein:notebok-kill-kernel-then-close-cmmand` must wait for the
server to delete the session, the buffer wouldn't disappear right
away, leaving the user nonplussed whether the `C-c C-q` took.  Display
a status message "Ending session" with a modest animation instead.

Also add a "Stop" test for notebooklist.  Sorry about breaking "Stop"
in ee3b0f0
2018-11-10 00:09:44 -05:00
dickmao
270f157751 squash one of possibly many bugs that could cause intermittent travis failure 2018-11-08 11:36:10 -06:00
John Miller
55f44434b7 Merge branch 'pr-393' 2018-11-07 22:00:49 -06:00
John Miller
ad35ef1b22 Fix notification test to be consistent with new notification strings. 2018-11-07 21:59:41 -06:00
dickmao
84fa177a1e When I C-c C-c also C-c C-r if necessary
If user wants to execute cell, and the connection is down,
automatically reconnect, then execute the cell.
2018-11-06 18:36:46 -05:00
dickmao
7d31fe7f34 fix the osx testing bug 2018-11-04 21:38:20 -06:00
dickmao
ee3b0f095c Follow-up to cleaning up websockets
Renaming of functions with better understanding of reconnects.  Under
the original logic, reconnecting blithely created a new session if
the original no longer existed.  Now it will alert the user when this
happens.

Also hopefully fixes #381 as there was a bug of missing argument not
being caught by lisp's undisciplined typing.
2018-11-04 21:38:20 -06:00
dickmao
5023b0796b Reconnect is not restart #377
Upon disconnection, the jupyter server apparently returns the same kernel for a given
notebook path input.  So reconnect is a thing, and restart is very
distinct from that.

Fixes #377
2018-11-02 11:32:12 -04:00
dickmao
db2856f445 Restart if kernel still alive needs to work 2018-11-01 20:08:10 -04:00
dickmao
d621944797 Clean up websocket callbacks
Coursera appears to kill websockets every minute or so, and I'm
observing firsthand the buggy behaviors described in #356.  This PR
cleans up the websocket code and kernel restart logic.  Removed
backwards compatibility for the v2 messaging api
as keeping it in the presence of the refactoring would make it more
broken that it already was.
2018-10-31 23:38:45 -04:00
dickmao
80839a1d77 finish previous commit 2018-10-28 14:38:53 -04:00