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

fix: relax constraint for overlaying plot traces for sensors with various resolutions #743

Merged
merged 2 commits into from
Jun 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions flexmeasures/data/models/charts/belief_charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ def create_line_layer(
event_value_field_definition: dict,
):
event_resolutions = list(set([sensor.event_resolution for sensor in sensors]))
assert (
len(event_resolutions) == 1
), "Sensors shown within one row must share the same event resolution."
assert all(res == timedelta(0) for res in event_resolutions) or all(
res != timedelta(0) for res in event_resolutions
), "Sensors shown within one row must all be instantaneous (zero event resolution) or all be non-instantatneous (non-zero event resolution)."
event_resolution = event_resolutions[0]
line_layer = {
"mark": {
Expand Down