Skip to content

JupyterLab extensions developed by Tubi including nteract data explorer, shareable link and deep copy/cut/paste

License

Notifications You must be signed in to change notification settings

rabsr/jupyterlab-extensions

 
 

Repository files navigation

Tubi JupyterLab Extensions

Build Status License lerna

JupyterLab Extensions

# extension package name
1 nteract-data-explorer @tubitv/nteract-data-explorer
2 filebrowser-share-file @tubitv/filebrowser-share-file
3 filebrowser-deep-copy-paste @tubitv/filebrowser-deep-copy-paste

nteract Data Explorer

JupyterLab wrapper of nteract Data Explorer from Netflix. Unlike JupyterLab Data Explorer, the extension renders table and charts within the same cell as code, and doesn't require a separate tab. Also the extension solved one drawback—state saving—in nteract Data Explorer.

Shareable Links

The default "Copy Shareable Link" doesn't actually generate shareable links, because the link is either local or with our owner username (in JupyterHub) in it. The route /user-redirect/ in JupyterHub solves the issue. Being a standalone plugin in JupyterLab, we integrated the route in the extension. Before install this extension, please remember to disable the default one.

Copy & Paste Directories

The "Copy" and "Paste" menu items can't operate on each files and directories in a folder recursively, so the extension is created for the purpose.

Extensions of shareable links and copy/paste directories are as follows:

menu items

The following demo shows how these extensions are used in a local JupyterLab, but doesn't show the power of shareable links (better used in JupyterHub). demo

Prerequisites

  • Python >=3.7

conda is the preferred Python virtual environment manager in the repo. For conda installation, please refer to Miniconda.

  • Node.js >=10

Download and install Node.js in this page in which process npx and npm are installed as well.

Installation

All-in-one installation

./scripts/install.sh

Step-by-step installation

Install Python

conda create -n jupyterlab-ext python=3.7 -y
conda activate jupyterlab-ext
pip install -r scripts/requirements.txt

requirements.txt contains these PyPI packages

  • jupyterlab==1.1.1
  • pandas
  • dx

Install extensions

We use Lerna to manage all JupyterLab extensions.

# Install npm package dependencies
npx lerna bootstrap

# Compile all packages
npx lerna run build

# Disable JupyterLab share-file
jupyter labextension disable @jupyterlab/filebrowser-extension:share-file

# Install extensions
jupyter labextension install packages/filebrowser-share-file
jupyter labextension install packages/filebrowser-deep-copy-paste
jupyter labextension install packages/nteract-data-explorer

# List installed extensions
jupyter labextension list

Run

jupyter lab

Please check notebooks in the examples.

Development

Please check README.md of each package.

About

JupyterLab extensions developed by Tubi including nteract data explorer, shareable link and deep copy/cut/paste

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 83.3%
  • Shell 11.4%
  • JavaScript 5.3%