mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-04 16:51:38 -05:00
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.
This commit is contained in:
parent
507eaf4d9a
commit
ed4522b787
3 changed files with 49 additions and 28 deletions
29
.travis.yml
29
.travis.yml
|
@ -37,42 +37,32 @@ env:
|
|||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: EMACS_CI=emacs-25-1 IPYTHON=5.8.0 PY=python INSTALL_USER=" --user"
|
||||
env: EMACS_CI=emacs-25-1 IPYTHON=5.8.0 PY=python PIP="${PY} -m pip install --user"
|
||||
- os: linux
|
||||
env: EMACS_CI=emacs-26-2 IPYTHON=6.5.0 PY=python3 INSTALL_USER=" --user"
|
||||
env: EMACS_CI=emacs-26-1 IPYTHON=6.5.0 PY=python3 PIP="${PY} -m pip install --user"
|
||||
- os: linux
|
||||
env: EMACS_CI=emacs-26-3 IPYTHON=7.5.0 PY=python3 INSTALL_USER=" --user"
|
||||
env: EMACS_CI=emacs-26-2 IPYTHON=7.5.0 PY=python3 PIP="${PY} -m pip install --user"
|
||||
- os: osx
|
||||
language: generic
|
||||
env: EVM_EMACS=emacs-25.2 IPYTHON=5.8.0 PY=python TOXENV=py27 INSTALL_USER=""
|
||||
env: EVM_EMACS=emacs-25.2 IPYTHON=5.8.0 PY=python PIP="pip install" TOXENV=py27
|
||||
|
||||
allow_failures:
|
||||
- env: EMACS_CI=emacs-snapshot
|
||||
|
||||
install:
|
||||
- ${PY} -m pip install${INSTALL_USER} --upgrade pip
|
||||
- ${PY} -m pip install${INSTALL_USER} wheel
|
||||
- sh tools/install-virtualenv.sh
|
||||
- |
|
||||
if [ "x$TRAVIS_OS_NAME" = "xosx" ]; then
|
||||
eval "$(pyenv init -)" ;
|
||||
pyenv activate $TOXENV ;
|
||||
else
|
||||
${PY} -m pip install${INSTALL_USER} jupyterhub ;
|
||||
sudo /usr/bin/npm install -g configurable-http-proxy ;
|
||||
${PY} -m pip install${INSTALL_USER} jupyterhub-dummyauthenticator ;
|
||||
fi
|
||||
- ${PY} -m pip install${INSTALL_USER} jupyter ipython\<=$IPYTHON jedi\<=0.13.3
|
||||
- ${PY} -m pip install${INSTALL_USER} ipykernel
|
||||
- ${PIP} --upgrade pip
|
||||
- ${PIP} wheel
|
||||
- ${PIP} wheel jupyter ipython\<=$IPYTHON jedi\<=0.13.3 ipykernel numpy\<=1.16.0 matplotlib\<=3.0.2
|
||||
- ${PY} -m ipykernel install --user
|
||||
- ${PY} -m pip install${INSTALL_USER} numpy\<=1.16.0
|
||||
- ${PY} -m pip install${INSTALL_USER} matplotlib\<=3.0.2
|
||||
- sh tools/install-R.sh
|
||||
- sh tools/install-julia.sh
|
||||
- |
|
||||
if [ "x$TRAVIS_OS_NAME" != "xosx" ]; then
|
||||
hash -r
|
||||
fi
|
||||
- hash -r
|
||||
- jupyter kernelspec list
|
||||
- curl --version
|
||||
- ipython --version
|
||||
|
@ -93,6 +83,9 @@ script:
|
|||
- make test-install
|
||||
- |
|
||||
if [[ "x$TRAVIS_PYTHON_VERSION" == x3* ]]; then
|
||||
${PIP} jupyterhub ;
|
||||
sudo /usr/bin/npm install -g configurable-http-proxy ;
|
||||
${PIP} jupyterhub-dummyauthenticator ;
|
||||
make test-jupyterhub
|
||||
fi
|
||||
- rm -rf $HOME/.matplotlib $HOME/.cache/fontconfig
|
||||
|
|
|
@ -34,10 +34,28 @@
|
|||
;; Uses code from https://github.com/gregsexton/ob-ipython (MIT License)
|
||||
|
||||
;;; Code:
|
||||
(require 'org-element)
|
||||
(require 'ob)
|
||||
(require 'ein-utils)
|
||||
(require 'ein-notebooklist)
|
||||
(require 'ein-process)
|
||||
|
||||
(autoload 'org-element-property "org-element")
|
||||
(autoload 'org-element-context "org-element")
|
||||
(autoload 'ein:notebooklist-new-notebook-with-name "ein-notebooklist")
|
||||
(autoload 'ein:notebooklist-login "ein-notebooklist")
|
||||
(autoload 'ein:notebook-get-opened-notebook "ein-notebook")
|
||||
(autoload 'ein:notebook-url "ein-notebook")
|
||||
(autoload 'ein:notebook-open "ein-notebook")
|
||||
(autoload 'ein:notebook-close "ein-notebook")
|
||||
(autoload 'ein:process-url-or-port "ein-process")
|
||||
(autoload 'ein:process-url-match "ein-process")
|
||||
(autoload 'ein:process-refresh-processes "ein-process")
|
||||
(autoload 'ein:jupyter-server-conn-info "ein-jupyter")
|
||||
(autoload 'ein:jupyter-server-start "ein-jupyter")
|
||||
(autoload 'ein:connect-buffer-to-notebook "ein-connect")
|
||||
(autoload 'ein:connect-run-buffer "ein-connect")
|
||||
(autoload 'ein:shared-output-get-cell "ein-shared-output")
|
||||
(autoload 'ein:shared-output-eval-string "ein-shared-output")
|
||||
(autoload 'ein:kernel-live-p "ein-kernel")
|
||||
(autoload 'ein:query-singleton-ajax "ein:query")
|
||||
|
||||
(defvar *ob-ein-sentinel* "[....]"
|
||||
"Placeholder string replaced after async cell execution")
|
||||
|
@ -337,7 +355,8 @@ if necessary. Install CALLBACK (i.e., cell execution) upon notebook retrieval."
|
|||
(ein:aif (ein:process-url-match nbpath)
|
||||
(ein:notebooklist-login (ein:process-url-or-port it) callback-login)
|
||||
(ein:jupyter-server-start
|
||||
(executable-find ein:jupyter-default-server-command)
|
||||
(executable-find (or (ein:eval-if-bound 'ein:jupyter-default-server-command)
|
||||
"jupyter"))
|
||||
(read-directory-name "Notebook directory: " default-directory)
|
||||
nil
|
||||
callback-login
|
||||
|
@ -362,7 +381,7 @@ if necessary. Install CALLBACK (i.e., cell execution) upon notebook retrieval."
|
|||
(org-ctrl-c-ctrl-c)))))))
|
||||
|
||||
(defcustom ob-ein-babel-edit-polymode-ignore nil
|
||||
"When true override default python mode key mapping for `\C-c\C-c' while inside a babel edit buffer.
|
||||
"When false override default python mode key mapping for `\C-c\C-c' while inside a babel edit buffer.
|
||||
Instead the binding will be to `ob-ein--edit-ctrl-c-ctrl-c', which will execute the code block being edited."
|
||||
:group 'ein
|
||||
:type '(boolean))
|
||||
|
|
|
@ -11,19 +11,27 @@ CASKDIR=$WORKDIR/cask
|
|||
|
||||
. tools/retry.sh
|
||||
|
||||
update_elpa_keys() {
|
||||
mkdir -p $HOME/.emacs.d/elpa/gnupg || true
|
||||
chmod 700 $HOME/.emacs.d/elpa/gnupg
|
||||
GPG=gpg
|
||||
if which gpg2 ; then GPG=gpg2 ; fi
|
||||
travis_retry ${GPG} --keyserver hkp://pool.sks-keyservers.net:80 --homedir $HOME/.emacs.d/elpa/gnupg --recv-keys 066DAFCB81E42C40
|
||||
mkdir -p $(cask package-directory) || true
|
||||
mkdir -p $HOME/.cask || true
|
||||
rsync -azSHe ssh $HOME/.cask $(dirname $(dirname $(dirname $(cask package-directory))))
|
||||
rsync -azSHe ssh $HOME/.emacs.d/elpa/gnupg $(cask package-directory)
|
||||
}
|
||||
|
||||
cask_upgrade_cask_or_reset() {
|
||||
cask upgrade-cask || { rm -rf $HOME/.emacs.d/.cask && false; }
|
||||
}
|
||||
|
||||
cask_install_or_reset() {
|
||||
rsync -azSHe ssh $HOME/.cask $(dirname $(dirname $(dirname $(cask package-directory))))
|
||||
chmod 700 $HOME/.emacs.d/elpa
|
||||
gpg2 --keyserver hkp://pool.sks-keyservers.net:80 --homedir $HOME/.emacs.d/elpa --recv-keys 066DAFCB81E42C40
|
||||
mkdir -p $(cask package-directory) || true
|
||||
cp -R $HOME/.emacs.d/elpa/gnupg $(cask package-directory)
|
||||
cask install </dev/null
|
||||
find $(cask package-directory)/archives -print | xargs ls -l
|
||||
find $(cask package-directory)/gnupg -print | xargs ls -l
|
||||
|
||||
# travis cache
|
||||
rsync -azSHe ssh $(dirname $(dirname $(cask package-directory))) $HOME/
|
||||
}
|
||||
|
@ -36,5 +44,6 @@ fi
|
|||
# Install dependencies for cider as descriped in ./Cask
|
||||
# Effect is identical to "make elpa", but here we can retry
|
||||
# in the event of network failures.
|
||||
update_elpa_keys
|
||||
travis_retry cask_upgrade_cask_or_reset
|
||||
travis_retry cask_install_or_reset && touch elpa-emacs
|
||||
|
|
Loading…
Add table
Reference in a new issue