[ARVADOS] updated: 0422e3e8f46c7c54d7e33e2eedd805b05c76c7ce
Git user
git at public.curoverse.com
Wed Jul 13 10:30:50 EDT 2016
Summary of changes:
sdk/cwl/arvados_cwl/arvcontainer.py | 25 +++++++++++++++++++------
sdk/cwl/arvados_cwl/pathmapper.py | 4 ++++
2 files changed, 23 insertions(+), 6 deletions(-)
via 0422e3e8f46c7c54d7e33e2eedd805b05c76c7ce (commit)
via 1da448c49cb4ea4b8147e63f325102f793ca206c (commit)
from 27816b602e9da83a2565e6fe8f87f250555b1ba5 (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 0422e3e8f46c7c54d7e33e2eedd805b05c76c7ce
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Jul 13 09:53:48 2016 -0400
9570: Fix secondaryFile staging to ensure that all files are in the same
collection.
diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py
index 19516d5..73ba8d5 100644
--- a/sdk/cwl/arvados_cwl/arvcontainer.py
+++ b/sdk/cwl/arvados_cwl/arvcontainer.py
@@ -42,12 +42,22 @@ class ArvadosContainer(object):
}
}
+ dirs = set()
for f in self.pathmapper.files():
- _, p, _ = self.pathmapper.mapper(f)
- mounts[p] = {
- "kind": "collection",
- "portable_data_hash": p[6:]
- }
+ _, p, tp = self.pathmapper.mapper(f)
+ if tp == "Directory" and '/' not in p[6:]:
+ mounts[p] = {
+ "kind": "collection",
+ "portable_data_hash": p[6:]
+ }
+ dirs.add(p[6:])
+ for f in self.pathmapper.files():
+ _, p, tp = self.pathmapper.mapper(f)
+ if p[6:].split("/")[0] not in dirs:
+ mounts[p] = {
+ "kind": "collection",
+ "portable_data_hash": p[6:]
+ }
if self.generatefiles["listing"]:
raise UnsupportedRequirement("Generate files not supported")
diff --git a/sdk/cwl/arvados_cwl/pathmapper.py b/sdk/cwl/arvados_cwl/pathmapper.py
index 12f7cd7..0dc80fc 100644
--- a/sdk/cwl/arvados_cwl/pathmapper.py
+++ b/sdk/cwl/arvados_cwl/pathmapper.py
@@ -1,5 +1,6 @@
import re
import logging
+import uuid
import arvados.commands.run
import arvados.collection
@@ -123,6 +124,9 @@ class ArvPathMapper(PathMapper):
ab = self.file_pattern % (c.portable_data_hash(), srcobj["basename"])
self._pathmap[srcobj["location"]] = MapperEnt(ab, ab, "File")
+ if srcobj.get("secondaryFiles"):
+ ab = self.collection_pattern % c.portable_data_hash()
+ self._pathmap["_:" + unicode(uuid.uuid4())] = MapperEnt(ab, ab, "Directory")
for loc, sub in subdirs:
ab = self.file_pattern % (c.portable_data_hash(), sub[2:])
self._pathmap[loc] = MapperEnt(ab, ab, "Directory")
commit 1da448c49cb4ea4b8147e63f325102f793ca206c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Jul 12 18:14:53 2016 -0400
9570: Fix for Pathmapper API change. Most tests pass or exit unsupported
feature.
diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py
index 5ad87d1..19516d5 100644
--- a/sdk/cwl/arvados_cwl/arvcontainer.py
+++ b/sdk/cwl/arvados_cwl/arvcontainer.py
@@ -43,13 +43,13 @@ class ArvadosContainer(object):
}
for f in self.pathmapper.files():
- _, p = self.pathmapper.mapper(f)
+ _, p, _ = self.pathmapper.mapper(f)
mounts[p] = {
"kind": "collection",
"portable_data_hash": p[6:]
}
- if self.generatefiles:
+ if self.generatefiles["listing"]:
raise UnsupportedRequirement("Generate files not supported")
container_request["environment"] = {"TMPDIR": "/tmp"}
@@ -59,6 +59,9 @@ class ArvadosContainer(object):
if self.stdin:
raise UnsupportedRequirement("Stdin redirection currently not suppported")
+ if self.stderr:
+ raise UnsupportedRequirement("Stderr redirection currently not suppported")
+
if self.stdout:
mounts["stdout"] = {"kind": "file",
"path": "%s/%s" % (self.outdir, self.stdout)}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list