NNPDF / reportengine

A framework for declarative data analysis
https://data.nnpdf.science/validphys-docs/guide.html
GNU General Public License v2.0
1 stars 2 forks source link

Improve workflow for papers #50

Closed Zaharid closed 3 years ago

Zaharid commented 3 years ago

The experience of working on a paper with a large vp_runcards folder from where figures are produced could be better when it comes to naming files. At the moment we have something like

.
├── paper.tex
├── plots
│   └── sec_somename_plot_pdfs_g.pdf
└── vp_runcards
    ├── output
    │   └── figures
    │       └── plot_pdfs_g.pdf
    └── plot_some_pdfs.yaml

where typically output is not commited to the repository and instead the results are copied and renamed manually to the plots directory. The problem with that approach is that redoing the plots (for example to improve the style) is quite a chore, as one needs to identify the relevant files in the paper, the find the runcard that produces them, make the changes, run validphys, hope that output is clean and doesn't lead to some kind of confussion, and rename the files manually as appropriate back (which may or may not be a task involving regular expressions). This is error prone and somewhat time consuming when one has to do it many times.

An easy solution would be to change the way we work to e.g. subfolders from each invocation of vp and commit the results of running it. The problem with this is that arxiv doesn't like subfolders, so instead the filename of the plots should have enough uniqueness. For that I think life would be simpler if we had a flag like --folder-prefix (or better name) that

Then if we had something like say pdfs_40vs31.yaml we would get pdfs_40vs31-plot_pdfs_g.pdf, which is an acceptable enough name to refer to in the tex, avoids conflicts with other plot_pdfs_g from different runcards and can be easy copy pasted (or preferably simlinked).

cc @enocera

enocera commented 3 years ago

All this seems very sensible, indeed. I guess that this also applies to tables, not only to figures?