Giter VIP home page Giter VIP logo

nbflow's Introduction

nbflow

Build Status

A tool that supports one-button reproducible workflows with the Jupyter Notebook and Scons. Note: this currently requires Python 2 (because Scons does not yet support Python 3), and currently only supports Python kernels.

Installation

To install, run:

pip2 install git+git://github.com/jhamrick/nbflow.git

Usage

For a complete example of how to use nbflow, check out the example in this repository.

Analysis notebooks

For each notebook that you want executed, you MUST include two special variables in the first code cell:

  • __depends__ -- a list of relative paths to files that the notebook depends on
  • __dest__ -- either a relative path, or list of relative paths, to files that the notebook produces

For example, the first cell in one of the example notebooks is:

__depends__ = ["../results/data.json"]
__dest__ = "../results/stats.json"

SConstruct file

You need a SConstruct file in the root of you analysis directory. In this SConstruct file you will need to import nbflow and use it to setup your scons environment, e.g.:

import os
from nbflow.scons import setup

env = Environment(ENV=os.environ)
setup(env, ["analyses"])

The second argument of the setup command takes a list of folder names that contain analysis notebooks.

Running nbflow

Once you have setup your analysis notebooks and your SConstruct file, you can run your notebooks by just running the scons command from the root of your analysis directory.

nbflow's People

Contributors

jhamrick avatar camillescott avatar

Watchers

Aashish Chaudhary avatar James Cloos avatar  avatar

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.