Project

General

Profile

Hacking Python SDK » History » Version 2

Tom Clegg, 07/03/2014 11:17 AM

1 1 Tom Clegg
h1. Hacking Python SDK
2
3
{{toc}}
4
5
h2. Prerequisites
6
7
<pre>
8
sudo apt-get remove python-yaml
9
sudo apt-get install python python-pip python-dev python-virtualenv libyaml-dev
10
</pre>
11
12
h2. Get the source code
13
14
<pre>
15
cd
16
git clone https://github.com/curoverse/arvados.git
17
</pre>
18
19
h2. Run tests
20
21
Strategy:
22
# Install your local (possibly modified) client library to a virtualenv
23
# Run the client library test suite
24
# Install your local (possibly modified) FUSE driver to the same virtualenv
25
# Run the FUSE driver test suite
26
27 2 Tom Clegg
Note: The test suite brings up a Keep server and an API server to run tests against. For best results:
28
* Try [[Hacking Keep]] and [[Hacking API Server]] to make sure you have all the right dependencies for running the Keep and API servers.
29
* Make sure you have a blob_signing_key in services/api/config/application.yml
30 1 Tom Clegg
31
Script:
32
33
<pre>
34
VENVDIR=$(mktemp -d)
35
virtualenv --setuptools --system-site-packages "$VENVDIR"
36
37
cd ~/arvados/sdk/python
38
"$VENVDIR/bin/pip" install -e .
39
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
40
41
"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
42
"$VENVDIR/bin/pip" install dist/arvados-python-client-0.1.*.tar.gz
43
44
cd ~/arvados/services/fuse
45
"$VENVDIR/bin/pip" install -e .
46
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
47
48
"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
49
"$VENVDIR/bin/pip" install dist/arvados_fuse-0.1.*.tar.gz
50
</pre>