on master help sign in
move jupyter kernel module to its own directory

create setup.py for kernel add kernel documentation resolves #168

commit9b9fb34cc34f9cf0a8da7572da6caaaa1fbd83a7 authorAgentM <agentm@themactionfaction.com> dateMon 13 Nov 2017, 23:03 (9 years ago) parent4e4a0c8
6 files changed+61−1
README.markdown+5−1 docs/jupyter_kernel.markdown+37 jupyter/ITutorialDKernel.py → jupyter/itutd/ITutorialDKernel.py jupyter/__init__.py → jupyter/itutd/__init__.py jupyter/__main__.py → jupyter/itutd/__main__.py jupyter/setup.py+19
README.markdown+5−1
@@ -70,12 +70,16 @@ Project:M36 supports multiple frontends which target different audiences.
70701. [Serving Remote ProjectM36 Databases](docs/server_mode.markdown)
71711. [Using Notifications](docs/using_notifications.markdown)
72721. [Merge Transactions](docs/merge_transactions.markdown)
73−1. [WebSocket Server](docs/websocket_server.markdown)
74731. [Atom (Value) Functions](docs/atomfunctions.markdown)
75741. [Trans-Graph Relational Expressions](docs/transgraphrelationalexpr.markdown)
76751. [Isomorphic Schemas](docs/isomorphic_schemas.markdown)
77761. [Replication](docs/replication.markdown)
7877
78+### Integrations
79+
80+1. [WebSocket Server](docs/websocket_server.markdown)
81+1. [Jupyter Notebook Kernel](docs/jupypter_kernel.markdown)
82+
7983## Development
8084
8185Project:M36 is developed in Haskell and compiled with GHC 7.10 or GHC 8.0.2 or later.
docs/jupyter_kernel.markdownnew file+37
@@ -0,0 +1,37 @@
1+# TutorialD Jupyter Kernel for Project:M36
2+
3+## Introduction
4+
5+[The Jupyter Notebook](https://jupyter-notebook.readthedocs.io/en/stable/notebook.html) is web-based tool for experimenting with various languages. Project:M36 offers a Jupyter kernel for the TutorialD interpreter.
6+
7+## Installation
8+
9+To install the `tutd` kernel:
10+
11+* install the `itutd` module into your jupyter virtual environment:
12+```
13+$ cd project-m36/jupyter/itutd
14+$ python setup.py install
15+```
16+
17+* install `kernel.json`:
18+
19+ ```$ mkdir ~/Library/Jupyter/kernels/itutd && cp project-m36/jupyter/kernel.json ~/Library/Jupyter/kernels/itutd``` (macOS)
20+
21+ ```$ mkdir ~/.local/share/jupyter/kernels/tutd && cp project-m36/jupyter/kernel.json ~/.local/share/jupyter/kernels/tutd``` (Linux)
22+
23+ ```$ mkdir %APPDATA%\jupyter\kernels\tutd && copy project-m36\jupyter\kernel.json %APPDATA%\jupyter\kernels\tutd``` (Windows)
24+
25+* check that the kernel is detected:
26+```
27+$ jupyter kernelspec list
28+Available kernels:
29+ python2 ...
30+ tutd ...
31+```
32+
33+## Usage
34+
35+With the kernel installed, run `jupyter notebook` for the web-based interface and click "New" at the top right of the page. The TutorialD kernel should be in the list.
36+
37+Once a new TutorialD notebook is opened, the interpreter is identical to the `tutd` command line interpreter and accepts the same commands. If you are new to Project:M36-flavored TutorialD, please [read the tutorial](/docs/tutd_tutorial.markdown).
jupyter/ITutorialDKernel.py → jupyter/itutd/ITutorialDKernel.pyrenamed

The content is the same.

jupyter/__init__.py → jupyter/itutd/__init__.pyrenamed

The content is the same.

jupyter/__main__.py → jupyter/itutd/__main__.pyrenamed

The content is the same.

jupyter/setup.pynew file+19
@@ -0,0 +1,19 @@
1+from distutils.core import setup
2+
3+setup(
4+ name='itutd',
5+ version='0.1',
6+ packages=['itutd'],
7+ description='TutorialD Jupyter kernel for Project:M36',
8+ author='AgentM',
9+ author_email='agentm@themactionfaction.com',
10+ url='https://github.com/agentm/project-m36/jupyter/',
11+ install_requires=[
12+ 'jupyter_client', 'IPython', 'ipykernel', 'websocket-client'
13+ ],
14+ classifiers=[
15+ 'Intended Audience :: Developers',
16+ 'License :: OSI Approved :: Public Domain',
17+ 'Programming Language :: Python :: 2',
18+ ],
19+)