Skip to content

Latest commit

 

History

History
108 lines (72 loc) · 4.6 KB

README.md

File metadata and controls

108 lines (72 loc) · 4.6 KB

MetaCall Jupyter Kernel: Wrapper Kernel for MetaCall Core Library leveraging IPython and Jupyter

Python CI build Code style: black Binder Version 0.1.0 License: Apache 2.0

Introduction

MetaCall Jupyter Kernel is an open-source wrapper kernel that implements cross-language function calls through the MetaCall Core and the Polyglot REPL. MetaCall Core is an open-source library that brings the polyglot programming experience to Developers. With MetaCall, developers can embed different programming languages through an easy-to-use high-level API.

The Kernel exposes the MetaCall Core API which can be loaded and launched through a Jupyter Notebook interface. With this Notebook, the users can try out writing, mixing and embedding code in different programming languages. The project is available on PyPi.

Key features

metacall_jupyter is designed to be simple and concise with the following key features:

  • You can call functions in different programming languages, through cross-language function calls.
  • You use a high-level API to execute code in different programming languages.
  • Lists all the available functions and modules from the MetaCall's meta-object protocol.
  • Official support for Python and NodeJS with the Polyglot REPL.
  • Simple and intuitive user-experience centred around Polyglot development and components.

Installation

It is recommended to use a Virtual Environment to manage your dependencies and the application build. We will first start with setting up the Local Project Environment:

git clone https://github.com/metacall/jupyter-kernel.git
virtualenv env
source env/bin/activate

Next we can download all the dependenices and setup the Kernel:

curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
python3 setup.py install
python3 -m metacall_jupyter.install
metacall npm install

Start your Jupyter Notebook by pushing the following command:

python3 -m metacall_jupyter.launcher

You can pick metacall_jupyter from the drop-down options and start working with the Jupyter Notebook interface. Example Notebook are found here.

Docker

Build the image:

docker build -t metacall/jupyter .

Run the image:

docker run --rm --network=host -it metacall/jupyter

Testing

To run the tests, push the following command:

pytest test-kernel.py

The script will run all the tests. To generate a coverage report, we are using the pytest-cov plugin, which can be invoked by pushing the following command:

pytest --cov=metacall_jupyter test-kernel.py

Documentation

Our official documentation is available at metacall-jupyter-kernel.readthedocs.io.

To edit the documentation you need a GitHub account. Once you have created one and logged in, you can edit any page by navigating to the corresponding file and clicking the edit (pen) icon. Alternatively create a fork, and then clone the repo and cd into the docs directory. Let us set the doucmentation up:

virtualenv env
source env/bin/activate
pip install -r requirements.txt
make html

You can now open the documentation site on _build/html/index.html in your browser. Make corresponding changes on the documentation site and then run make clean && make html to update the documentation. You can now create a pull request to get your changes merged into the upstream branch.

Contributing

To get started with contributing, check out the Code of Conduct and create an Issue to get started.

If you are new to Git & GitHub, you can find more information here. It contains all the information about making the changes, linting, running the CI locally and submitting the pull request.

You can view the Change Log to see what has changed in the project, since its inception.

LICENSE

Apache-2.0 License