本文整理汇总了Python中builder.Builder.files方法的典型用法代码示例。如果您正苦于以下问题:Python Builder.files方法的具体用法?Python Builder.files怎么用?Python Builder.files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类builder.Builder
的用法示例。
在下文中一共展示了Builder.files方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _init_job
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import files [as 别名]
def _init_job(self, joborder, input_basedir, **kwargs):
builder = Builder()
builder.job = copy.deepcopy(joborder)
for i in self.tool["inputs"]:
d = shortname(i["id"])
if d not in builder.job and "default" in i:
builder.job[d] = i["default"]
for r in self.requirements:
if r["class"] not in supportedProcessRequirements:
raise WorkflowException("Unsupported process requirement %s" % (r["class"]))
# Validate job order
try:
validate.validate_ex(self.names.get_name("input_record_schema", ""), builder.job)
except validate.ValidationException as e:
raise WorkflowException("Error validating input record, " + str(e))
builder.files = []
builder.bindings = []
builder.schemaDefs = self.schemaDefs
builder.names = self.names
builder.requirements = self.requirements
builder.resources = {}
builder.timeout = kwargs.get("eval_timeout")
dockerReq, _ = self.get_requirement("DockerRequirement")
if dockerReq and kwargs.get("use_container"):
builder.outdir = kwargs.get("docker_outdir") or "/var/spool/cwl"
builder.tmpdir = kwargs.get("docker_tmpdir") or "/tmp"
else:
builder.outdir = kwargs.get("outdir") or tempfile.mkdtemp()
builder.tmpdir = kwargs.get("tmpdir") or tempfile.mkdtemp()
builder.fs_access = kwargs.get("fs_access") or StdFsAccess(input_basedir)
if self.formatgraph:
for i in self.tool["inputs"]:
d = shortname(i["id"])
if d in builder.job and i.get("format"):
checkFormat(builder.job[d], builder.do_eval(i["format"]), self.requirements, self.formatgraph)
builder.bindings.extend(builder.bind_input(self.inputs_record_schema, builder.job))
builder.resources = self.evalResources(builder, kwargs)
return builder