[ARVADOS] created: 16eeca3890937e21e92893c077ffa8066cb5bd8f
Git user
git at public.curoverse.com
Thu Aug 11 10:55:33 EDT 2016
at 16eeca3890937e21e92893c077ffa8066cb5bd8f (commit)
commit 16eeca3890937e21e92893c077ffa8066cb5bd8f
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Aug 8 14:27:40 2016 -0400
9552: import compute_checksums from cwltool. Bump cwltool version.
diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index e1c0ac3..fec4950 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -467,7 +467,7 @@ fpm_build schema_salad "" "" python 1.14.20160708181155
fpm_build ruamel.yaml "" "" python 0.11.11 --python-setup-py-arguments "--single-version-externally-managed"
# And for cwltool we have the same problem as for schema_salad. Ward, 2016-03-17
-fpm_build cwltool "" "" python 1.0.20160726135535
+fpm_build cwltool "" "" python 1.0.20160810161358
# FPM eats the trailing .0 in the python-rdflib-jsonld package when built with 'rdflib-jsonld>=0.3.0'. Force the version. Ward, 2016-03-25
fpm_build rdflib-jsonld "" "" python 0.3.0
diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 99db9f1..8e964d3 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -9,6 +9,7 @@ import os
import sys
import threading
import hashlib
+import functools
import pkg_resources # part of setuptools
from cwltool.errors import WorkflowException
@@ -26,6 +27,7 @@ from .fsaccess import CollectionFsAccess
from cwltool.process import shortname, UnsupportedRequirement
from cwltool.pathmapper import adjustFileObjs
+from cwltool.draft2tool import compute_checksums
from arvados.api import OrderedJsonModel
logger = logging.getLogger('arvados.cwl-runner')
@@ -228,17 +230,7 @@ class ArvCwlRunner(object):
raise WorkflowException("Workflow did not return a result.")
if kwargs.get("compute_checksum"):
- def compute_checksums(fileobj):
- if "checksum" not in fileobj:
- checksum = hashlib.sha1()
- with self.fs_access.open(fileobj["location"], "rb") as f:
- contents = f.read(1024*1024)
- while contents != "":
- checksum.update(contents)
- contents = f.read(1024*1024)
- fileobj["checksum"] = "sha1$%s" % checksum.hexdigest()
-
- adjustFileObjs(self.final_output, compute_checksums)
+ adjustFileObjs(self.final_output, functools.partial(compute_checksums, self.fs_access))
return self.final_output
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 9fcbdd7..60ea7ab 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -32,7 +32,7 @@ setup(name='arvados-cwl-runner',
# Make sure to update arvados/build/run-build-packages.sh as well
# when updating the cwltool version pin.
install_requires=[
- 'cwltool==1.0.20160726135535',
+ 'cwltool==1.0.20160810161358',
'arvados-python-client>=0.1.20160714204738',
],
data_files=[
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list