本文整理匯總了Python中ruffus.Pipeline.check_if_uptodate方法的典型用法代碼示例。如果您正苦於以下問題:Python Pipeline.check_if_uptodate方法的具體用法?Python Pipeline.check_if_uptodate怎麽用?Python Pipeline.check_if_uptodate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ruffus.Pipeline
的用法示例。
在下文中一共展示了Pipeline.check_if_uptodate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_newstyle_graphviz_dot
# 需要導入模塊: from ruffus import Pipeline [as 別名]
# 或者: from ruffus.Pipeline import check_if_uptodate [as 別名]
def test_newstyle_graphviz_dot(self):
test_pipeline = Pipeline("test")
test_pipeline.check_if_uptodate (Up_to_date_task1, lambda : (False, ""))
test_pipeline.follows(Up_to_date_task2, Up_to_date_task1)\
.check_if_uptodate (lambda : (False, ""))\
.graphviz(URL='"http://cnn.com"', fillcolor = '"#FFCCCC"',
color = '"#FF0000"', pencolor='"#FF0000"', fontcolor='"#4B6000"',
label_suffix = "???", label_prefix = "What is this?<BR/> ",
label = "<What <FONT COLOR=\"red\">is</FONT>this>",
shape= "component", height = 1.5, peripheries = 5,
style="dashed")
test_pipeline.follows(Up_to_date_task3, Up_to_date_task2)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Up_to_date_final_target, Up_to_date_task3)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Explicitly_specified_task, Up_to_date_task1)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Task_to_run1, Explicitly_specified_task)
test_pipeline.follows(Task_to_run2, Task_to_run1)
test_pipeline.follows(Task_to_run3, Task_to_run2)
test_pipeline.follows(Up_to_date_task_forced_to_rerun, Task_to_run2)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Final_target, Up_to_date_task_forced_to_rerun, Task_to_run3)
test_pipeline.follows(Downstream_task1_ignored, Final_target)
test_pipeline.follows(Downstream_task2_ignored, Final_target)
if sys.hexversion >= 0x03000000:
# everything is unicode in python3
s = BytesIO()
else:
s = StringIO()
test_pipeline.printout_graph (
s,
# use flowchart file name extension to decide flowchart format
# e.g. svg, jpg etc.
"dot",
[Final_target, Up_to_date_final_target])
self.assertTrue('[URL="http://cnn.com", color="#FF0000", fillcolor="#FFCCCC", fontcolor="#4B6000", height=1.5, label=<What is this?<BR/> What <FONT COLOR="red">is</FONT>this???>, pencolor="#FF0000", peripheries=5, shape=component, style=dashed]' in s.getvalue().decode())