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

Commit ddae643

Browse files
authored
add docstrings model.py
1 parent 76b737b commit ddae643

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ocf_datapipes/config/model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ class Wind(DataSourceMixin, TimeResolutionMixin, XYDimensionalNames, DropoutMixi
287287

288288
@field_validator("forecast_minutes")
289289
def forecast_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo) -> int:
290+
"""Check forecast length requested will give stable number of timesteps"""
290291
if v % info.data["time_resolution_minutes"] != 0:
291292
message = "Forecast duration must be divisible by time resolution"
292293
logger.error(message)
@@ -295,6 +296,7 @@ def forecast_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo
295296

296297
@field_validator("history_minutes")
297298
def history_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo) -> int:
299+
"""Check history length requested will give stable number of timesteps"""
298300
if v % info.data["time_resolution_minutes"] != 0:
299301
message = "History duration must be divisible by time resolution"
300302
logger.error(message)
@@ -402,6 +404,7 @@ def model_validation(cls, v):
402404

403405
@field_validator("forecast_minutes")
404406
def forecast_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo) -> int:
407+
"""Check forecast length requested will give stable number of timesteps"""
405408
if v % info.data["time_resolution_minutes"] != 0:
406409
message = "Forecast duration must be divisible by time resolution"
407410
logger.error(message)
@@ -410,6 +413,7 @@ def forecast_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo
410413

411414
@field_validator("history_minutes")
412415
def history_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo) -> int:
416+
"""Check history length requested will give stable number of timesteps"""
413417
if v % info.data["time_resolution_minutes"] != 0:
414418
message = "History duration must be divisible by time resolution"
415419
logger.error(message)
@@ -641,6 +645,7 @@ def validate_nwp_provider(cls, v: str) -> str:
641645

642646
@field_validator("forecast_minutes")
643647
def forecast_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo) -> int:
648+
"""Check forecast length requested will give stable number of timesteps"""
644649
if v % info.data["time_resolution_minutes"] != 0:
645650
message = "Forecast duration must be divisible by time resolution"
646651
logger.error(message)
@@ -649,6 +654,7 @@ def forecast_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo
649654

650655
@field_validator("history_minutes")
651656
def history_minutes_divide_by_time_resolution(cls, v: int, info: ValidationInfo) -> int:
657+
"""Check history length requested will give stable number of timesteps"""
652658
if v % info.data["time_resolution_minutes"] != 0:
653659
message = "History duration must be divisible by time resolution"
654660
logger.error(message)

0 commit comments

Comments
 (0)