Hacking Python SDK » History » Version 2

Version 1 (Tom Clegg, 07/03/2014 10:52 AM) → Version 2/24 (Tom Clegg, 07/03/2014 11:17 AM)

h1. Hacking Python SDK

{{toc}}

h2. Prerequisites

<pre>
sudo apt-get remove python-yaml
sudo apt-get install python python-pip python-dev python-virtualenv libyaml-dev
</pre>

h2. Get the source code

<pre>
cd
git clone https://github.com/curoverse/arvados.git
</pre>



h2. Run tests

Strategy:
# Install your local (possibly modified) client library to a virtualenv
# Run the client library test suite
# Install your local (possibly modified) FUSE driver to the same virtualenv
# Run the FUSE driver test suite

Note: The test suite brings up a Keep server and an API server to run tests against. For best results:
* Try
If this doesn't work, try [[Hacking Keep]] and [[Hacking API Server]] to make sure you have all the right dependencies for running the Keep and API servers.
* Make sure you have a blob_signing_key in services/api/config/application.yml


Script:

<pre>
VENVDIR=$(mktemp -d)
virtualenv --setuptools --system-site-packages "$VENVDIR"

cd ~/arvados/sdk/python
"$VENVDIR/bin/pip" install -e .
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests

"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
"$VENVDIR/bin/pip" install dist/arvados-python-client-0.1.*.tar.gz

cd ~/arvados/services/fuse
"$VENVDIR/bin/pip" install -e .
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests

"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
"$VENVDIR/bin/pip" install dist/arvados_fuse-0.1.*.tar.gz
</pre>