[ARVADOS] updated: ca5197de7e459a48d72cda8e1f4de4c4201366fb

git at public.curoverse.com git at public.curoverse.com
Tue Jan 28 17:32:00 EST 2014


Summary of changes:
 docker/run.sh                  |   18 ++++++++++--------
 sdk/python/arvados/__init__.py |    2 +-
 2 files changed, 11 insertions(+), 9 deletions(-)

       via  ca5197de7e459a48d72cda8e1f4de4c4201366fb (commit)
      from  c106ef5033c4fcf19e6409fa517030ecffb3e2ea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit ca5197de7e459a48d72cda8e1f4de4c4201366fb
Author: Tim Pierce <twp at curoverse.com>
Date:   Tue Jan 28 17:31:39 2014 -0500

    Python SDK uses ~/.config/arvados/settings.conf like other SDKs.
    
    Also: Update ~/.config/arvados/settings.conf when docker images are restarted.

diff --git a/docker/run.sh b/docker/run.sh
index c8ddabe..f9fef5f 100755
--- a/docker/run.sh
+++ b/docker/run.sh
@@ -224,15 +224,17 @@ function do_start {
 	    "arvados/warehouse"
     fi
 
-    ARVADOS_API_HOST=$(ip_address "api_server")
-    ARVADOS_API_HOST_INSECURE=yes
-    ARVADOS_API_TOKEN=$(cat api/generated/superuser_token)
+    if [ -d $HOME/.config/arvados ] || mkdir -p $HOME/.config/arvados
+    then
+	cat >$HOME/.config/arvados/settings.conf <<EOF
+ARVADOS_API_HOST=$(ip_address "api_server")
+ARVADOS_API_HOST_INSECURE=yes
+ARVADOS_API_TOKEN=$(cat api/generated/superuser_token)
+EOF
 
-    echo "To run a test suite:"
-    echo "export ARVADOS_API_HOST=$ARVADOS_API_HOST"
-    echo "export ARVADOS_API_HOST_INSECURE=$ARVADOS_API_HOST_INSECURE"
-    echo "export ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN"
-    echo "python -m unittest discover ../sdk/python"
+        echo "To run a test suite:"
+	echo "python -m unittest discover ../sdk/python"
+    fi
 }
 
 function do_stop {
diff --git a/sdk/python/arvados/__init__.py b/sdk/python/arvados/__init__.py
index 2d19259..e57b7e6 100644
--- a/sdk/python/arvados/__init__.py
+++ b/sdk/python/arvados/__init__.py
@@ -140,7 +140,7 @@ def api(version=None):
     global services, config
 
     if not config:
-        config = ArvadosConfig(os.environ['HOME'] + '/.config/arvados')
+        config = ArvadosConfig(os.environ['HOME'] + '/.config/arvados/settings.conf')
         if 'ARVADOS_DEBUG' in config:
             logging.basicConfig(level=logging.DEBUG)
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list