Skip to main content

Utility to install various jupyter kernel specs.

Project description

Install Kernel Specifications into userspace

Pipeline codecov BSD

This code installs jupyter kernels for different languages into the user space. Once the kernel has been installed it can be used on the jupyter-hub server of DKRZ.

Installation

python3 -m pip install kernel-install

Usage

Using the command line interface (cli):

jupyter-kernel-install --help
Usage: jupyter-kernel-install [-h] [--name NAME] [--display-name DISPLAY_NAME] [--version] language

Install jupyter kernel specs of different languages.

Positional Arguments:
  language              The programming language

Options:
  -h, --help            show this help message and exit
  --name, -n NAME       The name of the kernel (default: None)
  --display-name, -d DISPLAY_NAME
                        The display name of the kernel (default: None)
  --version, -V         Display version and exit

The following kernel specifications are supported:

  • python3
  • gnuR
  • bash

Example for installing a gnuR kernel:

kernel-install r --name r-regiklim --display-name "R for Regiklim"

Using the python library

Example for programmatically installing a bash kernel:

import kernel_install as ki
kernel_path = ki.bash(name="bash-regiklim", display_name="bash kernel")

Contributing

Any contributions are welcome. To start developing we recommend creating a new mini conda environment.

conda env create -f environment.yml; conda activate install-kernelspec

Unit tests, building the documentation, type annotations and code style tests are done with tox. To run all tests, linting in parallel simply execute the following command:

tox -p 3

You can also run the each part alone, for example to only check the code style:

tox -e lint

available options are lint, types and test.

Tox runs in a separate python environment to run the tests in the current environment use:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kernel_install-2404.0.1.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

kernel_install-2404.0.1-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page