ocf-data-sampler 0.0.22__tar.gz → 0.0.23__tar.gz
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-0.0.22/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.23}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23/ocf_data_sampler.egg-info}/PKG-INFO +1 -1
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/pyproject.toml +1 -1
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_nwp.py +1 -1
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_select_time_slice.py +13 -13
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/LICENSE +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/MANIFEST.in +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/README.md +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/load.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/model.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/save.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/constants.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/gsp.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/nwp.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/ecmwf.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/ukv.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/satellite.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/utils.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/gsp.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/nwp.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/satellite.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/sun_position.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/dropout.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/fill_time_periods.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/geospatial.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/location.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/select_time_slice.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/requires.txt +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/top_level.txt +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/setup.cfg +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/__init__.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/config/test_config.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/conftest.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/load/test_load_gsp.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/load/test_load_nwp.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/load/test_load_satellite.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_gsp.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_satellite.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_sun_position.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_dropout.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_fill_time_periods.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_find_contiguous_time_periods.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_location.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_select_spatial_slice.py +0 -0
- {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/torch_datasets/test_pvnet_uk_regional.py +0 -0
|
@@ -6,7 +6,7 @@ import xarray as xr
|
|
|
6
6
|
import pytest
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
NWP_FREQ = pd.Timedelta("
|
|
9
|
+
NWP_FREQ = pd.Timedelta("3h")
|
|
10
10
|
|
|
11
11
|
@pytest.fixture(scope="module")
|
|
12
12
|
def da_sat_like():
|
|
@@ -33,7 +33,7 @@ def da_nwp_like():
|
|
|
33
33
|
x = np.arange(-100, 100)
|
|
34
34
|
y = np.arange(-100, 100)
|
|
35
35
|
datetimes = pd.date_range("2024-01-02 00:00", "2024-01-03 00:00", freq=NWP_FREQ)
|
|
36
|
-
steps = pd.timedelta_range("
|
|
36
|
+
steps = pd.timedelta_range("0h", "16h", freq="1h")
|
|
37
37
|
channels = ["t", "dswrf"]
|
|
38
38
|
|
|
39
39
|
da_nwp = xr.DataArray(
|
|
@@ -138,9 +138,9 @@ def test_select_time_slice_nwp_basic(da_nwp_like, t0_str):
|
|
|
138
138
|
|
|
139
139
|
# Slice parameters
|
|
140
140
|
t0 = pd.Timestamp(f"2024-01-02 {t0_str}")
|
|
141
|
-
forecast_duration = pd.Timedelta("
|
|
142
|
-
history_duration = pd.Timedelta("
|
|
143
|
-
freq = pd.Timedelta("
|
|
141
|
+
forecast_duration = pd.Timedelta("6h")
|
|
142
|
+
history_duration = pd.Timedelta("3h")
|
|
143
|
+
freq = pd.Timedelta("1h")
|
|
144
144
|
|
|
145
145
|
# Make the selection
|
|
146
146
|
da_slice = select_time_slice_nwp(
|
|
@@ -172,10 +172,10 @@ def test_select_time_slice_nwp_with_dropout(da_nwp_like, dropout_hours):
|
|
|
172
172
|
"""Test the functionality of select_time_slice_nwp with dropout"""
|
|
173
173
|
|
|
174
174
|
t0 = pd.Timestamp("2024-01-02 12:00")
|
|
175
|
-
forecast_duration = pd.Timedelta("
|
|
176
|
-
history_duration = pd.Timedelta("
|
|
177
|
-
freq = pd.Timedelta("
|
|
178
|
-
dropout_timedelta = pd.Timedelta(f"-{dropout_hours}
|
|
175
|
+
forecast_duration = pd.Timedelta("6h")
|
|
176
|
+
history_duration = pd.Timedelta("3h")
|
|
177
|
+
freq = pd.Timedelta("1h")
|
|
178
|
+
dropout_timedelta = pd.Timedelta(f"-{dropout_hours}h")
|
|
179
179
|
|
|
180
180
|
da_slice = select_time_slice_nwp(
|
|
181
181
|
da_nwp_like,
|
|
@@ -207,10 +207,10 @@ def test_select_time_slice_nwp_with_dropout_and_accum(da_nwp_like, t0_str):
|
|
|
207
207
|
|
|
208
208
|
# Slice parameters
|
|
209
209
|
t0 = pd.Timestamp(f"2024-01-02 {t0_str}")
|
|
210
|
-
forecast_duration = pd.Timedelta("
|
|
211
|
-
history_duration = pd.Timedelta("
|
|
212
|
-
freq = pd.Timedelta("
|
|
213
|
-
dropout_timedelta = pd.Timedelta("-
|
|
210
|
+
forecast_duration = pd.Timedelta("6h")
|
|
211
|
+
history_duration = pd.Timedelta("3h")
|
|
212
|
+
freq = pd.Timedelta("1h")
|
|
213
|
+
dropout_timedelta = pd.Timedelta("-2h")
|
|
214
214
|
|
|
215
215
|
t0_delayed = (t0 + dropout_timedelta).floor(NWP_FREQ)
|
|
216
216
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/data/uk_gsp_locations.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/__init__.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/ecmwf.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/ukv.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/satellite.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/sun_position.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/fill_time_periods.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/select_spatial_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/select_time_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/torch_datasets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_select_spatial_slice.py
RENAMED
|
File without changes
|
{ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/torch_datasets/test_pvnet_uk_regional.py
RENAMED
|
File without changes
|