[ARVADOS] updated: 7769d5742b41712bc411d75d6cd6b536cd87a3e4

git at public.curoverse.com git at public.curoverse.com
Fri Feb 21 11:22:36 EST 2014


Summary of changes:
 sdk/python/arvados/__init__.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

       via  7769d5742b41712bc411d75d6cd6b536cd87a3e4 (commit)
      from  06f92553e100b58d2d72a3190fb8e57abac820bb (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 7769d5742b41712bc411d75d6cd6b536cd87a3e4
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Feb 21 11:23:46 2014 -0500

    Added alternate option to one_task_per_input_file to encode specification of input files as collection/stream/file instead of raw manifest text.

diff --git a/sdk/python/arvados/__init__.py b/sdk/python/arvados/__init__.py
index 00f31ca..42c4b3a 100644
--- a/sdk/python/arvados/__init__.py
+++ b/sdk/python/arvados/__init__.py
@@ -71,14 +71,17 @@ class JobTask(object):
 
 class job_setup:
     @staticmethod
-    def one_task_per_input_file(if_sequence=0, and_end_task=True):
+    def one_task_per_input_file(if_sequence=0, and_end_task=True, input_as_path=False):
         if if_sequence != current_task()['sequence']:
             return
         job_input = current_job()['script_parameters']['input']
         cr = CollectionReader(job_input)
         for s in cr.all_streams():
             for f in s.all_files():
-                task_input = f.as_manifest()
+                if input_as_path:
+                    task_input = os.path.join(job_input, s.name(), f.name())
+                else:
+                    task_input = f.as_manifest()
                 new_task_attrs = {
                     'job_uuid': current_job()['uuid'],
                     'created_by_job_task_uuid': current_task()['uuid'],

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list