[ARVADOS] updated: 1.3.0-165-g9d6a7e96d

Git user git at public.curoverse.com
Thu Jan 17 15:55:44 EST 2019


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py   | 3 ++-
 sdk/cwl/arvados_cwl/arvjob.py     | 3 ++-
 sdk/cwl/arvados_cwl/done.py       | 4 ++--
 sdk/cwl/arvados_cwl/fsaccess.py   | 4 ++--
 sdk/cwl/arvados_cwl/pathmapper.py | 3 ++-
 sdk/cwl/arvados_cwl/runner.py     | 4 ++--
 6 files changed, 12 insertions(+), 9 deletions(-)

       via  9d6a7e96d03d1468a992f1b4038de970d40f3c78 (commit)
       via  45bc60373abee3185ccd9ad757e6e2a1d98fd5d2 (commit)
      from  3e0836a454bde7c61192700b5ba96a319e5fafe5 (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 9d6a7e96d03d1468a992f1b4038de970d40f3c78
Author: Eric Biagiotti <ebiagiotti at veritasgenetcs.com>
Date:   Thu Jan 17 15:55:24 2019 -0500

    13306: Updating dict items as lists to improve py2 performance
    
    Arvados-DCO-1.1-Signed-off-by:  Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 6e45ec576..09deabd22 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -6,6 +6,7 @@
 # Implement cwl-runner interface for submitting and running work on Arvados, using
 # either the Crunch jobs API or Crunch containers API.
 
+from future.utils import viewitems
 from builtins import str
 
 import argparse
@@ -273,7 +274,7 @@ def main(args, stdout, stderr, api_client=None, keep_client=None,
 
     add_arv_hints()
 
-    for key, val in list(cwltool.argparser.get_default_args().items()):
+    for key, val in viewitems(cwltool.argparser.get_default_args()):
         if not hasattr(arvargs, key):
             setattr(arvargs, key, val)
 
diff --git a/sdk/cwl/arvados_cwl/arvjob.py b/sdk/cwl/arvados_cwl/arvjob.py
index 2d1f7d211..bdf798d30 100644
--- a/sdk/cwl/arvados_cwl/arvjob.py
+++ b/sdk/cwl/arvados_cwl/arvjob.py
@@ -4,6 +4,7 @@
 
 from past.builtins import basestring
 from builtins import object
+from future.utils import viewitems
 
 import logging
 import re
@@ -346,7 +347,7 @@ class RunnerJob(Runner):
             find_or_create=self.enable_reuse
         ).execute(num_retries=self.arvrunner.num_retries)
 
-        for k,v in list(job_spec["script_parameters"].items()):
+        for k,v in viewitems(job_spec["script_parameters"]):
             if v is False or v is None or isinstance(v, dict):
                 job_spec["script_parameters"][k] = {"value": v}
 
diff --git a/sdk/cwl/arvados_cwl/pathmapper.py b/sdk/cwl/arvados_cwl/pathmapper.py
index 484b2093b..2be850c5c 100644
--- a/sdk/cwl/arvados_cwl/pathmapper.py
+++ b/sdk/cwl/arvados_cwl/pathmapper.py
@@ -6,6 +6,7 @@ from future import standard_library
 standard_library.install_aliases()
 from builtins import str
 from past.builtins import basestring
+from future.utils import viewitems
 
 import re
 import logging
@@ -306,7 +307,7 @@ class VwdPathMapper(StagingPathMapper):
         # with any secondary files.
         self.visitlisting(referenced_files, self.stagedir, basedir)
 
-        for path, (ab, tgt, type, staged) in list(self._pathmap.items()):
+        for path, (ab, tgt, type, staged) in viewitems(self._pathmap):
             if type in ("File", "Directory") and ab.startswith("keep:"):
                 self._pathmap[path] = MapperEnt("$(task.keep)/%s" % ab[5:], tgt, type, staged)
 
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index 8bcad4828..2a86a0556 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -4,7 +4,7 @@
 
 from future import standard_library
 standard_library.install_aliases()
-from future.utils import viewvalues
+from future.utils import  viewvalues, viewitems
 
 import os
 import urllib.parse
@@ -236,7 +236,7 @@ def packed_workflow(arvrunner, tool, merged_map):
     packed = pack(tool.doc_loader, tool.doc_loader.fetch(tool.tool["id"]),
                   tool.tool["id"], tool.metadata, rewrite_out=rewrites)
 
-    rewrite_to_orig = {v: k for k,v in list(rewrites.items())}
+    rewrite_to_orig = {v: k for k,v in viewitems(rewrites)}
 
     def visit(v, cur_id):
         if isinstance(v, dict):

commit 45bc60373abee3185ccd9ad757e6e2a1d98fd5d2
Author: Eric Biagiotti <ebiagiotti at veritasgenetcs.com>
Date:   Thu Jan 17 15:40:08 2019 -0500

    13306: Fixing previous commit to use viewvalues instead of listvalues
    
    Arvados-DCO-1.1-Signed-off-by:  Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_cwl/done.py b/sdk/cwl/arvados_cwl/done.py
index eeef4bce3..378192b62 100644
--- a/sdk/cwl/arvados_cwl/done.py
+++ b/sdk/cwl/arvados_cwl/done.py
@@ -2,7 +2,7 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
-from future.utils import listvalues
+from future.utils import viewvalues
 
 import re
 from cwltool.errors import WorkflowException
@@ -93,7 +93,7 @@ def logtail(logcollection, logfunc, header, maxlen=25):
             loglines.append("%s %s %s" % (ts, earliest, msg))
         loglines = loglines[-maxlen:]
     else:
-        loglines = listvalues(mergelogs)[0]
+        loglines = viewvalues(mergelogs)[0]
 
     logtxt = "\n  ".join(l.strip() for l in loglines)
     logfunc("%s\n\n  %s", header, logtxt)
diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py
index 383a816bb..dbcc66245 100644
--- a/sdk/cwl/arvados_cwl/fsaccess.py
+++ b/sdk/cwl/arvados_cwl/fsaccess.py
@@ -5,7 +5,7 @@
 from future import standard_library
 standard_library.install_aliases()
 from builtins import object
-from future.utils import listvalues
+from future.utils import viewvalues
 
 import fnmatch
 import os
@@ -295,7 +295,7 @@ def collectionResolver(api_client, document_loader, uri, num_retries=4):
 
     if pipeline_template_uuid_pattern.match(uri):
         pt = api_client.pipeline_templates().get(uuid=uri).execute(num_retries=num_retries)
-        return "keep:" + listvalues(pt["components"])[0]["script_parameters"]["cwl:tool"]
+        return "keep:" + viewvalues(pt["components"])[0]["script_parameters"]["cwl:tool"]
 
     p = uri.split("/")
     if arvados.util.keep_locator_pattern.match(p[0]):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list