-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enhance GenMultiDecay constructor #71
Conversation
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
==========================================
+ Coverage 92.60% 92.75% +0.15%
==========================================
Files 8 8
Lines 473 483 +10
Branches 86 91 +5
==========================================
+ Hits 438 448 +10
Misses 23 23
Partials 12 12
Continue to review full report at Codecov.
|
Hello @simonthor. I hope you're doing well. Shall we try and give this a push? |
That would be a good change indeed, I won't be able to assist unfortunately as I am on vacation the next twoish weeks, after that I can support fully |
Yes, I will likely have time to work on this now. Have I understood it correctly that the goal is to add another parameter to the |
More or less. See the original discussion at #63 (comment). The part to enhance is https://github.com/zfit/phasespace/blob/master/phasespace/fromdecay/genmultidecay.py#L62-L86. Your example is
but, clearly, we do not want users to have to do things such as
specifying that you want to model the D0 decay with a Gauss function. In addition, you can also allow for extra flexibility in the To me it makes sense to have these 2 ways. That's powerful. |
However, some tests still fail.
I definitely agree that the current way of adding mass functions is clunky! I have added a
I think this API should already work. since |
…reated from a DecayChain.
Additionally, the function __name__ parameters were renamed to their corresponding keys in DEFAULT_CONVERTER.
The feature has now been added and works as intended, according to tests. I will try to increase the code coverage and add some more documentation and then I think it is ready to be merged! Unless you think there is anything missing? |
Allow me a couple more days to get back to you. |
Of course! Sorry for the slow progress on my side as well. Other projects with deadlines pop up, which I then have to prioritize. |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Hello @simonthor! Been a while ... the CI failures seem very easy to sort out. Can you try and push this to the end? |
Hello! Sorry, I missed that the tests were failing but I should have fixed it now. |
for more information, see https://pre-commit.ci
Go ahead and remove the WIP tag ... |
However, some tests still fail.
…reated from a DecayChain.
Additionally, the function __name__ parameters were renamed to their corresponding keys in DEFAULT_CONVERTER.
I tried rebasing now and the pre-commit errors seem to be gone. Thank you for the fix! |
Cool. As for the Codacy "errors" I see on the linked page above, https://app.codacy.com/gh/zfit/phasespace/pullRequest?prid=8615307, that it's trivial to get those gone. Nicer if you do that. @jonas-eschle, going to make a release as soon as this is in :-)? |
Ah, you're getting the same errors as on master and I see @jonas-eschle already created an issue on that, see DanielBok/nlopt-python#12. |
I see, got a bit confused when the rebase somehow caused all tests to fail.
This is an "error" I encountered last pull request as well. The docformatter pre-commit hook moves the summary to the first line, while Codacy prefers the summary to be on the second line. So I think either Codacy or docformatter will have to be reconfigured. |
Ah, for Scikit-HEP we use Black as formatter, and we have not been using Codacy. |
I guess those errors can be ignored since unrelated to this MR. That would be my pragmatic approach here. |
Yep, the errors of codacy can be removed, we actually switched already to black since a long time, I'll deactivate this |
…al for a correct description of this behaviour.
zfit deps should be fixed now, as soon as it's available again we can rerun the CI and the merge it! Fine from your side @simonthor ? |
That is fine by me! All tests seem to pass now, besides black in pre-commit which apparently has an ImportError. However, since I run pre-commit locally on all code I push here, there should not be any problems. So I think this branch is ready to be merged :) |
Well done 👍! |
I agree, LGTM! Since you've been contributing a lot in the past and your coding is on a pretty good level, I've added you as a developer (still figuring out the right rights in Github), I think you should now be able to write to this repository yourself. Bear in mind, that with great power comes great responsibility and it's never wrong to ask first and oc always do changes as we have done now. So feel free to merge this PR yourself and welcome to the project! |
Thank you both for the help and Jonas for inviting me to zfit! |
See #68