An extension for JupyterLab to track interaction provenance in Jupyter notebooks.
The provenance information is stored using the provenance tracking library trrack.
This extension listens to notebook change events from JupyterLab and stores these changes as a provenance graph with Trrack. The trrack-notebook-vis library takes the stored provenance information to visualize the provenacne graph in a sidepanel in JupyterLab. From the visualization, users can browse the notebook's history, filter it, and switch between states.
Install JupyterLab if you haven't already.
To install the extension from the terminal, type:
jupyter labextension install @jku-icg/jupyterlab_nbprovenanceAlternatively, this repository also contains a Docker configuration to create a container with Juypter Lab and install the extension.
Simply run:
docker-compose up labThe environment is based on jupyter/scipy-notebook and should comes with the most popular Python packges, including altair, pandas, scikit-learn, seaborn, and matplotlib.
To use the extension in a JupyterLab instance from Binder, add a postBuild file with the above command to the root of the repository (see the demo branch for reference).
-
Prepare Environment (optional)
conda create --name notebook_provenance python=3.8.5 conda activate notebook_provenance conda install jupyterlab
-
Clone this repo,
cdinto the folder -
Then build the extension
npm install npm run build
-
Install the extension
jupyter labextension install --minimize=False # install the current directory as an extensionDisabling the minifier is optional, but minimizig the code is not necessary locally and it reduces the build time.
-
Start JuypterLab in watch mode
jupyter lab --watch
-
Make code changes
-
Rebuild the extension with
npm run buildor watch for file changes and built automatically withnpm run watch
JupyterLab updates itself, due to the--watchparameter -
Refresh the JupyterLab in your browser to load the updated files
Also see the JuypterLab Extension Developer Guide.
Make sure to npm login with the user icgbot first.
npm pack --dry-run # verify files
npm publishThis extension uses icons by fontawesome.com, available under CC BY 4.0.
