"project_uuid": "zzzzz-8i9sb-zzzzzzzzzzzzzzz"
})
- def make_tool(toolpath_object, loadingContext):
- return arvados_cwl.ArvadosCommandTool(runner, toolpath_object, loadingContext)
- runner.arv_make_tool.side_effect = make_tool
+ if isinstance(runner, mock.MagicMock):
+ def make_tool(toolpath_object, loadingContext):
+ return arvados_cwl.ArvadosCommandTool(runner, toolpath_object, loadingContext)
+ runner.arv_make_tool.side_effect = make_tool
return loadingContext, runtimeContext
"outputs": [],
"baseCommand": "ls",
"arguments": [{"valueFrom": "$(runtime.outdir)"}],
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool"
+ "id": "",
+ "class": "CommandLineTool",
+ "cwlVersion": "v1.2"
})
loadingContext, runtimeContext = self.helper(runner, enable_reuse)
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
for j in arvtool.job({}, mock.MagicMock(), runtimeContext):
'name': 'test_run_'+str(enable_reuse),
'runtime_constraints': {
'vcpus': 1,
- 'ram': 1073741824
+ 'ram': 268435456
},
'use_existing': enable_reuse,
'priority': 500,
# For the remaining fields, the defaults will apply: {'cores': 1, 'ram': 1024, 'outdirSize': 1024, 'tmpdirSize': 1024}
@mock.patch("arvados.commands.keepdocker.list_images_in_arv")
def test_resource_requirements(self, keepdocker):
+ arvados_cwl.add_arv_hints()
runner = mock.MagicMock()
runner.ignore_docker_for_reuse = False
runner.intermediate_output_ttl = 3600
"class": "http://arvados.org/cwl#IntermediateOutput",
"outputTTL": 7200
}, {
- "class": "http://arvados.org/cwl#ReuseRequirement",
+ "class": "WorkReuse",
"enableReuse": False
}],
"baseCommand": "ls",
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool"
+ "id": "",
+ "class": "CommandLineTool",
+ "cwlVersion": "v1.2"
})
loadingContext, runtimeContext = self.helper(runner)
runtimeContext.name = "test_resource_requirements"
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
for j in arvtool.job({}, mock.MagicMock(), runtimeContext):
j.run(runtimeContext)
"stderr": "stderr.txt",
"stdin": "/keep/99999999999999999999999999999996+99/file.txt",
"arguments": [{"valueFrom": "$(runtime.outdir)"}],
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool"
+ "id": "",
+ "class": "CommandLineTool",
+ "cwlVersion": "v1.2"
})
loadingContext, runtimeContext = self.helper(runner)
runtimeContext.name = "test_run_redirect"
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
for j in arvtool.job({}, mock.MagicMock(), runtimeContext):
j.run(runtimeContext)
'name': 'test_run_redirect',
'runtime_constraints': {
'vcpus': 1,
- 'ram': 1073741824
+ 'ram': 268435456
},
'use_existing': True,
'priority': 500,
"outputs": [],
"baseCommand": "ls",
"arguments": [{"valueFrom": "$(runtime.outdir)"}],
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool"
+ "id": "",
+ "class": "CommandLineTool",
+ "cwlVersion": "v1.2"
})
loadingContext, runtimeContext = self.helper(runner)
runtimeContext.name = "test_run_mounts"
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
job_order = {
"p1": {
'name': 'test_run_mounts',
'runtime_constraints': {
'vcpus': 1,
- 'ram': 1073741824
+ 'ram': 268435456
},
'use_existing': True,
'priority': 500,
# Hence the default resources will apply: {'cores': 1, 'ram': 1024, 'outdirSize': 1024, 'tmpdirSize': 1024}
@mock.patch("arvados.commands.keepdocker.list_images_in_arv")
def test_secrets(self, keepdocker):
+ arvados_cwl.add_arv_hints()
runner = mock.MagicMock()
runner.ignore_docker_for_reuse = False
runner.intermediate_output_ttl = 0
document_loader, avsc_names, schema_metadata, metaschema_loader = cwltool.process.get_schema("v1.1")
tool = cmap({"arguments": ["md5sum", "example.conf"],
- "class": "org.w3id.cwl.cwl.CommandLineTool",
+ "class": "CommandLineTool",
+ "cwlVersion": "v1.2",
"hints": [
{
"class": "http://commonwl.org/cwltool#Secrets",
]
}
],
- "id": "#secret_job.cwl",
+ "id": "",
"inputs": [
{
"id": "#secret_job.cwl/pw",
loadingContext, runtimeContext = self.helper(runner)
runtimeContext.name = "test_secrets"
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
job_order = {"pw": "blorp"}
'name': 'test_secrets',
'runtime_constraints': {
'vcpus': 1,
- 'ram': 1073741824
+ 'ram': 268435456
},
'use_existing': True,
'priority': 500,
"outputs": [],
"baseCommand": "ls",
"arguments": [{"valueFrom": "$(runtime.outdir)"}],
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool",
+ "id": "",
+ "cwlVersion": "v1.2",
+ "class": "CommandLineTool",
"hints": [
{
"class": "ToolTimeLimit",
loadingContext, runtimeContext = self.helper(runner)
runtimeContext.name = "test_timelimit"
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
for j in arvtool.job({}, mock.MagicMock(), runtimeContext):
"outputs": [],
"baseCommand": "ls",
"arguments": [{"valueFrom": "$(runtime.outdir)"}],
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool",
+ "id": "",
+ "cwlVersion": "v1.2",
+ "class": "CommandLineTool",
"hints": [
{
"class": "http://arvados.org/cwl#OutputStorageClass",
loadingContext, runtimeContext = self.helper(runner, True)
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
for j in arvtool.job({}, mock.MagicMock(), runtimeContext):
'name': 'test_run_True',
'runtime_constraints': {
'vcpus': 1,
- 'ram': 1073741824
+ 'ram': 268435456
},
'use_existing': True,
'priority': 500,
"outputs": [],
"baseCommand": "ls",
"arguments": [{"valueFrom": "$(runtime.outdir)"}],
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool",
+ "id": "",
+ "class": "CommandLineTool",
+ "cwlVersion": "v1.2",
"hints": [
{
"class": "http://arvados.org/cwl#ProcessProperties",
loadingContext, runtimeContext = self.helper(runner, True)
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
for j in arvtool.job({"x": "blorp"}, mock.MagicMock(), runtimeContext):
'name': 'test_run_True',
'runtime_constraints': {
'vcpus': 1,
- 'ram': 1073741824
+ 'ram': 268435456
},
'use_existing': True,
'priority': 500,
# Hence the default resources will apply: {'cores': 1, 'ram': 1024, 'outdirSize': 1024, 'tmpdirSize': 1024}
@mock.patch("arvados.commands.keepdocker.list_images_in_arv")
def test_cuda_requirement(self, keepdocker):
+ arvados_cwl.add_arv_hints()
arv_docker_clear_cache()
runner = mock.MagicMock()
"outputs": [],
"baseCommand": "nvidia-smi",
"arguments": [],
- "id": "#",
- "class": "org.w3id.cwl.cwl.CommandLineTool",
+ "id": "",
+ "cwlVersion": "v1.2",
+ "class": "CommandLineTool",
"hints": [
{
"class": "http://arvados.org/cwl#CUDARequirement",
loadingContext, runtimeContext = self.helper(runner, True)
- arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, loadingContext)
+ arvtool = cwltool.load_tool.load_tool(tool, loadingContext)
arvtool.formatgraph = None
for j in arvtool.job({}, mock.MagicMock(), runtimeContext):
'name': 'test_run_True',
'runtime_constraints': {
'vcpus': 1,
- 'ram': 1073741824,
+ 'ram': 268435456,
'cuda': {
'device_count': 1,
'driver_version': "11.0",