Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/audy/python-science-skeleton

IPython data science project skeleton
https://github.com/audy/python-science-skeleton

Last synced: about 21 hours ago
JSON representation

IPython data science project skeleton

Awesome Lists containing this project

README

        

# python-science-skeleton [![Build Status](https://travis-ci.org/audy/python-data-science-skeleton.svg?branch=master)](https://travis-ci.org/audy/python-data-science-skeleton)

![Alchemist by Joseph Wright](http://i.imgur.com/157olho.jpg)

A handy project skeleton for data analysis projects using IPython notebook.
Includes boilerplate for writing external modules and testing.

Austin G. Davis-Richardson

## Motivation

I like ~~IPython~~ Jupyter notebook for interactive computing/data analysis but
I find it difficult to write maintainable code.

This is an effort to promote writing better, re-usable code as seperate Python
modules, with continuous integration using Travis, and also verify that
notebooks build without error (I guess this is a form of integration testing).
It is importanant that you never commit your notebooks to the master branch
while they're in a failing state.

## Get Started

Install dependencies

```sh
# create and activate a new virtual environment
pyenv virtualenv 2.7.9 $PWD
pyenv activate $PWD

# install dependencies
pip install -r requirements.txt

# start notebook
ipython notebook
```

Write functions common to all notebooks in `lib/common.py` to start. Use
doctests for testing.

## Testing

To run unit tests:

```sh
nosetests --with-doctests
```

To build notebooks:

```sh
# builds HTML by default
make

# or, build notebooks in parallel
make -j
```

(Travis will do both of these things and fail if you commit a notebook in a non-functioning state)

## Building Notebooks

`make` will build any and all notebooks in `$PWD`.

## Contributing

Plz do! I :heart: pull requests.

## TODO

- [ ] Experiment with sending output from notebooks built by Travis (ideally on
GitHub or IPyNbViewer).