-
Notifications
You must be signed in to change notification settings - Fork 16
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
Dynamically supply list of decay models to grammar #390
Dynamically supply list of decay models to grammar #390
Conversation
Hey. A was not aware of this new(?) feature from Lark. What are the constraints to use it in terms of dependencies and Python version support? TBH I quite like the idea that one can trivially see from the definition file what models are available, and extend if necessary, see https://github.com/scikit-hep/decaylanguage/blob/master/README.md#advanced-usage. What would be the new way to achieve
discussed there with your changes? Apologies that I'm really loaded and did not look carefully, and I could probably answer myself. I will do soon unless you make it easier for me :-). |
As far as I can tell, this (imo not very well-documented) feature has existed since version
I agree that having a full description in the grammar is nice but would argue that the simplicity of only having to maintain one list beats that. Having a hard-coded list of strings in the grammar also feels kind of weird to me, a change of the grammar should indicate a fundamental change of the language, not just an update of the list of allowed models. While the weird decfile language makes this list kind of necessary (I really tried to come up with a way around hard-coding the models but couldn't come up with one) it's not really desirable in my opinion.
If
No worries, it's not an urgent feature really but I thought I'd just put it in a draft so I don't forget this exists and to start some discussion on whether this is something you'd want in |
Hello @sognetic, sorry for being a bit silent here. You may have seen that I have been very busy finalising the tests of the EvtGen models. I'm now basically done and you can see from #396 that some enhancements and fixes were very important to get in. I'm afraid you will need to rebase one last time, but for a good cause. Actually, wait until next week to rebase as I will have another enhancement :-). |
I would suggest that we go ahead here with the removal and we then clean-up a bit. I see also that the notebook example needs an update ... Let me know what's your timeline, so that I adapt - I have a new PR to make to provide full coverage of Belle II models, so if you tell me you cannot work in the next few days I can make that MR and you then rebase on the full set of my PRs, else I will wait. Just let me know. Thanks. |
Okay, I wasn't sure whether your proposed enhancements had already finished or not. Unfortunately I cannot work on this in the next seven days but will pick it up afterwards. I'll gladly merge in any changes improving Belle II coverage, thank you for doing this! |
No probs. Then I will try and finalise on the PR with Belle II support and you take it from there. Thanks. |
Hi @eduardo-rodrigues , I've now deprecated |
Co-authored-by: Eduardo Rodrigues <eduardo.rodrigues@cern.ch>
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.
Hi. I made some more comments and final suggestions. Let me know how you feel about it and we finalise.
Hi, I hope this addresses all your comments. If not, please let me know and I'll try to fix it ASAP. |
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.
Thank you again for this great contribution 👍!
Thank you for the great review and for adding the finishing touches! |
Hi @eduardo-rodrigues,
here's my second PR which replaces the hard-coded list of model names in the grammar with a placeholder which is filled dynamically with the list of models. I've marked the PR as a draft since there are a few points where I'm not sure what the way to handle things is. I'll comment on the relevant lines / changes in the PR and would be grateful for some input there.
All tests pass locally.