workflow.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:scriptcwl 作者: NLeSC 项目源码 文件源码
def validate(self, inline=False):
        """Validate workflow object.

        This method currently validates the workflow object with the use of
        cwltool. It writes the workflow to a tmp CWL file, reads it, validates
        it and removes the tmp file again. By default, the workflow is written
        to file using absolute paths to the steps. Optionally, the steps can be
        saved inline.
        """
        # define tmpfile
        (fd, tmpfile) = tempfile.mkstemp()
        os.close(fd)
        try:
            # save workflow object to tmpfile,
            # do not recursively call validate function
            self.save(tmpfile, inline=inline, validate=False, relative=False,
                      wd=False)
            # load workflow from tmpfile
            document_loader, processobj, metadata, uri = load_cwl(tmpfile)
        finally:
            # cleanup tmpfile
            os.remove(tmpfile)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号