-
Notifications
You must be signed in to change notification settings - Fork 158
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
feat: Python particle gun and Fatras examples can be chained #1128
Conversation
* `addParticleGun` and `addFatras` adds the required modules to the `Sequence`. * `runParticleGun` and `runFatras` rewritten to use `add*` to reproduce exactly the previous behaviour. * `ROOT_HASH_CHECKS=on pytest` run as before without change. * Optionally `runParticleGun` and `runFatras` can now accept `outputDir` as `pathlib.Path` or `str` (like `add*`) * Other Python examples not yet changed. Let's see how this one goes down.
Codecov Report
@@ Coverage Diff @@
## main #1128 +/- ##
=======================================
Coverage 47.90% 47.90%
=======================================
Files 359 359
Lines 18491 18491
Branches 8723 8723
=======================================
Hits 8859 8859
Misses 3603 3603
Partials 6029 6029 Continue to review full report at Codecov.
|
I have removed the WiP label. Maybe the WiP label has inhibited people from looking. This proposal has been complete (as far as it goes) and ready for review. I have not been working on it, but used the label originally because we could expand on it later. |
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 I like this. I added some discussion points, but overall this feels like the right direction to me.
Should we add some form of example how to do the chaining in this PR already? Maybe in the docs?
There is an example in |
Fair enough @timadye. |
arrrgggg, GitHub foiled me again with its crazy-ass UI. I had been making all these comments and replies (one even before the holidays), but they all remained "Pending". I didn't spot that until just now and couldn't see what to do about it until I found that I had to go to the "Changes" section and click the "Review" button. Why oh why oh why.... |
About |
… Rely on defaults in examples.
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.
Thanks Tim, the changes look good!
First step implementing #1098, incorporating #1093.
addParticleGun
andaddFatras
adds the required modules to theSequence
.runParticleGun
andrunFatras
rewritten to useadd*
to reproduce exactly the previous behaviour.ROOT_HASH_CHECKS=on pytest
run as before without change.ROOT_HASH_CHECKS=on
withpytest
doesn't currently work frommain
. I have a couple of fixes for future PRs.runParticleGun
andrunFatras
(likeadd*
) can now acceptoutputDir
aspathlib.Path
as well asstr
. This should be the only change to how these routines work.What do people think? If this is the right way to go, I can do the other Python examples - either in this PR or as a separate one if this one is merged.