[ARVADOS] updated: 1.1.2-51-g75cb314
Git user
git at public.curoverse.com
Mon Jan 15 15:51:18 EST 2018
Summary of changes:
sdk/cwl/arvados_cwl/__init__.py | 7 ++++++-
sdk/cwl/arvados_cwl/arvworkflow.py | 3 ++-
sdk/cwl/arvados_cwl/runner.py | 2 +-
sdk/cwl/tests/test_container.py | 15 ++++++++++-----
sdk/cwl/tests/test_job.py | 6 ++++--
sdk/cwl/tests/test_submit.py | 4 ++++
6 files changed, 27 insertions(+), 10 deletions(-)
via 75cb3149396f6385d6af30deaed74ee87ace696d (commit)
from ce7505914ba4c53a7aa1d987aaf92de81af1fb49 (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 75cb3149396f6385d6af30deaed74ee87ace696d
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Mon Jan 15 15:22:49 2018 -0500
12934: Fix unit tests.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index bb01796..6aa4c8f 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -22,7 +22,6 @@ from cwltool.errors import WorkflowException
import cwltool.main
import cwltool.workflow
import cwltool.process
-import schema_salad
from schema_salad.sourceline import SourceLine
import arvados
@@ -379,6 +378,12 @@ class ArvCwlRunner(object):
metadata=tool.metadata,
override_tools=override_tools)
+ tool.doc_loader.fetcher_constructor = partial(CollectionFetcher,
+ api_client=self.api,
+ fs_access=CollectionFsAccess("", collection_cache=self.collection_cache),
+ num_retries=self.num_retries,
+ overrides=override_tools)
+
# Upload local file references in the job order.
job_order = upload_job_order(self, "%s input" % kwargs["name"],
tool, job_order)
diff --git a/sdk/cwl/arvados_cwl/arvworkflow.py b/sdk/cwl/arvados_cwl/arvworkflow.py
index 79bfacd..4acdc32 100644
--- a/sdk/cwl/arvados_cwl/arvworkflow.py
+++ b/sdk/cwl/arvados_cwl/arvworkflow.py
@@ -173,7 +173,8 @@ class ArvadosWorkflow(Workflow):
}]
}],
"hints": self.hints,
- "arguments": ["--no-container", "--move-outputs", "--preserve-entire-environment", "workflow.cwl#main", "cwl.input.yml"]
+ "arguments": ["--no-container", "--move-outputs", "--preserve-entire-environment", "workflow.cwl#main", "cwl.input.yml"],
+ "id": "#"
})
kwargs["loader"] = self.doc_loader
kwargs["avsc_names"] = self.doc_schema
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index 28de7f3..28c35ad 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -246,7 +246,7 @@ def upload_workflow_deps(arvrunner, tool, override_tools):
False,
include_primary=False)
document_loader.idx[deptool["id"]] = deptool
- override_tools[deptool["id"]] = json.dumps(deptool)
+ override_tools[deptool["id"]] = yaml.round_trip_dump(deptool)
tool.visit(upload_tool_deps)
diff --git a/sdk/cwl/tests/test_container.py b/sdk/cwl/tests/test_container.py
index c516d7b..c206934 100644
--- a/sdk/cwl/tests/test_container.py
+++ b/sdk/cwl/tests/test_container.py
@@ -44,7 +44,8 @@ class TestContainer(unittest.TestCase):
"inputs": [],
"outputs": [],
"baseCommand": "ls",
- "arguments": [{"valueFrom": "$(runtime.outdir)"}]
+ "arguments": [{"valueFrom": "$(runtime.outdir)"}],
+ "id": "#"
})
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess,
collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))
@@ -124,7 +125,8 @@ class TestContainer(unittest.TestCase):
"class": "http://arvados.org/cwl#ReuseRequirement",
"enableReuse": False
}],
- "baseCommand": "ls"
+ "baseCommand": "ls",
+ "id": "#"
})
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess,
collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))
@@ -231,7 +233,8 @@ class TestContainer(unittest.TestCase):
"location": "keep:99999999999999999999999999999995+99/subdir"
} ]
}],
- "baseCommand": "ls"
+ "baseCommand": "ls",
+ "id": "#"
})
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess,
collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))
@@ -329,7 +332,8 @@ class TestContainer(unittest.TestCase):
"stdout": "stdout.txt",
"stderr": "stderr.txt",
"stdin": "/keep/99999999999999999999999999999996+99/file.txt",
- "arguments": [{"valueFrom": "$(runtime.outdir)"}]
+ "arguments": [{"valueFrom": "$(runtime.outdir)"}],
+ "id": "#"
})
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess,
collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))
@@ -449,7 +453,8 @@ class TestContainer(unittest.TestCase):
],
"outputs": [],
"baseCommand": "ls",
- "arguments": [{"valueFrom": "$(runtime.outdir)"}]
+ "arguments": [{"valueFrom": "$(runtime.outdir)"}],
+ "id": "#"
})
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess,
collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))
diff --git a/sdk/cwl/tests/test_job.py b/sdk/cwl/tests/test_job.py
index faac1f7..309ac09 100644
--- a/sdk/cwl/tests/test_job.py
+++ b/sdk/cwl/tests/test_job.py
@@ -52,7 +52,8 @@ class TestJob(unittest.TestCase):
"inputs": [],
"outputs": [],
"baseCommand": "ls",
- "arguments": [{"valueFrom": "$(runtime.outdir)"}]
+ "arguments": [{"valueFrom": "$(runtime.outdir)"}],
+ "id": "#"
})
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess,
collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))
@@ -142,7 +143,8 @@ class TestJob(unittest.TestCase):
"class": "http://arvados.org/cwl#ReuseRequirement",
"enableReuse": False
}],
- "baseCommand": "ls"
+ "baseCommand": "ls",
+ "id": "#"
}
make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess,
collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))
diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py
index 059b472..9cabea0 100644
--- a/sdk/cwl/tests/test_submit.py
+++ b/sdk/cwl/tests/test_submit.py
@@ -532,6 +532,10 @@ class TestSubmit(unittest.TestCase):
"enableReuse": False,
},
]
+ expect_container["mounts"]["/var/lib/cwl/workflow.json"]["content"]["$graph"][0]["$namespaces"] = {
+ "arv": "http://arvados.org/cwl#",
+ "cwltool": "http://commonwl.org/cwltool#"
+ }
stubs.api.container_requests().create.assert_called_with(
body=JsonDiffMatcher(expect_container))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list