A simple tool to run experiments in a complex workflow
pip install psutil
- Copy
runexp.py
into your directory. - Write a script to specify a workflow. The script has to import
runexp.Workflow
, specify tasks usingWorkflow
, and executeWorkflow.run()
. - Run the script.
The following script runs ls -l
, sorts its output, and takes the first line of the sorted result.
import runexp
exp = runexp.Workflow()
exp(target='input.txt', rule='ls -l > input.txt')
exp(source='input.txt', target='sorted.txt', rule='sort input.txt > sorted.txt')
exp(source='sorted.txt', target='head.txt', rule='head -n 1 sorted.txt > head.txt')
exp.run()