NBDiff
===============================
.. image:: https://badge.fury.io/py/nbdiff.png
:target: http://badge.fury.io/py/nbdiff
.. image:: https://travis-ci.org/tarmstrong/nbdiff.png?branch=master
:target: https://travis-ci.org/tarmstrong/nbdiff
.. image:: https://pypip.in/d/nbdiff/badge.png
:target: https://crate.io/packages/nbdiff?version=latest
A tool for diffing and merging IPython Notebook files.
This project was built by a team of
university students from Concordia University. See
`AUTHORS <https://github.com/tarmstrong/nbdiff/blob/master/AUTHORS.rst>`__
for more information.
* Free software: MIT license
* Website: http://nbdiff.org.
Installation
------------
Using Pip
~~~~~~~~~
If you have pip installed:
::
$ pip install nbdiff
From Source
~~~~~~~~~~~
1. Download the code from this repository
2. Run ``python setup.py develop``
Configure Git/Mercurial
~~~~~~~~~~~~~~~~~~~~~~~
*Configuring nbmerge to work with your version control system can be helpful but is not required.*
NBMerge is compatible with Mercurial out of the box by running ``hg merge --tool=nbmerge <branch>``.
Git, however, needs to be configured by adding the following to your ``.gitconfig`` file:
::
[mergetool "nbmerge"]
cmd = nbmerge $LOCAL $BASE $REMOTE $MERGED
Alternatively, you can run the following command to add this configuration automatically:
::
$ git config --global mergetool.nbmerge.cmd = "nbmerge \$LOCAL \$BASE \$REMOTE \$MERGED"
You can then run ``nbmerge`` from git like so:
::
$ git mergetool --tool=nbmerge
Usage
-----
NBDiff
~~~~~~
NBDiff launches a server at ``localhost:5000`` and allows you to view a simple
2-pane diff of two notebook files.
::
usage: nbdiff [-h] [before after]
Produce a diffed IPython Notebook from before and after notebooks. If no
arguments are given, nbdiff looks for modified notebook files in the version
control system. The resulting diff is presented to the user in the browser at
http://localhost:5000.
positional arguments:
before The notebook to diff against.
after The notebook to compare `before` to.
optional arguments:
-h, --help show this help message and exit
NBMerge
~~~~~~~
nbmerge launches
::
usage: nbmerge [-h] [local base remote [result]]
nbmerge is a tool for resolving merge conflicts in IPython Notebook files. If
no arguments are given, nbmerge attempts to find the conflicting file in the
version control system. Positional arguments are available for integration
with version control systems such as Git and Mercurial.
Once nbmerge is run, the UI can be accessed at http://localhost:5000
positional arguments:
notebook
optional arguments:
-h, --help show this help message and exit
Developing
----------
Run the Python tests
~~~~~~~~~~~~~~~~~~~~
To get all of the dependencies necessary to test nbdiff, run:
::
$ pip install -r requirements-dev.txt
To run the python tests, run the following command:
::
$ python setup.py nosetests
NBDiff adheres to `PEP-8 <http://www.python.org/dev/peps/pep-0008/>`__. To check the code
against PEP-8, use ``flake8`` like so:
::
$ flake8 tests nbdiff
To check Python test coverage, install ``coverage`` and run the tests with the ``--with-coverage`` option.
::
$ pip install coverage
$ python setup.py nosetests --with-coverage
Run the JavaScript tests
~~~~~~~~~~~~~~~~~~~~~~~~
First, install `node <http://nodejs.org/>`__ and npm.
Second, install the JavaScript dependencies using ``npm``.
::
$ npm install
Finally, run the tests with ``grunt``. You should output similar to the following.
Note that ``grunt`` will not only run the tests, but check for common style problems with ``jshint``.
::
$ grunt
Running "qunit:files" (qunit) task
Testing src/test/index.html ...OK
>> 14 assertions passed (21ms)
Done, without errors.
History
-------
1.0.0 (2014-03-28)
++++++++++++++++++
* End of the original capstone team project.
* First release on PyPI
1.0.3 (2014-04-15)
++++++++++++++++++
* IPython 2.0.0 support
Metadata
Release files for nbdiff 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nbdiff-1.0.3.tar.gz | 219.2 kB | Without provenance | Details |
Release files / nbdiff-1.0.3.tar.gz
| Download URL | nbdiff-1.0.3.tar.gz |
|---|---|
| Size | 219.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec0e5fb884afd3c5e206da202609381deb021bad61fa3f2d22689d209ed2bbf8
|
|
BLAKE2b-256 checksum How to use checksums |
fba1e3ff5d3936d8eb799f2a97ee15b36cc52b5cf227bf80134c7a85e35f2d37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for nbdiff 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.