This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/python/yap_kernel
Vítor Santos Costa 134288da68 yapr
2019-04-03 10:39:22 +01:00
..
core python kernel 2017-08-27 22:24:34 +01:00
docs update to latest ipykernel 2017-05-14 11:27:44 +01:00
examples/embedding fix swi call leak 2017-06-19 19:02:36 +01:00
yap_ipython errors 2019-03-28 14:06:16 +00:00
yap_kernel boot 2019-02-15 13:50:24 +00:00
__init__.py new jupiter intrface 2017-08-21 12:36:48 +01:00
__main__.py Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
_version.py Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
#kernel.js# Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
#yap_kernel_launcher.py# Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
appveyor.yml update to latest ipykernel 2017-05-14 11:27:44 +01:00
backcall.py Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
CMakeLists.txt install 2019-04-03 10:30:12 +01:00
CONTRIBUTING.md update to latest ipykernel 2017-05-14 11:27:44 +01:00
COPYING.md update to latest ipykernel 2017-05-14 11:27:44 +01:00
custom.js mode 2017-08-27 22:31:38 +01:00
interactiveshell.py Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
kernel.js jupyter 2018-02-01 14:55:09 +00:00
kernelapp.py Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
kernelspec.py Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
MANIFEST.in Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00
README.md deb 2019-03-20 10:52:38 +00:00
readthedocs.yml update to latest ipykernel 2017-05-14 11:27:44 +01:00
setup.cfg fixes to use new IO 2017-08-09 08:15:51 +01:00
setup.py install 2019-04-03 10:30:12 +01:00
setup.py.cmake yapr 2019-04-03 10:39:22 +01:00
x.js Merge branch 'master' of https://github.com/vscosta/yap-6.3 2017-11-11 03:05:36 +00:00
yap_kernel_launcher.py new jupiter intrface 2017-08-21 12:36:48 +01:00
YAP_KERNEL.md debugger 2018-09-10 17:06:13 +01:00
yap_kernel.py Merge 192.168.1.79:github/yap-6.3 2018-03-26 11:03:08 +01:00

#YAP Kernel for Jupyter

This package provides the IPython kernel for Jupyter.

Installation from source

This should install as part of the YAP system

Jupyter Lab

CodeMirror does not support highlighting for Prolog. YAP includes a port based on one that is used in SWISH. To use this mode from jupyter lab, do as follows:

  1. run jupyter lab build (you may need root permission). Search the output for a aline such as:
[LabBuildApp] > node /usr/local/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install

2, Add the following 3 lines below to the webpack.config.js file:

fs.ensureDirSync('node_modules/codemirror/mode/prolog');
fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/prolog.js'), 'node_modules/codemirror/mode/prolog/prolog.js');
fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/meta.js'), 'node_modules/codemirror/mode/meta.js');
..~~~~~~~~
These lines should copy YAP's prolog.js and a new version of the mode directory, meta.js. whenever you rebuild jlab, eg, if you add a new plugin.

Next, please check the lines in context.

be at around line 24:

output: jlab.outputDir });

fs.ensureDirSync('node_modules/codemirror/mode/prolog'); fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/prolog.js'), 'node_modules/codemirror/mode/prolog/prolog.js'); fs.copySync(path.join(path.resolve(jlab.buildDir),'../../../kernels/yap_kernel/meta.js'), 'node_modules/codemirror/mode/meta.js');

// Create the entry point file. var source = fs.readFileSync('index.js').toString();


3: Rerun "jupyter lab build"