pytest-workflow
pytest-workflow copied to clipboard
Add language examples to the documentation
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:
- Bash
- Snakemake
- Cromwell
- Any of the other 317 (:exploding_head:!) existing workflow languages listed here.
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.
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.
Bash and nextflow are now added.