-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix multiplicity_cut() function #296
Conversation
The tests are failing, apparently the changes broke things. I will review once they pass. |
In general it is advisable to actually run the tests before pushing. |
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.
While your changes generally fix the underlying issue, I think you should work a bit more carefully and also try to understand the logic of the codebase you are editing.
@LucasConstantin please take a look at the required changes. |
79bba84
to
799fa39
Compare
@Hendrik1704 do you understand why the checks are not running for this PR? Could it be that checks only run for pushes and not force-pushes? |
@NGoetz According to ChatGPT any kind of push triggers the actions. Maybe it's because there are conflicts. |
@LucasConstantin can you please try to rebase on sparkx_devel tomorrow or on Monday? Reviewing only makes sense once the Actions succeed. |
multiplcity_cut() function now takes a tuple for the upper and lower bounds of the multiplicity multiplcity_cut Also fixes issues for cuts that decrease the number of events where num_output_per_event_ was not properly updated.
Fix num_output_per_event() so that it starts counting from 0 for Oscar and from 1 for Jetscape files. Also add test for warning in case of empty event list.
799fa39
to
acd442a
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.
Very good, and congrats for your first successful rebase! I have a minor error-handling request. On the top you can see the reason for your action fail:
src/sparkx/BaseStorer.py:851: error: Need type annotation for "updated_num_output_per_event" [var-annotated]
You forgot the type of updated_num_output_per_event
@LucasConstantin The static typing action failed for this function: |
Also add type annotations
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.
Looks good, thank you!
This closes issue #294.
Oscar.multiplicity_cut()
now takes a tuple and theupdate_num_output_per_event_after_filter()' now correctly updates the new num_output_per_event. I also add the case that the number of events is zero in the
print_particle_lists_to_file()` function.