Module Expr Str Import alias Import alias ImportFrom alias Import alias identifier FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str If CompareGt NameLoad Num body For NameStore Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad Num Num body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str Dict Str NameLoad Expr Call NameLoad NameLoad BinOpSub NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str If CompareGt Call AttributeLoad NameLoad attr Num body Raise Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad BinOpMod Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str If CompareGt Call AttributeLoad NameLoad attr Num body Raise Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad BinOpAdd Num BinOpMult Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad BinOpAdd Num BinOpMult Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad keyword BinOpMult Call AttributeLoad NameLoad attr Num keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assert CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Assert CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assert CompareLtE AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assert CompareLtE AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If CompareGt Call AttributeLoad NameLoad attr Num body Raise Call NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad keyword BinOpMult Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assert CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad If CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad Call NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Import alias Return Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body ImportFrom alias Expr Call NameLoad Expr Call NameLoad
N/A N/A Script is part of tests of scriptTree.

The test reuses elements of the jobTree tests.
 N/A os N/A random optparse OptionParser N/A xml.etree.ElementTree ET makeFileTree N/A N/A rootFile remainingDepth tempFileTree N/A N/A N/A Makes a random tree of linked files.
     N/A tree N/A N/A ET Element tree N/A N/A N/A tree attrib N/A count 0 N/A children N/A N/A ET SubElement tree children N/A N/A remainingDepth 0 N/A N/A i N/A xrange N/A N/A random choice N/A xrange 1 10 N/A N/A childFile N/A N/A tempFileTree getTempFile N/A N/A N/A ET SubElement children child N/A file childFile N/A N/A makeFileTree childFile N/A remainingDepth 1 tempFileTree N/A fileHandle N/A open rootFile w N/A N/A N/A N/A N/A ET ElementTree tree write fileHandle N/A N/A N/A fileHandle close N/A makeTreePointer N/A N/A treeNode tempFile N/A N/A N/A tree N/A N/A ET Element tree_pointer N/A N/A N/A tree attrib N/A file treeNode N/A N/A N/A ET SubElement tree children N/A fileHandle N/A open tempFile w N/A N/A N/A N/A N/A ET ElementTree tree write fileHandle N/A N/A N/A fileHandle close N/A tempFile N/A sonLib.bioio logger sonLib.bioio TempFileTree sonLib.bioio getRandomAlphaNumericString sonLib.bioio system jobTree.scriptTree.target Target jobTree.scriptTree.stack Stack SetupFileTree N/A Target N/A N/A Target extends run to create a tree of files, upon which the jobTreeTest_Command scripts
    are run.
    
    It creates a child target, which doesn't do much apart from issue the jobTreeTest_Command,
    and a clean up target, which cleans up the file tree the thing creates.
     __init__ N/A N/A self N/A N/A N/A N/A N/A Target __init__ self 5 N/A N/A self depth 0 N/A run N/A N/A self N/A N/A N/A tempFileTree N/A TempFileTree N/A N/A N/A os path join N/A N/A self getGlobalTempDir N/A getRandomAlphaNumericString N/A fileTreeRootFile N/A N/A tempFileTree getTempFile N/A N/A makeFileTree fileTreeRootFile N/A self depth tempFileTree N/A treePointer N/A N/A tempFileTree getTempFile N/A N/A makeTreePointer fileTreeRootFile treePointer N/A N/A N/A logger info We've set up the file tree N/A N/A N/A N/A random random 0.5 N/A N/A N/A RuntimeError N/A N/A N/A self addChildTarget N/A ChildTarget treePointer N/A N/A N/A self setFollowOnTarget N/A DestructFileTree tempFileTree N/A N/A N/A logger info We've added the child target and finished SetupFileTree.run() N/A N/A DestructFileTree N/A Target N/A N/A Cleans up the stuff created by the previous target.
     __init__ N/A N/A self tempFileTree N/A N/A N/A N/A N/A Target __init__ self 10 N/A N/A self tempFileTree tempFileTree N/A run N/A N/A self N/A N/A N/A N/A N/A logger info At the end, this is the contents of the global temp dir... N/A N/A system N/A ls -l %s N/A N/A self getGlobalTempDir N/A N/A N/A logger info And done.... N/A N/A N/A N/A random random 0.5 N/A N/A N/A RuntimeError N/A N/A N/A N/A self tempFileTree destroyTempFiles N/A N/A ChildTarget N/A Target N/A N/A A simple target that simply issues the jobTreeTest_Command.. command.
     __init__ N/A N/A self treePointer N/A N/A N/A N/A N/A Target __init__ self 10 N/A N/A self treePointer treePointer N/A run N/A N/A self N/A N/A N/A N/A N/A self addChildCommand echo HELLO N/A N/A N/A logger info Added the child command and finished ChildTarget.run() N/A N/A Target2 N/A Target N/A N/A This target checks the temp file is still
    present which was created by Target1. This target is from scriptTreeTest_Wrapper, and
    shows we can serialise targets that were not created in the same file as from which execution occurs.
    
    Also tests making CPU and Memory requirements..
     __init__ N/A N/A self tempFileName N/A N/A N/A N/A self requestedMemory N/A int N/A 1 N/A N/A N/A random random 100000000 N/A N/A self requestedCpu N/A int N/A 1 N/A N/A N/A random random 1 N/A N/A N/A Target __init__ self time N/A N/A N/A random random 10 memory N/A self requestedMemory cpu N/A self requestedCpu N/A N/A self tempFileName tempFileName N/A run N/A N/A self N/A N/A N/A N/A N/A N/A os listdir N/A N/A self getLocalTempDir N/A N/A N/A N/A N/A os listdir N/A N/A self getGlobalTempDir N/A N/A self tempFileName N/A N/A N/A self setFollowOnTarget N/A Target3 N/A self tempFileName N/A N/A N/A self requestedMemory N/A N/A self getMemory N/A N/A N/A self requestedCpu N/A N/A self getCpu N/A N/A N/A N/A random random 0.5 N/A N/A N/A RuntimeError N/A N/A Target3 N/A Target N/A N/A This target cleans up file created in target 1. This target is from scriptTreeTest_Wrapper, and
    shows we can serialise targets that were not created in the same file as from which execution occurs.
     __init__ N/A N/A self tempFileName N/A N/A N/A N/A N/A Target __init__ self time N/A N/A N/A random random 10 N/A N/A self tempFileName tempFileName N/A run N/A N/A self N/A N/A N/A N/A N/A N/A os listdir N/A N/A self getLocalTempDir N/A N/A N/A N/A N/A os listdir N/A N/A self getGlobalTempDir N/A N/A self tempFileName N/A N/A N/A N/A os remove N/A N/A N/A os path join N/A N/A self getGlobalTempDir N/A self tempFileName N/A N/A N/A N/A os listdir N/A N/A self getGlobalTempDir N/A N/A N/A main N/A N/A N/A N/A N/A parser N/A OptionParser N/A N/A N/A Stack addJobTreeOptions parser N/A N/A options args N/A N/A parser parse_args N/A N/A N/A N/A Stack N/A SetupFileTree startJobTree options N/A _test N/A N/A N/A N/A N/A doctest N/A N/A N/A doctest testmod N/A N/A N/A __name__ __main__ N/A jobTree.test.scriptTreeTest_Wrapper * N/A N/A _test N/A N/A main