Skip to main content

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

Release files for metacall-jupyter 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metacall-jupyter 0.1.1
File Size Uploaded
metacall_jupyter-0.1.1.tar.gz 7.4 kB Details

Release files / metacall_jupyter-0.1.1.tar.gz

Download URL metacall_jupyter-0.1.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a3f66c99a5b8d57836cad431eefae10213c97c5ddf4574d7061e0c4a989724f1
BLAKE2b-256 checksum
How to use checksums
f6c4d1ae9a291a57ad407a9ebea06a4c71c128fda5a98df96d32bb5e870749d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page