shell.executable("bash")

rule all:
    input:
        'result_final.txt',
        'book.result_final.txt',

rule foo:
    output:
        fname = 'data.txt'
    run:
        with open(output.fname, 'w') as fd:
            fd.write('result of serious computation')

rule bar:
    input:
        infile = 'data.txt'
    output:
        outfile = 'results/result_intermediate.txt'
    conda:
        'env.yaml'
    notebook:
        'Notebook.py.ipynb'

rule baz:
    input:
        infile = 'results/result_intermediate.txt'
    output:
        outfile = 'result_final.txt'
    log:
        notebook = 'Notebook_Processed.ipynb'
    conda:
        'env.yaml'
    notebook:
        'Notebook.py.ipynb'


rule wild:
    input:
        infile = 'results/result_intermediate.txt'
    output:
        outfile = '{what}.result_final.txt'
    conda:
        'env.yaml'
    notebook:
        'Note{wildcards.what}.py.ipynb'
