reanahub / reana-demo-root6-roofit

REANA example - ROOT6/ RooFit based physics analysis
MIT License
3 stars 34 forks source link

snakemake: fix step inputs and params #51

Closed mvidalgarcia closed 3 years ago

mvidalgarcia commented 3 years ago

closes reanahub/reana-workflow-engine-snakemake#5

fitdata step didn't have "results/data.root" as input so rule order was not respected.

mvidalgarcia commented 3 years ago
* Instead of hard-coding the "data.root" file name once more in `fitdata.inputs.data` clause, could we somehow say that `fitdata.inputs.data` is equal to `gendata.output`?

I'm not aware of a way to reference external rules outputs as you describe. The only solution that comes to my mind is keeping "results/data.root" as an input as we used to, so we can point to it like config["data"]. But I'm not sure, as this is not an actual workflow input.

* Shall we add `.snakemake` to `.gitignore`?

No strong opinion. In the Snakefile we recommend using a separate folder snakemake-local-run to run the example locally to keep things isolated so I don't see an urgent need.

tiborsimko commented 3 years ago

No strong opinion. In the Snakefile we recommend using a separate folder snakemake-local-run to run the example locally to keep things isolated so I don't see an urgent need.

It gets populated also when I run reana-dev run-example -w snakemake -c .

$ find .snakemake -type f                                  
.snakemake/log/2021-08-16T145300.340515.snakemake.log

$ cat .snakemake/log/2021-08-16T145300.340515.snakemake.log
Job stats:
job        count    min threads    max threads
-------  -------  -------------  -------------
all            1              1              1
fitdata        1              1              1
gendata        1              1              1
total          3              1              1

that was my motivation....

But it's true that the directory is clean when one uses reana-client run command, so regular usage should be OK.