Skip to content

Comments

Don't return None from battery pool methods#612

Merged
shsms merged 1 commit intofrequenz-floss:v0.x.xfrom
stefan-brus-frequenz:bp_sample_none
Sep 5, 2023
Merged

Don't return None from battery pool methods#612
shsms merged 1 commit intofrequenz-floss:v0.x.xfrom
stefan-brus-frequenz:bp_sample_none

Conversation

@stefan-brus-frequenz
Copy link
Contributor

In the case when no battery is available, the internal values of the Sample or PowerMetric will be set to None instead.

@stefan-brus-frequenz stefan-brus-frequenz requested a review from a team as a code owner August 29, 2023 12:14
@github-actions github-actions bot added the part:data-pipeline Affects the data pipeline label Aug 29, 2023
@llucax llucax linked an issue Aug 29, 2023 that may be closed by this pull request
@llucax llucax changed the title Don't return None from battery pool methods (#545) Don't return None from battery pool methods Aug 29, 2023
@github-actions github-actions bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests labels Aug 29, 2023
@stefan-brus-frequenz stefan-brus-frequenz force-pushed the bp_sample_none branch 5 times, most recently from c1f6c3f to 054027a Compare August 29, 2023 13:08
Copy link
Contributor

@shsms shsms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of comments, LGTM otherwise.

@stefan-brus-frequenz stefan-brus-frequenz force-pushed the bp_sample_none branch 7 times, most recently from a6e0b60 to ab8a49c Compare August 29, 2023 14:35
@stefan-brus-frequenz stefan-brus-frequenz force-pushed the bp_sample_none branch 2 times, most recently from 097e091 to 8602909 Compare August 29, 2023 15:04
shsms
shsms previously approved these changes Aug 29, 2023
@shsms
Copy link
Contributor

shsms commented Sep 4, 2023

I'm guessing this needs to be rebased, for the old requirements to go away.

@llucax
Copy link
Contributor

llucax commented Sep 5, 2023

I'm guessing this needs to be rebased, for the old requirements to go away.

YES! (But it is more "for the new requirements to be met)

@stefan-brus-frequenz
Copy link
Contributor Author

rebase'd

In the case when no battery is available, the internal values of the
`Sample` or `PowerMetric` will be set to `None`, instead.

Signed-off-by: Stefan Brus <[email protected]>
@shsms shsms added this pull request to the merge queue Sep 5, 2023
Merged via the queue into frequenz-floss:v0.x.x with commit 25128a7 Sep 5, 2023
@stefan-brus-frequenz stefan-brus-frequenz deleted the bp_sample_none branch September 5, 2023 10:21
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 16, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts where still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 20, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts where still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 20, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts where still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 21, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts where still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 21, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts were still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 22, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts were still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 27, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts were still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 27, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts were still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Sep 27, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts were still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
shsms added a commit to shsms/frequenz-sdk-python that referenced this pull request Oct 4, 2023
It looks like only the `MetricCalculator`s were updated in a previous
PR (frequenz-floss#612) and some parts were still pending.  This is taken care of
here.

Signed-off-by: Sahas Subramanian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

None values from BatteryPool's SoC/Capacity methods

3 participants