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!: Use enum class for NavigationDirection #1206

Merged
merged 10 commits into from
Apr 8, 2022

Conversation

paulgessinger
Copy link
Member

@paulgessinger paulgessinger commented Mar 24, 2022

This change is motivated by arithmetic between non-class enums and other types that are not the same enum is deprecated in C++20. I overload the operators we use these enums in to support the same use cases.

I think this is breaking since it's part of the public propagator interface.

BREAKING CHANGE: The NavigationDirection enum changes to enum class. The values are renamed NavigationDiretcion::forward -> NavigationDirection::Forward and NavigationDirection::backward -> NavigationDirection::Backward.

@paulgessinger paulgessinger added this to the next milestone Mar 24, 2022
@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #1206 (51a6476) into main (65d1e09) will increase coverage by 0.09%.
The diff coverage is 59.72%.

@@            Coverage Diff             @@
##             main    #1206      +/-   ##
==========================================
+ Coverage   47.85%   47.94%   +0.09%     
==========================================
  Files         372      373       +1     
  Lines       19439    19495      +56     
  Branches     9148     9152       +4     
==========================================
+ Hits         9302     9347      +45     
- Misses       3806     3817      +11     
  Partials     6331     6331              
Impacted Files Coverage Δ
Core/include/Acts/Propagator/AtlasStepper.hpp 68.51% <ø> (-0.04%) ⬇️
Core/include/Acts/Propagator/EigenStepper.hpp 68.42% <ø> (-0.81%) ⬇️
.../include/Acts/Propagator/MultiEigenStepperLoop.hpp 70.18% <ø> (ø)
Core/include/Acts/Propagator/Navigator.hpp 53.59% <ø> (ø)
Core/include/Acts/Propagator/Propagator.hpp 89.74% <ø> (ø)
Core/include/Acts/Propagator/StandardAborters.hpp 76.59% <ø> (ø)
...re/include/Acts/Propagator/StraightLineStepper.hpp 67.85% <ø> (-0.57%) ⬇️
Core/include/Acts/TrackFitting/detail/GsfUtils.hpp 52.38% <ø> (ø)
Core/src/Definitions/Common.cpp 0.00% <0.00%> (ø)
Core/src/TrackFitting/GainMatrixUpdater.cpp 11.11% <0.00%> (ø)
... and 26 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Member

@stephenswat stephenswat left a comment

Choose a reason for hiding this comment

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

Massive support for going to type-safe enums here, just a few comments where I think find-replace might have gone wrong.

Core/include/Acts/TrackFitting/KalmanFitter.hpp Outdated Show resolved Hide resolved
Core/include/Acts/TrackFitting/KalmanFitter.hpp Outdated Show resolved Hide resolved
Core/include/Acts/TrackFitting/KalmanFitter.hpp Outdated Show resolved Hide resolved
Core/src/Definitions/Common.cpp Show resolved Hide resolved
Core/src/Geometry/Layer.cpp Show resolved Hide resolved
Core/src/Geometry/Layer.cpp Show resolved Hide resolved
Core/src/Geometry/TrackingVolume.cpp Show resolved Hide resolved
Core/src/Geometry/TrackingVolume.cpp Show resolved Hide resolved
Core/src/Geometry/TrackingVolume.cpp Show resolved Hide resolved
@stephenswat stephenswat added Component - Core Affects the Core module Improvement Changes to an existing feature Impact - Minor Nuissance bug and/or affects only a single module labels Mar 25, 2022
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.

There have been some replace errors that can/should be fixed.

@paulgessinger
Copy link
Member Author

I updated the branch and fixed the bad replaces.

Copy link
Member

@stephenswat stephenswat left a comment

Choose a reason for hiding this comment

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

Looks good to me. Can't close the conversations I opened for some reason, though.

@paulgessinger paulgessinger dismissed asalzburger’s stale review April 7, 2022 09:16

Stephen approved the more recent changes.

@kodiakhq kodiakhq bot merged commit 394cfdb into acts-project:main Apr 8, 2022
@paulgessinger paulgessinger modified the milestones: next, v19.0.0 May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Component - Core Affects the Core module Impact - Minor Nuissance bug and/or affects only a single module Improvement Changes to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants