Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

yuvipanda/nbtimetravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nbtimetravel

A Jupyter Extension that records each cell's contents & output each time you execute a cell, and allows you to see the history of the whole notebook (and individual cells) over time.

Currently it just records this information, but there is no UI to replay it. That is being currently worked on.

How?

Each time a cell gets executed, this extension saves the following information in the metadata for each cell:

  1. Code being executed
  2. Timestamp at which the execution finished
  3. The response from the kernel

With this, we can time travel to see how a notebook has evolved over time. It also enables certain fun future analysis of how code evolves while people are writing it.

Limitations

  1. Since this stores all versions of your code and output in the notebook, itmight increase the size of your notebook a fair bit! This could cause issues such as failure to save if your notebook has a lot of images.
  2. Doesn't deal well with deleted cells - those currently just 'disappear'.
  3. Doesn't version notebook metadata, so if you changed which kernel this was running - that wouldn't be recorded.

Installation

Install this module with pip from git first

pip install git+https://github.com/yuvipanda/nbtimetravel.git

Then you can install & enable the extension

jupyter nbextension install --sys-prefix --py nbtimetravel
jupyter nbextension enable --sys-prefix --py nbtimetravel

This installs it for the current virtual environment. You can use --system to install it systemwide (needs root) too.

About

Record per-cell history in Jupyter Notebooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published