-
Notifications
You must be signed in to change notification settings - Fork 9
Description
For a pipeline that uses Stages, what about adding a .describe() method? If given no arguments, it could operate on all the pipeline's stages. Or it could take the name of a specific stage, and then just describe that one. I could image the description coming from one of a couple places...
- the
__doc__attribute on a stage Stagecould define an optional property likedescriptionor method likedescribe()that would be preferred if defined over__doc__
Even for a pipeline that doesn't use stages, .describe() could give a version of the __doc__ attribute on the Pipeline class, or a .describe() value if the pipeline defines such a classmethod as a member of the class.
I could image this being used interactively in a REPL or as part of a script, or even a command-line program could use this, like pypiper describe /path/to/my/pipeline.py, where the pipeline.py file would be inspected for any classes that inherit from pypiper.Pipeline
Admittedly thinking out loud here and a more detailed specification of what behaviors / use patterns we would or would not want to support would be needed, but WDYT overall of this idea @nsheff @donaldcampbelljr @khoroshevskyi @nleroy917 (tagging you all as those most currently involved in development, perhaps) ?