pytest-workflow icon indicating copy to clipboard operation
pytest-workflow copied to clipboard

Add language examples to the documentation

Open Redmar-van-den-Berg opened this issue 2 years ago • 1 comments

It might be nice to add some examples to the documentation on how to use pytest-workflow to test different (workflow) languages, since there might be some specific steps users have to take to make their projects testable.

For example you can tests your bash functions using pytest-workflow, but only if you make your script safe to source using something like:

function main() {
    echo "Hello, world!"
}

# Only run the script if it hasn't been sourced
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
    main "$@"
fi

I think some good candidates would be:

  1. Bash
  2. Snakemake
  3. Cromwell
  4. Any of the other 317 (:exploding_head:!) existing workflow languages listed here.

Redmar-van-den-Berg avatar Jun 22 '22 07:06 Redmar-van-den-Berg

So we already have, Snakemake, WDL with Cromwell and, WDL with miniwdl. https://pytest-workflow.readthedocs.io/en/stable/#examples

I think other proper candidates will be indeed bash and nextflow.

rhpvorderman avatar Jun 22 '22 09:06 rhpvorderman

nextflow is done in #144. @Redmar-van-den-Berg could you add the bash examples when you have the time at some point? You know them best after all, and it is really useful.

rhpvorderman avatar Nov 02 '22 06:11 rhpvorderman

Bash and nextflow are now added.

rhpvorderman avatar Nov 02 '22 16:11 rhpvorderman