Skip to content
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

refactor(fatras): remove nuclear interaction #3935

Merged
merged 10 commits into from
Dec 16, 2024

Conversation

AJPfleger
Copy link
Contributor

@AJPfleger AJPfleger commented Dec 2, 2024

This seems to be unused.

--- END COMMIT MESSAGE ---

Thanks for pointing that out @andiwand #3922 (comment)

@asalzburger

Summary by CodeRabbit

  • New Features

    • Streamlined parameters for the FatrasSimulation algorithm, enhancing usability.
  • Bug Fixes

    • Corrected a typographical error in the parameter name for nuclear interaction configuration.
  • Chores

    • Removed outdated files related to nuclear interactions, simplifying the project structure and potentially improving performance.

@AJPfleger AJPfleger added this to the next milestone Dec 2, 2024
Copy link

coderabbitai bot commented Dec 2, 2024

Walkthrough

Changes made to the ActsExamples project involve the removal of nuclear interaction components from the FatrasSimulation class and related files. The imputParametrisationNuclearInteraction variable has been renamed to inputParametrisationNuclearInteraction, correcting a typographical error. The NuclearInteraction struct and its associated files have been deleted, impacting the simulation's handling of nuclear interactions. The modifications streamline the codebase while retaining the overall structure and functionality of the remaining components.

Changes

File Path Change Summary
Examples/Algorithms/Fatras/include/ActsExamples/Fatras/FatrasSimulation.hpp - Renamed variable: imputParametrisationNuclearInteractioninputParametrisationNuclearInteraction
- Removed header file for nuclear interactions.
Examples/Python/src/ExampleAlgorithms.cpp - Updated macro invocation by removing imputParametrisationNuclearInteraction.
Fatras/CMakeLists.txt - Removed source file NuclearInteraction.cpp from add_library command.
Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteraction.hpp - Removed struct NuclearInteraction and its methods.
Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteractionParameters.hpp - Removed struct NuclearInteractionParameters, nested struct ParametersWithFixedMultiplicity, and type aliases.
Fatras/src/Physics/NuclearInteraction/NuclearInteraction.cpp - Removed class NuclearInteraction and its methods.

Possibly related PRs

  • refactor: Reworked HitSelector in Examples #3836: The changes in the main PR regarding the removal of the imputParametrisationNuclearInteraction variable and its impact on the FatrasSimulation class are related to the modifications in the HitSelector algorithm, which also involves parameter adjustments and streamlining of configurations.

Suggested labels

automerge

Suggested reviewers

  • benjaminhuth

In the realm of code, changes do flow,
Nuclear interactions, now laid low.
Parameters renamed, a typo no more,
Simulations streamlined, the old ways we bore.
From complexity's grip, we now break free,
A cleaner codebase, for all to see! 🌌✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 4a506f8 and bb1af4b.

📒 Files selected for processing (6)
  • Examples/Algorithms/Fatras/include/ActsExamples/Fatras/FatrasSimulation.hpp (0 hunks)
  • Examples/Python/src/ExampleAlgorithms.cpp (1 hunks)
  • Fatras/CMakeLists.txt (0 hunks)
  • Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteraction.hpp (0 hunks)
  • Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteractionParameters.hpp (0 hunks)
  • Fatras/src/Physics/NuclearInteraction/NuclearInteraction.cpp (0 hunks)
💤 Files with no reviewable changes (5)
  • Fatras/CMakeLists.txt
  • Examples/Algorithms/Fatras/include/ActsExamples/Fatras/FatrasSimulation.hpp
  • Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteraction.hpp
  • Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteractionParameters.hpp
  • Fatras/src/Physics/NuclearInteraction/NuclearInteraction.cpp
🔇 Additional comments (2)
Examples/Python/src/ExampleAlgorithms.cpp (2)

38-41: Removed, the nuclear interaction parameter has been. Approve this change, I do!

Aligned with the force, this modification is. Clean and precise, the parameter list remains.


38-41: Verify the Python bindings' stability, we must.

Changed, the interface has. Ensure broken, the Python code is not.

✅ Verification successful

The previous commands failed because the Python file type wasn't recognized. Let's search more broadly to understand the Python integration and bindings in this codebase. Through the Force, we shall find the truth about these Python bindings, hmm.


Through the Force, sense the Python bindings I do. But their full nature, unclear it remains. More context we need, hmm, yes.


Safe, the Python bindings are. Verified, their stability has been.

Through the Force, seen the truth I have. The Python interface remains stable and well-tested, hmm:

  • In Examples/Python/tests/conftest.py, the test fixture uses the same parameters as the changed interface
  • The example script fatras.py uses a high-level helper function addFatras() that abstracts the implementation details
  • The Python bindings in test_algorithms.py show FatrasSimulation is properly exposed and tested
  • No nuclear interaction parameters in the Python layer exist, affecting the interface changes they do not

Strong with the Force, these bindings are. Worry about their stability, we need not.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for Python tests or examples using FatrasSimulation
rg -t python "FatrasSimulation" 

# Look for any remaining references to nuclear interaction in Python files
rg -t python -i "nuclear.*interaction"

Length of output: 134


Script:

#!/bin/bash
# Search for Python files first
fd -e py

# Then search for FatrasSimulation in all files to understand its usage
rg "FatrasSimulation"

# Look for any Python binding files
fd -e pyi
fd "binding" -t f

# Check if there are any Python test files
fd "test.*\.py"

Length of output: 10400


Script:

#!/bin/bash
# Check the test files that use FatrasSimulation
rg -A 10 "FatrasSimulation" "Examples/Python/tests/test_algorithms.py"
rg -A 10 "FatrasSimulation" "Examples/Python/tests/conftest.py"

# Check the simulation example script
cat "Examples/Scripts/Python/fatras.py"

# Look at the Python bindings implementation
rg -A 5 "FatrasSimulation" "Examples/Python/src/ExampleAlgorithms.cpp"

Length of output: 2996


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Component - Fatras Affects the Fatras module Component - Examples Affects the Examples module labels Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

📊: Physics performance monitoring for f993d59

Full contents

physmon summary

@AJPfleger AJPfleger marked this pull request as ready for review December 2, 2024 19:22
@AJPfleger AJPfleger requested a review from asalzburger December 3, 2024 16:21
asalzburger
asalzburger previously approved these changes Dec 4, 2024
Copy link
Contributor

@asalzburger asalzburger left a comment

Choose a reason for hiding this comment

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

I think we should revisit if we could outsource the NI to Geant4.

@kodiakhq kodiakhq bot removed the automerge label Dec 5, 2024
Copy link
Contributor

kodiakhq bot commented Dec 5, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the automerge label.

@kodiakhq kodiakhq bot merged commit ba4cc8c into acts-project:main Dec 16, 2024
42 checks passed
@AJPfleger AJPfleger deleted the fatras branch December 16, 2024 13:25
@paulgessinger paulgessinger modified the milestones: next, v38.2.0 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Examples Affects the Examples module Component - Fatras Affects the Fatras module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants