Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nowcasting_dataset/data_sources/gsp/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_gsp_power_from_database(

gsp_yield_dict = gsp_yield.__dict__
gsp_yield_dict["installed_capacity_mw"] = location.installed_capacity_mw
gsp_yield_dict["solar_generation_mw"] = gsp_yield_dict["solar_generation_kw"] * 1000
gsp_yield_dict["solar_generation_mw"] = gsp_yield_dict["solar_generation_kw"] / 1000
gsp_yield_dict["gsp_id"] = location.gsp_id
gsp_yields_dict.append(gsp_yield_dict)

Expand Down
2 changes: 2 additions & 0 deletions tests/data_sources/gsp/test_gsp_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def test_get_pv_power_from_database(gsp_yields, db_session):
pd.to_datetime(gsp_power.index[0]).isoformat()
== datetime(2022, 1, 1, 0, 0, tzinfo=timezone.utc).isoformat()
)
assert gsp_power.max().max() < 1
# this because units have changed from kw to mw


@freeze_time("2022-01-01 05:00")
Expand Down