Commit graph

83 commits

Author SHA1 Message Date
John Miller
00a4af6857
Fix travis osx (#637)
* Stage 1: Go to python 3 for OS X.

* Resolving prompt-toolkit conflict.

Somebody (not sure who) wants prompt-toolkit version to be between 1.04 and
2.00, but jupyter-console needs at least v2.00. First try - use a higher IPython
version.

* Try to force prompt-toolkit version on OS X.

Trying fix suggested in issue #370 (https://github.com/jupyter/jupyter/issues/370).

* Wrong operator for pip install prompt-toolkit.

* Play with IPython version, remove potentially redundant ipykernel install.

* Now we can't find jupyter on OS X.

The install looks good, though.

* Python 3.7.6 is still a release candidate. Sigh.

* Get serious about setting the PATH with pyenv.

* Is the shell set up for pyenv virtualenv?

* ELPA and emacs 25 are not getting along.

* Restarting the shell is a bad idea.

* I suspect the issue is with package gpg signatures.

* Try emacs 26.3 for OS X build.
2019-12-19 11:01:35 -07:00
John Miller
91b7375dbf
Issue 608 jedi completion (#609)
* ein-ac: Fail silently for unexpected ein:completion-backend values.

Fixes #608, though we really need a test cases for completion in polymode.

* Only define ein ac-sources when the user explicitly sets the backend.

* Test case for issue #608.

* Only test jedi completion when testing polymode.

* Add epc dependency for emacs-jedi.

* Flanging up with travis is always a challenge.

* Forgot to update the scenario.

* Give jedi time to install.

* Add virtualenv to travis OS X build.

Also add some addition TOX environments for future testing cases.

* OS X travis is failing - is it a timeout issue?
2019-10-28 20:28:37 -06:00
John Miller
0c207dfac1 Revert emacs 25 version, tool for downloading travis logs.
Update help message in travis as well. Get rid of case-fold check for the
moment. It works fine locally, but travis can't seem to wrap its head around the
test.
2019-10-20 13:34:51 -06:00
Miller
77e45bf77d Play with emacs and python versions. 2019-10-06 18:05:36 -05:00
Miller
44d650dd02 Use latest jedi for testing.
Version 0.15.x seems to have resolved the issues that plagued 0.14.
2019-10-06 18:05:36 -05:00
dickmao
bcf498929b redundant wheel install 2019-09-30 18:45:33 -04:00
dickmao
ed4522b787 ob-lang cannot require org
Generally, ob-lang modules cannot require org, else it gets into
infinite require loop.

This begs the question whether ob-ein is really used by anyone.
2019-09-29 17:16:25 -04:00
dickmao
507eaf4d9a fix NPE in poly-ein (revealed in ESS) 2019-09-29 12:19:46 -04:00
dickmao
189b89fb6c give purcell/nix-emacs-ci a spin 2019-09-29 12:19:36 -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
63c55076cf the edge of jedi==0.14.0 is too sharp 2019-06-22 14:28:26 -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
e491ac6f1c Ob-ein Improvements
Bring the org offering to feature parity.
2019-05-20 10:59:43 -04:00
dickmao
cb0a819929 Julia, etc.
Prove we are agnostic about kernels.
2019-05-15 06:40:10 -04:00
dickmao
81b42f338c 25.2 for osx 2019-04-04 11:06:29 -04:00
dickmao
8ce2da3a9d well, ubuntu 16.04 is using emacs 25.1.1 2019-04-04 10:10:41 -04:00
John Miller
419a74ce67
Connect features (#492)
* Testing for shared eval and connecting buffers.

* Forgot the feature.

* Need a small delay to make sure code is evaluated.

* Testing for shared eval and connecting buffers.

* Forgot the feature.

* Need a small delay to make sure code is evaluated.

* Add scenario for company completion in a connected buffer.

* Works better if we test completion first.

* Update ipython version tested in travis.

* Stab in the dark to fix travis erroring under ipython 6.x

* Revert "Stab in the dark to fix travis erroring under ipython 6.x"

This reverts commit 7255d31fdb.
2019-03-27 15:53:47 -05:00
dickmao
ed6482096e Add ob-ein tests
Also, speed up login and other cleanups
2019-02-19 10:06:15 -05:00
dickmao
7a6ab26f5c config path must be /tmp for travis evm 2018-12-08 22:03:04 -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
04c16cf2b0 avoid leaving EIN in an uninstallable state. Fixes #395. 2018-11-08 19:02:23 -05:00
dickmao
0345ed0b33 Try to address windows NT unseen. Add osx. Add ipython 7.0.1. 2018-10-20 00:12:34 -04:00
dickmao
085a188b20 Streamline login
Merge the login and open commands (open aliased to login).  Add login
tests described in #352.

Attempt to improve user experience by synchronously executing
`ein:jupyter-server-start`.  `ein:dev-prefer-deferred` custom variable
allows easy switch to compare sychronous versus old asynchronous behavior.
2018-10-17 16:52:10 -04:00
dickmao
c424f2ae5a workaround for emacs-26.1 travis
Delete the org-plus-contrib dependency in Cask via a fast switcheroo
in install-cask.sh
2018-10-12 21:55:33 -05:00
dickmao
24896798dd emacs-26.1-travis cannot see julia-mode
For whatever reason, emacs-26.1-travis consistently fails to download an ess
dependency.
`Dependency ess failed to install:
https://melpa.org/packages/julia-mode-20180816.2117.el: Bad Request`
Remove emacs-26.1 from the build matrix until I figure this out.
2018-10-12 21:55:33 -05:00
dickmao
bc10cea743 Normalize url-or-port
```
"http://localhost:8888"
"http://localhost:8888/"
"http://127.0.0.1:8888"
"http://127.0.0.1:8888/"
"8888"
8888
```

Ideally these should converge to the same thing.  Since many hash
tables are keyed off `url-or-port`, forgetting to
normalize `url-or-port` with `ein:url` leads to missed cache hits and
general malaise.  So we try to do that.

Address a FIXME: apply callbacks to `ein:notebook-list-login-and-open`.

Removed py3.5 from travis build matrix to reduce developer strain.
2018-10-12 21:55:33 -05:00
dickmao
11c2245c41 Asynchronize all server communication
Use deferred and callbacks instead of `:sync t` for tkf requests which
is known to have issues.  Query server attributes once on
notebooklist-open to avoid sequencing issue #176 (but allow Resync).
Under curl backend, a second request for the same "key" as a pending
request will abort the latter, which has resulted in a clobbered
curl-cookie-jar file, so merely warn and don't abort.

Fix #176
2018-10-07 00:40:48 -04:00
dickmao
ad8408dfb7 Implement undo
`M-x customize-group RET ein`
Toggle `Ein:Worksheet Enable Undo`
Save for Future Sessions
Restart emacs or kill/restart notebook

Fixes #338
2018-10-02 10:00:25 -04:00
dickmao
ff3138b33e avoid ipython 7.0.x for now 2018-09-28 19:40:17 -04:00
dickmao
ec28cbe708 revive tkf tests
`make test-unit`
`make test-int` (formerly `cask exec ert-runner`)
An intermittent travis-melpa issue is solved by gonewest818.
2018-09-27 00:52:00 -04:00
John Miller
b280edc65a Keeping up with EVM recipes
Adding emacs-26.1-travis to tested versions.
2018-06-01 09:19:10 -05:00
John Miller
7988b04670 More tweaks to .travis.yml 2018-03-08 09:47:35 -06:00
John Miller
1c15a3af4e Testing: add ssl module.
Travis has decided to suddenly start complaining that an ssl module is not
available when installing torndao.
2018-03-08 09:25:11 -06:00
John Miller
d863d065d7 EIN on travis does not like emacs 24.4
Though it works fine on my machine.
2018-02-27 16:36:33 -06:00
John Miller
a196ace732 It's the travis update shuffle.
Update the emacs versions I'm testing against.
2018-02-27 15:40:36 -06:00
John Miller
04c829d0a5 Tweaking travis config, give more time for testing server to startup. 2018-02-27 15:04:48 -06:00
John Miller
9d5309af59 Trying something new with testing.
Let's do this with ert-runner instead of python. Maybe it will work for once.
2018-02-27 14:38:13 -06:00
Benda Xu
c6d7e289c3 .travis.yml: install gnutls-bin
From emacs-26 on, in emacs-git-snapshot, openssl is not used at all
  and gnutls-bin is required for cask to function.
2017-10-21 22:57:54 +09:00
Benda Xu
be5000b84e .travis.yml: set up build environment.
1. no need to install git explicitly.
  2. install emacs before `cask install`, otherwise the cask packages
     are installed for system emacs.
  3. pip installation as root, otherwise the debug session
     travis_run_install hangs with 'Permission Denied'.
2017-10-21 22:19:38 +09:00
Benda Xu
661bb1c7f1 .travis.yml: pass full path of jupyter to tests.
(file-exists-p server-cmd-path) in ein:jupyter-server-start
  requires full path.
2017-09-30 21:27:16 +09:00
John Miller
abeb37e675 Testein and cask working together, maybe. 2016-12-18 16:21:03 -06:00
John Miller
0bc34562fe Dial it back a bit... 2016-12-18 14:23:07 -06:00
John Miller
7a5456462b Try to use the right emacs version. 2016-12-18 14:18:31 -06:00
John Miller
a14a122300 Correcting poor choice in names for environment variables.
Should be EVM_EMACS, not EMACS (it is very confusing for travis otherwise).
2016-12-18 14:10:28 -06:00
John Miller
de9318ae5b Use @rejeep's helpful gist.
@rejeep suggested this gist to facilitate my difficulties getting
travis to work.
2016-12-18 14:01:10 -06:00
John Miller
544771ac3f Mimic melpa .travis.yml
One day, this WILL WORK.
2016-11-11 08:38:39 -06:00
John Miller
3632f2da77 One last try to fix .travis.yml
Use method suggested in comments of post at:

http://sachachua.com/blog/2015/02/continuous-integration-code-coverage-emacs-packages-travis-coveralls/
2016-10-19 09:14:34 -05:00
John Miller
c670486f1e No xpm or gif for emacs build.
Fixing travis errors.
2016-10-18 13:07:50 -05:00
John Miller
1d86493fb1 Initial Cask support, tweaking .travis.yml
We will get travis-ci to work yet.
2016-10-18 13:01:54 -05:00