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

Toy tutorial UI fixes #466

Merged
merged 5 commits into from Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions documentation/changelog.rst
Expand Up @@ -20,6 +20,7 @@ Bugfixes
* Do not fail asset page if entity addresses cannot be built [see `PR #457 <http://www.github.com/FlexMeasures/flexmeasures/pull/457>`_]
* Time scale axes in sensor data charts now match the requested date range, rather than stopping at the edge of the available data [see `PR #449 <http://www.github.com/FlexMeasures/flexmeasures/pull/449>`_]
* The docker-based tutorial now works with UI on all platforms (port 5000 did not expose on MacOS) [see `PR #465 <http://www.github.com/FlexMeasures/flexmeasures/pull/465>`_]
* Fix interpretation of scheduling results in toy tutorial [see `PR #466 <http://www.github.com/FlexMeasures/flexmeasures/pull/466>`_]

Infrastructure / Support
----------------------
Expand Down
2 changes: 1 addition & 1 deletion flexmeasures/cli/data_add.py
Expand Up @@ -996,7 +996,7 @@ def add_toy_account(kind: str, name: str):
)
# add charging sensor to battery
charging_sensor = Sensor(
name="charging",
name="discharging",
generic_asset=asset,
unit="MW",
timezone="Europe/Amsterdam",
Expand Down
2 changes: 1 addition & 1 deletion flexmeasures/data/models/charts/belief_charts.py
Expand Up @@ -79,7 +79,7 @@ def chart_for_multiple_sensors(
unit = sensor.unit if sensor.unit else "a.u."
event_value_field_definition = dict(
title=f"{capitalize(sensor.sensor_type)} ({unit})",
format=[".3s", unit],
format=[".3~r", unit],
formatType="quantityWithUnitFormat",
stack=None,
**{
Expand Down
5 changes: 4 additions & 1 deletion flexmeasures/data/models/data_sources.py
Expand Up @@ -88,9 +88,12 @@ def __str__(self):
return self.description

def to_dict(self) -> dict:
model_incl_version = self.model if self.model else ""
if self.model and self.version:
model_incl_version += f" ({self.version}"
return dict(
id=self.id,
name=self.name,
model=f"{self.model} ({self.version})" if self.model else "",
model=model_incl_version,
description=self.description,
)