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
Stage could define an optional property like description or method like describe() 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) ?
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...__doc__attribute on a stageStagecould 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 thePipelineclass, 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 beinspected for any classes that inherit frompypiper.PipelineAdmittedly 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) ?