-
Notifications
You must be signed in to change notification settings - Fork 21
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: Make transform configurations explicit, rework parsing of transforms #119
Merged
Beetelbrox
merged 42 commits into
CBDD:main
from
Beetelbrox:fjurado/refactor-make-transform-member-variables-explicit
Jun 7, 2024
Merged
Refactor: Make transform configurations explicit, rework parsing of transforms #119
Beetelbrox
merged 42 commits into
CBDD:main
from
Beetelbrox:fjurado/refactor-make-transform-member-variables-explicit
Jun 7, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Beetelbrox
changed the title
Fjurado/refactor make transform member variables explicit
Refactor: Make transform configurations explicit, rework parsing of transforms
Jun 7, 2024
…variables-explicit
ggutierrez-sunbright
approved these changes
Jun 7, 2024
Beetelbrox
deleted the
fjurado/refactor-make-transform-member-variables-explicit
branch
June 7, 2024 17:42
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #122
Description
As most entities in the project transforms were storing their configuration in a dictionary defined in
RbtParamHandler
, several steps higher in the inheritance hierarchy. This made it very difficult to understand which configuration each transform needed, which ones were the default values, and which value was being used at any given point in time.Proposed changes
To address the above explained we've made the parameters required by each one of the transforms explicit. Now each transform defines a
Config
struct with their respective configuration and transform constructors now accept this configuration instead of having to set arbitrary parameters passing strings as we did before. The TransformFactory builds transforms by grabbing the necessary values from the ParameterSource internal state and building the appropriate config for each transform, explicitly stating which fields are needed instead of dynamically iterating through everything as we did before