Project

General

Profile

Hacking Python SDK » History » Version 3

Tom Clegg, 07/03/2014 11:31 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 3 Tom Clegg
# Build a client library package and install it to the virtualenv
25 1 Tom Clegg
# Install your local (possibly modified) FUSE driver to the same virtualenv
26
# Run the FUSE driver test suite
27 3 Tom Clegg
# Build a FUSE driver package and install it to the virtualenv
28 1 Tom Clegg
29 2 Tom Clegg
Note: The test suite brings up a Keep server and an API server to run tests against. For best results:
30
* Try [[Hacking Keep]] and [[Hacking API Server]] to make sure you have all the right dependencies for running the Keep and API servers.
31
* Make sure you have a blob_signing_key in services/api/config/application.yml
32 1 Tom Clegg
33
Script:
34
35
<pre>
36
VENVDIR=$(mktemp -d)
37
virtualenv --setuptools --system-site-packages "$VENVDIR"
38
39
cd ~/arvados/sdk/python
40
"$VENVDIR/bin/pip" install -e .
41
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
42
43
"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
44
"$VENVDIR/bin/pip" install dist/arvados-python-client-0.1.*.tar.gz
45
46
cd ~/arvados/services/fuse
47
"$VENVDIR/bin/pip" install -e .
48
GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
49
50
"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
51
"$VENVDIR/bin/pip" install dist/arvados_fuse-0.1.*.tar.gz
52
</pre>