I've got a ruffus pipeline in Python 2.7, but when I call it with -n or --just_print it still runs all the actual tasks instead of just printing the pipeline like it's supposed to. I:
* don't have a -n argument that would supercede the built-in (although I do have other command-line arguments)
* have a bunch of functions with @transform() or @merge() decorators
* end the pipeline with a run_pipeline() call
Has anyone else experienced this problem? Many thanks!
As of ruffus version 2.4, you can use the builtin
ruffus.cmdlinewhich stores the appropriate flags via thecmdline.pymodule that usesargparse, for example:Then run your pipeline from the terminal with a command like:
If you want to do this manually instead (which is necessary for older version of ruffus) you can call
pipeline_printout()rather thanpipeline_run(), usingargparseso that the--just_printflag leads to the appropriate call, for example:You would then run the command like: