-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
- Can you fix also:
Lines 30 to 34 in 41471d8
# The default profile is included together with the validphys package | |
"validphys2/src/validphys/nnprofile_default.yaml", | |
# Same for commondata and theory.db | |
"validphys2/src/validphys/datafiles/commondata/*", | |
"validphys2/src/validphys/datafiles/theory.db", |
*And:
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]> apply comments and rebase cast explicitly as float
01b5e18
to
44d5fee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.py
module. All other changes to validphys are such that the database points totheory_cards
instead oftheory.db
.I've also modified the docs (I've searched for
theory.db
and 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.yaml
and 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)