用于生物信息学和科学计算的工作流(作业)引擎/管道。
pypipegraph的Python项目详细描述
pypipegraph
Build status: | |
---|---|
Documentation | https://pypipegraph.readthedocs.io/en/latest/ |
Code style | ](https://github.com/ambv/black) |
简介
pypipegraph:是 麻省理工学院授权的图书馆,用于逐件构建工作流 只执行需要(重新)完成的部分。它支持 使用多核(smp)和(最终,现在是alpha代码) 机器(集群)是依赖跟踪程序(思考 “make”)和集群引擎。
更具体地说,您可以构造作业,它封装输出(即 需要做的事情),不变量(强制重新评估 如果作业发生变化,则输出作业,并将其填充在中间(例如,从 磁盘)。
从你的角度来看,你创建了一个pypipegraph,你创建了作业, 把它们连在一起,然后让pypipegraph运行。它检查所有 需要运行的作业(或者因为尚未完成, 或者因为它们已经失效),将它们分布到多个 python实例,并让它们以合理的顺序执行。
它对因任何原因而死亡的工作(只有失败的工作)是强有力的 “下游”的一切都将受到影响,独立工作将 继续运行),允许您在“中间”作业的任意点继续, 把工作隔离开来。
pypipegraph仅支持python 3。
30秒摘要
pypipegraph.new_pipeline()output_filenameA='sampleA.txt'defdo_the_work():op=open(output_filename,'wb').write("hello world")jobA=pypipegraph.FileGeneratingJob(output_filenameA,do_the_work)output_filenameB='sampleB.txt'defdo_the_work():op=open(output_filenameB,'wb').write(open(output_filenameA,'rb').read()+", once again")jobB=pypipegraph.FileGeneratingJob(output_filenameB,do_the_work)jobB.depends_on(jobA)pypipegraph.run()print('the pipegraph is done and has returned control to you.')print('sampleA.txt contains "hello world"')print('sampleB.txt contains "hello world, once again")