Return None for no-telemetry component formulas and bump to 0.6.1 - #50
Merged
Conversation
`component_formula()` returned `0.0` for a component that provides no telemetry, which says its power is zero. It is not zero: the reading is missing. Return `None` instead, the same as `component_ac_coalesce_formula()` already does for that component. Cover a meter too: the check reads the operational mode and never the category, so a meter with no telemetry gets `None` like any other component. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Bump the crate version to 0.6.1 and write the release summary. Document the no-telemetry behaviors the notes left out: a silent meter measured through its children, the `None` a silent grid meter produces, the consumer formula's descent past a silent meter, and the formulas that can come out `0.0` or `None`. Group them under the one rule they follow from, rather than listing each as its own feature. Report the component id check as a bug fix rather than an upgrade note: `component_formula()` and `component_ac_coalesce_formula()` emitted a formula for any id, including ids the graph does not have, while every other formula method already validated its inputs. Also say that a component, not its operational mode, is what provides telemetry, matching how the code documents it. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
This file contains hidden or 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
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.
component_formula()returned0.0for a component that provides no telemetry, which says its power is zero when the reading is simply missing. This returnsNoneinstead, and prepares the v0.6.1 release.Changes
component_formula()returnsNonefor a component that provides no telemetry, matching whatcomponent_ac_coalesce_formula()already did. The check reads the operational mode and never the category, so a meter is covered too.0.6.1and write the release notes for the operational-mode work from Restructure the formula fallback module #43 and Gate no-telemetry components out of formulas via operational mode #44, including the no-telemetry behaviors the notes had left out: a component measured through the meter above it, a silent meter measured through its children, theNonea silent grid meter produces, the consumer formula's descent past a silent meter, and the formulas that can come out0.0orNone.component_formula()/component_ac_coalesce_formula()id check under## Bug Fixesrather than## Upgrading. Neither signature changed — both already returnedResult— and every other formula method already validated its ids throughgraph.component(id)?.