Make the sqlite theorydb into a folder of yaml files#1997
Conversation
so I would still prefer one unique theory per file |
Actually, inheritance might also work across files with the default yaml loading. I guess you are also against the mixture?
|
There was a problem hiding this comment.
|
Why would this need to be fixed? Note that both the dockerfile and yaml environment contain a specific (now outdated) version of the nnpdf code |
Ah okay, then no need to fix it. |
|
If we wish to search the files using grep as you suggested it would also help to have a single file per theory such. Also in that case we'll want to be very strict about formatting e.g. |
| XIF: float | ||
| NfFF: int | ||
| MaxNfAs: int | ||
| MaxNfPdf: int |
There was a problem hiding this comment.
I would start removing parameters that we already know are useless. For example this MaxNfPdf but also MaxNfAs and EScaleVar (and most likely others...)
There was a problem hiding this comment.
I will do that in subsequent PRs. The idea is that this leaves validphys essentially unchanged.
This is important, yes. Maybe it is time to add a pre-commit hook to this repo... |
Something like that, but at least initially I'd be happy to have it check only this theory database and not the entire repository |
I was a bit hesitant, but then this
is a good argument against and have really one file per theory |
41471d8 to
01b5e18
Compare
Update validphys2/src/validphys/datafiles/disp_theory.py Co-authored-by: Felix Hekhorn <felixhekhorn@users.noreply.github.com> apply comments and rebase cast explicitly as float
01b5e18 to
44d5fee
Compare
andreab1997
left a comment
There was a problem hiding this comment.
As promised, I had a second look to the code part and it seems fine to me
This is my proposal for what we discussed in Amsterdam.
At the moment (for validphys) this doesn't change anything. All fields are mandatory as they were before. I think we should first change it to the layout we want (yaml file or other) and afterwards decide what fields are important and what are no.
All interactions with the theory database for validphys happened through the
validphys2/src/validphys/theorydbutils.pymodule. All other changes to validphys are such that the database points totheory_cardsinstead oftheory.db.I've also modified the docs (I've searched for
theory.dband changed stuff whenever they were mentioned).I have to admit I am not fully convinced RE having a file per theory. Having them in a single file would allow us to do this:
40 000 000.yml --- baseline
40 000 001.yml
40 001 000.yml --- baseline
40 001 001.yml
which might be very nice.
Another option is that we leave the ones we currently have as "one per file" (but with the syntax
id: <data>) and going forward organize the theories as41_012.yamland inside all the theories41_012_000: <data>, 41_012_000: <data>etc.(edit: the regression test failed, maybe by casting some of the quantities as int or float changed slightly the result, but I'll deal with it at the end)