-
Notifications
You must be signed in to change notification settings - Fork 20
Drop formula step Averager #645
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
Drop formula step Averager #645
Conversation
a95cf98 to
dfada5c
Compare
|
Sorry, I do not remember the discussion. 😞 |
Sorry @tiyash-basu-frequenz. I meant @sahas-subramanian-frequenz. it was right next at my desk. But it doesn't matter too much. :) IIRC, this is dropped because it is a relic from the very early days, and not used at all, and not even exposed to the public. And the latter is the reason why I did not add a release notes item, because it's not publically facing :) |
|
@sahas-subramanian-frequenz can you give more context? Is it buggy? Are there other problems related to it? IMO it's a useful operation to have. |
I see you expanded on the reason. I will put that into the PR body, so it is more visible and will be part of the merge commit too if this gets in. |
|
BTW, if that reason was not accurate (it has a IIRC), please update the body with the current/correct one. Also remember that PR bodies are used as merge commit messages, so try to write those as you would write a commit message. |
|
I'm afraid I'd be getting the wording wrong. So without shooting myself into my foot, maybe @sahas-subramanian-frequenz knows the best :-) |
|
The Averager step was a quick hack made to provide an average soc stream from the logical meter. This was a temporary measure, until soc was available from the battery pool. That requirement is now gone, and for the reasons listed below, it can't be made a part of the public API, so it must be removed. The Averager step has a number of issues that make it harder to integrate into our formula engine setup:
All the above can be changed, but not without sacrificing something. But we should limit the proliferation of steps that don't fit together, and can be flaky if we try to force them to work with other operations, and where every such operation needs special treatment from the developers. Especially for steps for which we don't have a clear use-case. What we really need is a new design concept based on a tree-walking evaluator, that would allow for the composition of arbitrary operations - binary or otherwise, seamlessly, without causing additional async cycles, just from adding an implementation for the operation, without having to touch implementation internals, like we're having to do operator priority in the current expression evaluator. |
|
I would say put this in the PR description:
And maybe create a new issue with this?
|
dfada5c to
e08bcb6
Compare
|
This still has release notes conflicts. |
Signed-off-by: Christian Parpart <[email protected]>
e08bcb6 to
9fad0ed
Compare
The Averager step was a quick hack made to provide an average soc stream from the logical meter. This was a temporary measure, until soc was available from the battery pool. That requirement is now gone, and for the reasons listed below, it can't be made a part of the public API, so it must be removed.
The Averager step has a number of issues that make it harder to integrate into our formula engine setup:
avg(4, 5, 6)is not the same asavg(avg(4, 5), 6), so it can't be integrated into our postfix expression evaluator.All the above can be changed, but not without sacrificing something. But we should limit the proliferation of steps that don't fit together, and can be flaky if we try to force them to work with other operations, and where every such operation needs special treatment from the developers. Especially for steps for which we don't have a clear use-case.