-
Notifications
You must be signed in to change notification settings - Fork 23
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: limit number of particles using the eventinfo #103
Conversation
a893972
to
0d3f628
Compare
0d3f628
to
14a21ea
Compare
Codecov Report
@@ Coverage Diff @@
## master #103 +/- ##
==========================================
+ Coverage 60.28% 64.76% +4.47%
==========================================
Files 2 2
Lines 209 210 +1
Branches 56 56
==========================================
+ Hits 126 136 +10
+ Misses 73 65 -8
+ Partials 10 9 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
14a21ea
to
b105fd8
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.
As @eduardo-rodrigues had pointed out in Issue #102, it would be good to cover this with tests. I understand that as this has gotten ignored for a long time that this might not be something @jhgoh has time to add now (totally understandable and reasonable given the delay), so if that's the case then once I'm through the next week or so I can come and add tests for all the PRs that are lacking them.
Hi @matthewfeickert, I actually tested locally that this MR is all good with a file containing those lines starting with |
Yeah a PR that adds more test data to |
945bd59
to
f7eb1d5
Compare
@matthewfeickert, I have added a test based on the file I added to |
Closes #102 |
d82efd2
to
583bb30
Compare
Hello @matthewfeickert, @lukasheinrich, @kratsg, I have added the requested test some time ago. Anything else or this can go in :-)? |
6e248a2
to
313705c
Compare
* As https://github.com/zeke/semantic-pull-requests is no longer maintained and is down, use the suggested alternative of https://github.com/amannn/action-semantic-pull-request to check that PR titles follow the Conventional Commits spec.
* Add graphviz>=0.12.0 as a core dependency. * Add graphviz.Digrap graph object as .graph property to LHEFile. - Add support for IPython visualization. * Add test for LHEEvent_graph.
…-hep#124) * Change all explicit relative imports to absolute imports. - Provides clearer more explicit imports for new developers. * Add absolufy-imports to pre-commit hooks
* Add tbump to 'develop' extra and remove bump2version. * Add tbump.toml to configure tbump. - Allow for valid versions to follow SemVer and also support release candidates: <major>.<minor>.<patch>rc<candidate> * Remove .bumpversion.cfg.
* Lukas Heinrich is a professor at Technical University of Munich as of March 2022. * Matthew Feickert is a postdoc at University of Wisconsin-Madison as of June 2022.
* Add Eduardo Rodrigues to development team listing. - Update Zenodo citation metadata, recommended citation, and setup.cfg.
* Update pre-commit hooks: - github.com/asottile/pyupgrade: v2.32.0 → v2.32.1
* Add example to README that shows how to open an LHE file and interact with the events.
* Update pre-commit hooks: - github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0 - github.com/asottile/pyupgrade: v2.31.1 → v2.34.0 - github.com/psf/black: 22.3.0 → 22.6.0
for more information, see https://pre-commit.ci
313705c
to
24c1dcc
Compare
Done the homework @matthewfeickert. I would be happy with an approval at this stage so that I merge :-). Closes #102. |
Morning @matthewfeickert, let's try and tick this off for the weekend. At this point is seems straightforward since I trivially dealt with your 2 remaining comments. |
Am now merging for the first time in this repo :-). I'm sure I ticked all to-dos from the review. |
read_lhe()
tries to append to the list of particles in the event, raising error for some LHE output with optional fields. Another functionread_lhe_with_attributes()
is safe from this issue because it skips strings starting with '#'.From the LHE standard, the number of particles is already given in the first line of the LHE event, which is also available in the eventinfo.nparticles, and any lines after nparticles should be treated as optional field.
Related issue: #102