Skip to main content

Lightweight ipython/jupyter notebook diffing tool

Project description

A lightweight ipython/jupyter notebook diffing tool.

build-status-image

Purpose

This tool makes ipython/jupyter notebook diffs more readable.

This tool is meant for text-based diffing from the command-line.

Overview

Running ndb shows differences in the following types of data:

  • Python code

  • reStructuredText code

  • Resource files (e.g. PNGs)

This will show you most of what has changed in the In[1]: and Out[1]: lines of the notebook.

The output of ndb is git-diff output and can be piped to other commands like less(1) and tee(1).

Requirements

  • Python >= 2.6

  • nbconvert

  • pandoc

  • git

Install

Install with pip (or your favorite python package manager):

pip install nbd

Usage

Help:

nbd -h

Simple usage:

nbd <notebook>

Pipe to less(1):

nbd <notebook> | less

Options (see help for all):

nbd -e python <notebook>
nbd <notebook1> <notebook2> <notebook3>
nbd <notebook> --git-diff-option="--name-only"

Build and install from sources

Source distribution:

python setup.py sdist

After building, install with pip:

pip install dist/nbd-$version.tar.gz

Install in a virtual environment to avoid system pip issues.

Tutorial

See the tutorial in the demo/ directory: demo tutorial.

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

nbd-0.1.dev10.tar.gz (10.8 kB view details)

Uploaded Source

File details

Details for the file nbd-0.1.dev10.tar.gz.

File metadata

  • Download URL: nbd-0.1.dev10.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nbd-0.1.dev10.tar.gz
Algorithm Hash digest
SHA256 24b14594da7145e2fef78d5fa646a866b8b3cef65953db2bb571fb4d5e49f38c
MD5 02abd05121b2fdda8fc9e1b89f17d2c4
BLAKE2b-256 3967db43639cdc703fc4bab1f8e7a57a5376640ebbfb2514034de6ef61436f0e

See more details on using hashes here.

Supported by

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