Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

extend gsp load history to 10 hours #373

Closed
wants to merge 3 commits into from
Closed
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 ocf_datapipes/load/gsp/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class OpenGSPFromDatabaseIterDataPipe(IterDataPipe):

def __init__(
self,
history_minutes: int = 90,
history_minutes: int = 600,
interpolate_minutes: int = 60,
load_extra_minutes: int = 60,
national_only: bool = False,
Expand Down
4 changes: 2 additions & 2 deletions tests/load/gsp/test_gsp_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def test_get_gsp_power_from_database(gsp_yields, db_session):
"""Get GSP power from database"""

gsp_power, gsp_nominal_capacity, gsp_effective_capacity = get_gsp_power_from_database(
history_duration=timedelta(hours=1), interpolate_minutes=30, load_extra_minutes=0
history_duration=timedelta(hours=10), interpolate_minutes=30, load_extra_minutes=0
)

assert len(gsp_power) == 3 # 1 hours at 30 mins + 1
assert len(gsp_power) == 21 # 10 hours at 30 mins + 1
assert len(gsp_power.columns) == 5
assert gsp_power.columns[0] == 1
assert (
Expand Down
Loading