Refactor: Make helper function free & more modular#163
Refactor: Make helper function free & more modular#163Marenz wants to merge 1 commit intofrequenz-floss:v0.x.xfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the component-target extraction logic by moving it from a private class method into a standalone helper function and updates the actor start path to use the new helper.
- Removed
_get_target_components_from_dispatchmethod - Added module-level
_convert_target_componentsfunction - Updated
_start_actorto call_convert_target_components
Comments suppressed due to low confidence (2)
src/frequenz/dispatch/_actor_dispatcher.py:331
- Add a docstring for
_convert_target_componentsexplaining its purpose, parameters, and return values to improve readability and maintainability.
def _convert_target_components(target: ClientTargetComponents) -> TargetComponents:
src/frequenz/dispatch/_actor_dispatcher.py:331
- Introduce unit tests for
_convert_target_componentsto verify correct behavior whentargetcontains integer IDs versusComponentCategoryvalues.
def _convert_target_components(target: ClientTargetComponents) -> TargetComponents:
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
|
Oh, I reviewed this in #155, maybe mark PRs that depend on other PRs as draft? |
|
I guess in this PR you didn't update the client and you can't use the new match-friendly target classes? |
I wanted to mark it as draft, but couldn't find the button/function anymore in the UI... |
Yeah, doing the BaseId update is a whole different thing again |
You overestimate me... |
No description provided.