You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The template_lookup package contains methods and logic for handling module templates and converting them into Module objects(DTOs). While refactoring the AvailableModule into ModuleInfo type for better clarity (as outlined in #1638), it became evident that further improvements could be made to enhance the overall readability and usability of the template_lookup package.
Specifically, the Parser struct, and its methods, such as GenerateModulesFromTemplates and GenerateMandatoryModulesFromTemplates, have significant room for optimization. These methods currently combine responsibilities such as resolving templates, creating manifests, and handling errors, leading to complex and less maintainable code.
Proposed Improvement
Acceptance Criteria
Refactor templatelookup pacakge:
Add UnManaged field into the moduleinfo struct (ModuleInfo_test.go)
Refactor the Parser struct and its methods for better modularity, readability, and maintainability.
Introduce meaningful naming conventions for all DTOs and helper functions.
Provide documentation or comments for new/refactored methods.
The text was updated successfully, but these errors were encountered:
medmes
changed the title
If good new ideas can be gained here to improve the template_lookup pkg please create new issues for it!
Refactor Templatelookup package
Dec 19, 2024
Description
The template_lookup package contains methods and logic for handling module templates and converting them into Module objects(DTOs). While refactoring the
AvailableModule
intoModuleInfo
type for better clarity (as outlined in #1638), it became evident that further improvements could be made to enhance the overall readability and usability of the template_lookup package.Specifically, the Parser struct, and its methods, such as
GenerateModulesFromTemplates
and GenerateMandatoryModulesFromTemplates, have significant room for optimization. These methods currently combine responsibilities such as resolving templates, creating manifests, and handling errors, leading to complex and less maintainable code.Proposed Improvement
Acceptance Criteria
ModuleInfo_test.go
)The text was updated successfully, but these errors were encountered: