jigneshvasoya / ruffus

Automatically exported from code.google.com/p/ruffus
MIT License
0 stars 0 forks source link

@active_if(CONDITIONAL) #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A way of switching off a task if CONDITIONAL is false.
The task function would still be in the dependency tree but would create no 
jobs.

Original issue reported on code.google.com by bunbu...@gmail.com on 11 Mar 2011 at 3:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Implemented for v 23

* Design and initial implementation from Jacob Biesinger
* Takes one or more parameters which can be either booleans or functions / 
  callable objects which return True / False
* The expressions inside @active_if are evaluated each time 
  `pipeline_run`, `pipeline_printout` or `pipeline_printout_graph` is called.
* Dormant tasks behave as if they are up to date and have no output.

Original comment by bunbu...@gmail.com on 3 Oct 2011 at 4:39