Permalink
Browse files

Documenting the test cases for running the workflows with different i…

…nput and combinations.
  • Loading branch information...
Parichit Sharma
Parichit Sharma committed May 29, 2018
1 parent 65dcbbc commit 845161ee91086ed7edf477085eeedc3ec64a178d
@@ -22,6 +22,9 @@ def run_flow(flow):
force and output strategies. The resulting parameters are then fed to
the workflow's run method.
"""
#import pdb
#pdb.set_trace()

parser = IntrospectiveArgumentParser()
sub_flows_dicts = parser.add_workflow(flow)

@@ -51,6 +54,8 @@ def run_flow(flow):

args = parser.get_flow_args()



logging.basicConfig(filename=args['log_file'],
format='%(levelname)s:%(message)s',
level=get_level(args['log_level']))
@@ -49,6 +49,8 @@ def connect_output_paths(inputs, out_dir, out_files, output_strategy='append',
-------
A list of output file paths.
"""


outputs = []
if isinstance(inputs, string_types):
inputs = [inputs]
@@ -139,6 +141,7 @@ def io_iterator(inputs, out_dir, fnames, output_strategy='append',
-------
Properly instantiated IOIterator object.
"""

io_it = IOIterator(output_strategy=output_strategy, mix_names=mix_names)
io_it.set_inputs(*inputs)
io_it.set_out_dir(out_dir)
@@ -147,6 +150,9 @@ def io_iterator(inputs, out_dir, fnames, output_strategy='append',
if out_keys:
io_it.set_output_keys(*out_keys)

#for it in io_it:
# print(it)

return io_it


@@ -167,6 +173,7 @@ def io_iterator_(frame, fnc, output_strategy='append', mix_names=False):
-------
Properly instantiated IOIterator object.
"""

args, _, _, values = inspect.getargvalues(frame)
args.remove('self')
del values['self']
@@ -212,7 +219,6 @@ def __init__(self, output_strategy='append', mix_names=False):
self.inputs = []
self.out_keys = None


def set_inputs(self, *args):
self.input_args = list(args)
self.inputs = [sorted(glob(inp)) for inp in self.input_args if type(inp) == str]
@@ -8,7 +8,7 @@


class Workflow(object):
def __init__(self, output_strategy='append', mix_names=False,
def __init__(self, output_strategy='absolute', mix_names=False,
force=False, skip=False):
""" The basic workflow object.
@@ -21,6 +21,7 @@ def __init__(self, output_strategy='append', mix_names=False,
self._force_overwrite = force
self._skip = skip


def get_io_iterator(self):
""" Create an iterator for IO.
Binary file not shown.
@@ -0,0 +1 @@
I am the one
@@ -0,0 +1 @@
I am number two
@@ -0,0 +1,3 @@
I am the one
I am number two
dipy
@@ -0,0 +1,5 @@
I am the one
I am number two
dipyI am the one
I am number two
dipy
@@ -0,0 +1,2 @@
I am the one
dipy
No changes.
No changes.
@@ -0,0 +1 @@
dipydipy dipy
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
@@ -0,0 +1 @@
dipy dipy
@@ -0,0 +1 @@
dipy dipy
@@ -0,0 +1 @@
dipy dipy
@@ -0,0 +1 @@
dipy dipy
@@ -0,0 +1 @@
dipy dipy

0 comments on commit 845161e

Please sign in to comment.