Open GoogleCodeExporter opened 9 years ago
Bernie Pope suggests that we should generalise this:
If any object in the input parameters is a (non-list/tuple) class instance,
check (getattr) whether it has a "ruffus_params()" function. If it does, call
it to obtain a list which is substituted in place. If there are string nested
within, these will take part in Ruffus string substitution.
"output_from" would be a simple wrapper which returns the internal string via
ruffus_params()
class output_from (object):
def __init__(self, str):
self.str = str
def ruffus_params(self):
return [self.str]
Returning a list should be like wildcards and should not introduce an
unnecessary level of indirection for output parameters, i.e. suffix(".txt") or
formatter() / "{basename[0]}" should work.
Check!
Original comment by bunbu...@gmail.com
on 24 Jun 2014 at 7:06
Original issue reported on code.google.com by
bunbu...@gmail.com
on 14 May 2014 at 10:31