Skip to content
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

Bug in flexmeasures show beliefs in case of empty sensors #539

Merged
merged 3 commits into from Nov 25, 2022

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Nov 24, 2022

The dataframe handed over to uniplot cannot contain empty columns. Otherwise, you get:

ValueError: zero-size array to reduction operation maximum which has no identity

We knew that, and were already throwing out columns with no sensor data. But we did it with a bad loop, that removes items from the list while looping over that same list. In case of a list where the non-empty sensors aren't all at the back of the list, we still end up trying to show empty sensor data.

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x requested a review from nhoening November 24, 2022 10:37
@Flix6x Flix6x self-assigned this Nov 24, 2022
@Flix6x Flix6x changed the title Bug in flexmeasures show beliefs in case of empty sensors Bug in flexmeasures show beliefs in case of empty sensors Nov 24, 2022
@coveralls
Copy link
Collaborator

coveralls commented Nov 24, 2022

Pull Request Test Coverage Report for Build 3546346177

  • 0 of 4 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 64.977%

Changes Missing Coverage Covered Lines Changed/Added Lines %
flexmeasures/cli/data_show.py 0 4 0.0%
Totals Coverage Status
Change from base Build 3544058178: -0.02%
Covered Lines: 6586
Relevant Lines: 9516

💛 - Coveralls

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added this to the 0.12.0 milestone Nov 25, 2022
@Flix6x Flix6x merged commit ae84375 into main Nov 25, 2022
@Flix6x Flix6x deleted the bug-show-beliefs-including-empty-sensors branch November 25, 2022 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants