Provenance and reproducibility
Keep track, redo, verify

xkcd comic 2054
We perform a reproducible data processing task in the previously created penguin-beaksdataset hierarchy.

Download a script, and save it as "code/extract.py":
hub.datalad.org/edu/scripts/raw/branch/main/penguins/extract.py

   curl https://hub.datalad.org/edu/scripts/raw/branch/main/penguins/extract.py -o code/extract.py
   

   datalad status
   

   datalad save -m "Add processing script"
   
"python code/extract.py" executes the script on data in inputs/. Wrapping it inside of datalad run records what happens:

    datalad run -m "extract culmen length of male adelie penguins" -i inputs/adelie/table_219.csv -o reproducible-results.dat "python code/extract.py > reproducible-results.dat"
    
Check out the recorded provenance in the revision history:

    gitk
    
Drop the file (with force):

   datalad drop --reckless availability reproducible-results.dat
Get will fail:

   datalad get results.dat 
Rerun the process and update the dataset if outputs change:

   datalad rerun
   

datalad run wraps around anything expressed in a command line call and saves the dataset modifications resulting from the execution.

datalad rerun repeats captured executions.
If the outcomes differ, it saves a new state of them.