-
Notifications
You must be signed in to change notification settings - Fork 6
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
[WIP] Proposal for the common data reader #1583
Conversation
@Zaharid the structure of the whole commondata is finished, before continuing, could you have review If you could also check |
|
||
|
||
@Parser | ||
def ValidOperation(op_str: str) -> str: |
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 think we could do ValidOPeration = Literal[*list_of_operations]
.
Edit, unless we insist on allowing "AdD"
and similar.
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'm afraid I don't know what you mean here. How should I write this in validobj
language?
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.
Literally my comment. With ‘list_of_operations’=OP or whatever.
…ary files for the reader (no removals or rawdata)
…, uncertainties and data
0cf3087
to
e39b513
Compare
@scarlehoff You'll likely have DIS+DY after Christmas. |
yes DY should be finalised shortly after christmas |
Ok, in the meantime I’ll give a try to reading the old commondata into the new format (so that libNNPDF can be dropped) |
|
||
|
||
@Parser | ||
def ValidVariants(variant_dict: dict) -> Dict[str, Variant]: |
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.
This is not needed. Can be just the return type and will be processed recursively as done manually in the function.
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.
You mean that it will be able to understand that it is a dict
of Variants
by itself or the Parser
is not needed?
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.
Yes it should.
arXiv: Optional[ValidReference] = None | ||
iNSPIRE: Optional[ValidReference] = None | ||
hepdata: Optional[ValidReference] = None | ||
variants: Optional[ValidVariants] = dataclasses.field(default_factory=dict) |
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.
This should not be optional if the default is not going to be None
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 can put the default to None of course. It is just a question of adding a If variants is None
in a few places.
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.
Can as well make it a dict. But at the moment if you do set it to none it is broken in several places.
This is a continuation of #1548 with only the absolutely necessary files so that the code review and maintenance during development is a bit easier.