dexy

Dexy is a tool for writing about code and data, so it’s an ideal tool for writing about data science which involves lots of both.

From the announcement blog post:

The goal of Dexy is for you to never manually type runnable code or the results of running that code into your document. If you’re writing a tutorial, the example code and the example output all come from running live code. If you’re writing a scientific paper or lab report, then your graphs, results of statistical analysis, raw data tables and any source code examples which appear in your paper are all fully automated.

Installation notes

cd
mkdir -p dexy/install-src

Edit /etc/apt/sources.list.d/sources.list and add:

sudo echo "deb http://archive.ubuntu.com/ubuntu maverick multiverse"

Note: I’m using Ubuntu Maverick.

sudo apt-get update
sudo apt-get install -y apt-utils
sudo apt-get install -y build-essential
sudo apt-get install -y python-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y mercurial
sudo apt-get install -y subversion
sudo apt-get install -y python-setuptools

Python packages

Since I use virtualenv and pip, my installation of python packages is slightly different than the manual:

:

pip install pydot nose pexpect jinja2
pip install http://dexy.it/tmp/idiopidae-0.5.tgz
pip install http://dexy.it/tmp/zapps-0.5.tgz
pip install pygments
pip install BeautifulSoup
pip install cssutils
pip install pynliner

ZeroMQ

:

apt-get install -y sqlite3 libsqlite3-dev
apt-get install -y uuid-dev
wget http://www.zeromq.org/local--files/area:download/zeromq-2.0.10.tar.gz
tar -xzvf zeromq-2.0.10.tar.gz
cd zeromq-2.0.10
./configure
make
sudo make install
cd ..

Install pyzmq library

sudo ldconfig
pip install pyzmq

Web server (mongrel2)

wget http://mongrel2.org/static/downloads/mongrel2-1.4.tar.bz2
tar -xjvf mongrel2-1.4.tar.bz2
cd mongrel2-1.4
make install

and the Python helper libraries for mongrel2

cd examples/python
python setup.py install
cd ../../..

create dexy:

cd $HOME/dexy
dexy --setup .

mkdir -p servers/liveserver
cd servers/liveserver
mkdir logs run tmp

XXX: the manual talks about initialising the mongrel2 server with
``m2sh`` here. Did not work for me. Missing ``config.sqlite``
db-file.

Install R

I skipped the instructions to add additional sources to apt, because: apt-cache search r-base-dev yielded a match.

sudo apt-get install r-base-dev

Installing some R packages:

export CRAN_MIRROR="http://cran.case.edu/"
echo "install.packages(\"rjson\", repos=\"$CRAN_MIRROR\")" | R
--vanilla

XXX: apt-get install -y texlive-full

Packages required for examples:

sudo apt-get install ragel clang espeak texlive-full