ocf-data-sampler 0.5.22__py3-none-any.whl → 0.5.23__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ocf-data-sampler might be problematic. Click here for more details.
- ocf_data_sampler/config/model.py +11 -1
- {ocf_data_sampler-0.5.22.dist-info → ocf_data_sampler-0.5.23.dist-info}/METADATA +1 -1
- {ocf_data_sampler-0.5.22.dist-info → ocf_data_sampler-0.5.23.dist-info}/RECORD +5 -5
- {ocf_data_sampler-0.5.22.dist-info → ocf_data_sampler-0.5.23.dist-info}/WHEEL +0 -0
- {ocf_data_sampler-0.5.22.dist-info → ocf_data_sampler-0.5.23.dist-info}/top_level.txt +0 -0
ocf_data_sampler/config/model.py
CHANGED
|
@@ -337,9 +337,19 @@ class InputData(Base):
|
|
|
337
337
|
site: Site | None = None
|
|
338
338
|
solar_position: SolarPosition | None = None
|
|
339
339
|
|
|
340
|
+
@model_validator(mode="after")
|
|
341
|
+
def check_site_or_gsp(self) -> "InputData":
|
|
342
|
+
"""Ensure that either `site` or `gsp` is provided in the input data."""
|
|
343
|
+
if self.site is None and self.gsp is None:
|
|
344
|
+
raise ValueError(
|
|
345
|
+
"You must provide either `site` or `gsp` in the `input_data`",
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
return self
|
|
349
|
+
|
|
340
350
|
|
|
341
351
|
class Configuration(Base):
|
|
342
352
|
"""Configuration model for the dataset."""
|
|
343
353
|
|
|
344
354
|
general: General = General()
|
|
345
|
-
input_data: InputData = InputData
|
|
355
|
+
input_data: InputData = Field(default_factory=InputData)
|
|
@@ -2,7 +2,7 @@ ocf_data_sampler/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,
|
|
|
2
2
|
ocf_data_sampler/utils.py,sha256=WfmyBacjFGsv_IlUHRezNGc4ixi4wBvom_JF76iJYbY,1487
|
|
3
3
|
ocf_data_sampler/config/__init__.py,sha256=O29mbH0XG2gIY1g3BaveGCnpBO2SFqdu-qzJ7a6evl0,223
|
|
4
4
|
ocf_data_sampler/config/load.py,sha256=LL-7wemI8o4KPkx35j-wQ3HjsMvDgqXr7G46IcASfnU,632
|
|
5
|
-
ocf_data_sampler/config/model.py,sha256=
|
|
5
|
+
ocf_data_sampler/config/model.py,sha256=_HAn8C3iRCiKpo8MK6-d8o9QbuvLOjSL6gjACJpgkcI,11885
|
|
6
6
|
ocf_data_sampler/config/save.py,sha256=m8SPw5rXjkMm1rByjh3pK5StdBi4e8ysnn3jQopdRaI,1064
|
|
7
7
|
ocf_data_sampler/data/uk_gsp_locations_20220314.csv,sha256=RSh7DRh55E3n8lVAaWXGTaXXHevZZtI58td4d4DhGos,10415772
|
|
8
8
|
ocf_data_sampler/data/uk_gsp_locations_20250109.csv,sha256=XZISFatnbpO9j8LwaxNKFzQSjs6hcHFsV8a9uDDpy2E,9055334
|
|
@@ -59,7 +59,7 @@ ocf_data_sampler/torch_datasets/utils/valid_time_periods.py,sha256=xcy75cVxl0Wrg
|
|
|
59
59
|
ocf_data_sampler/torch_datasets/utils/validation_utils.py,sha256=YqmT-lExWlI8_ul3l0EP73Ik002fStr_bhsZh9mQqEU,4735
|
|
60
60
|
scripts/download_gsp_location_data.py,sha256=rRDXMoqX-RYY4jPdxhdlxJGhWdl6r245F5UARgKV6P4,3121
|
|
61
61
|
scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
|
|
62
|
-
ocf_data_sampler-0.5.
|
|
63
|
-
ocf_data_sampler-0.5.
|
|
64
|
-
ocf_data_sampler-0.5.
|
|
65
|
-
ocf_data_sampler-0.5.
|
|
62
|
+
ocf_data_sampler-0.5.23.dist-info/METADATA,sha256=kOyjeb9FyS_aa1-nfLSzJ8BM7tWXmeTYJD3xj9-BVkI,13187
|
|
63
|
+
ocf_data_sampler-0.5.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
64
|
+
ocf_data_sampler-0.5.23.dist-info/top_level.txt,sha256=deUxqmsONNAGZDNbsntbXH7BRA1MqWaUeAJrCo6q_xA,25
|
|
65
|
+
ocf_data_sampler-0.5.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|