from toil_lib.tools import foo_job_factory
job.addChild( **foo_job_factory( other_job.rv() ) )
This way the knowledge of how foo_job's disk requirement relates to the size of its input file is encapsulated in a library function that is colocated with the job function.
Instead of creating a factory, we could also convert foo_job from a job function to a class-based job, i.e. a subclass of Job. Those can define their own requirements in the constructor, IIRC.
Instead of
We should be able to
This way the knowledge of how foo_job's disk requirement relates to the size of its input file is encapsulated in a library function that is colocated with the job function.
Instead of creating a factory, we could also convert foo_job from a job function to a class-based job, i.e. a subclass of Job. Those can define their own requirements in the constructor, IIRC.