Coder Social home page Coder Social logo

nb-clean's Introduction

nb-clean

nb-clean cleans Jupyter notebooks of cell execution counts, metadata, and outputs, preparing them for committing to version control. It provides a Git filter to automatically clean notebooks before they are staged, and can also be used as a standalone tool outside Git or with other version control systems.

Installation

To install the latest release from PyPI, use pip:

pip install nb-clean

Alternately, in Python projects using Poetry or Pipenv for dependency management, add nb-clean as a development dependency with poetry add --dev nb-clean or pipenv install --dev nb-clean. nb-clean requires Python 3.6 or later.

Usage

To install a filter in an existing Git repository to automatically clean notebooks before they are staged, run the following from the working tree:

nb-clean configure-git

nb-clean will configure a filter in the Git repository in which it is run, and will not mutate your global or system Git configuration. To remove the filter, run:

nb-clean unconfigure-git

Aside from usage from a filter in a Git repository, you can also clean up a Jupyter notebook manually with:

nb-clean clean -i original.ipynb -o cleaned.ipynb

Copyright

Copyright © 2017-2019 Scott Stevenson.

nb-clean is distributed under the terms of the ISC licence.

nb-clean's People

Contributors

srstevenson avatar connesy avatar

Watchers

James Cloos avatar  avatar  avatar

nb-clean's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.