Skip to content

Conversation

Saransh-cpp
Copy link
Member

Description

Kindly take a look at CONTRIBUTING.md.

Please describe the purpose of this pull request. Reference and link to any relevant issues or pull requests.

Checklist

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't any other open Pull Requests for the required change?
  • Does your submission pass pre-commit? ($ pre-commit run --all-files or $ nox -s lint)
  • Does your submission pass tests? ($ pytest or $ nox -s tests)
  • Does the documentation build with your changes? ($ cd docs; make clean; make html or $ nox -s docs)
  • Does your submission pass the doctests? ($ pytest --doctest-plus src/vector/ or $ nox -s doctests)

Before Merging

  • Summarize the commit messages into a brief review of the Pull request.

@Saransh-cpp Saransh-cpp force-pushed the momentumness-infectious branch from 60fd556 to ecc243b Compare March 13, 2024 15:46
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.27%. Comparing base (a6b0731) to head (872d22b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #437      +/-   ##
==========================================
+ Coverage   86.13%   86.27%   +0.14%     
==========================================
  Files          96       96              
  Lines       11132    11139       +7     
==========================================
+ Hits         9588     9610      +22     
+ Misses       1544     1529      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

assert handler is not None
if is_momentum:
return type(handler)
return handler.MomentumClass
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried doing this without creating MomentumClass, but that introduced a lot of edge cases and if conditions in the _flavor_of function. Using MomentumClass makes it clean and uniform for all the backends.

@Saransh-cpp Saransh-cpp requested a review from jpivarski March 13, 2024 23:09
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I think you can merge this.

@Saransh-cpp Saransh-cpp merged commit b907615 into scikit-hep:main Mar 14, 2024
@Saransh-cpp Saransh-cpp deleted the momentumness-infectious branch March 14, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants