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.

Files changed (60) hide show
  1. {ocf_data_sampler-0.0.22/ocf_data_sampler.egg-info → ocf_data_sampler-0.0.23}/PKG-INFO +1 -1
  2. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23/ocf_data_sampler.egg-info}/PKG-INFO +1 -1
  3. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/pyproject.toml +1 -1
  4. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_nwp.py +1 -1
  5. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_select_time_slice.py +13 -13
  6. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/LICENSE +0 -0
  7. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/MANIFEST.in +0 -0
  8. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/README.md +0 -0
  9. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/__init__.py +0 -0
  10. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/__init__.py +0 -0
  11. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/load.py +0 -0
  12. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/model.py +0 -0
  13. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/config/save.py +0 -0
  14. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/constants.py +0 -0
  15. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
  16. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/__init__.py +0 -0
  17. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/gsp.py +0 -0
  18. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/__init__.py +0 -0
  19. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/nwp.py +0 -0
  20. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
  21. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/ecmwf.py +0 -0
  22. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/ukv.py +0 -0
  23. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
  24. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/satellite.py +0 -0
  25. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/load/utils.py +0 -0
  26. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/__init__.py +0 -0
  27. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/gsp.py +0 -0
  28. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/nwp.py +0 -0
  29. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/satellite.py +0 -0
  30. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/numpy_batch/sun_position.py +0 -0
  31. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/__init__.py +0 -0
  32. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/dropout.py +0 -0
  33. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/fill_time_periods.py +0 -0
  34. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/find_contiguous_time_periods.py +0 -0
  35. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/geospatial.py +0 -0
  36. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/location.py +0 -0
  37. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
  38. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/select/select_time_slice.py +0 -0
  39. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/torch_datasets/__init__.py +0 -0
  40. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler/torch_datasets/pvnet_uk_regional.py +0 -0
  41. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
  42. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
  43. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/requires.txt +0 -0
  44. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/ocf_data_sampler.egg-info/top_level.txt +0 -0
  45. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/setup.cfg +0 -0
  46. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/__init__.py +0 -0
  47. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/config/test_config.py +0 -0
  48. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/conftest.py +0 -0
  49. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/load/test_load_gsp.py +0 -0
  50. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/load/test_load_nwp.py +0 -0
  51. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/load/test_load_satellite.py +0 -0
  52. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_gsp.py +0 -0
  53. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_satellite.py +0 -0
  54. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/numpy_batch/test_sun_position.py +0 -0
  55. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_dropout.py +0 -0
  56. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_fill_time_periods.py +0 -0
  57. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_find_contiguous_time_periods.py +0 -0
  58. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_location.py +0 -0
  59. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/select/test_select_spatial_slice.py +0 -0
  60. {ocf_data_sampler-0.0.22 → ocf_data_sampler-0.0.23}/tests/torch_datasets/test_pvnet_uk_regional.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: Sample from weather data for renewable energy prediction
5
5
  Author: James Fulton, Peter Dudfield, and the Open Climate Fix team
6
6
  Author-email: info@openclimatefix.org
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ocf_data_sampler
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: Sample from weather data for renewable energy prediction
5
5
  Author: James Fulton, Peter Dudfield, and the Open Climate Fix team
6
6
  Author-email: info@openclimatefix.org
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ocf_data_sampler"
7
- version = "0.0.22"
7
+ version = "0.0.23"
8
8
  license = { file = "LICENSE" }
9
9
  readme = "README.md"
10
10
  description = "Sample from weather data for renewable energy prediction"
@@ -16,7 +16,7 @@ def da_nwp_like():
16
16
 
17
17
  x = np.arange(-100, 100, 10)
18
18
  y = np.arange(-100, 100, 10)
19
- steps = pd.timedelta_range("0H", "8H", freq="1H")
19
+ steps = pd.timedelta_range("0h", "8h", freq="1h")
20
20
  target_times = t0 + steps
21
21
 
22
22
  channels = ["t", "dswrf"]
@@ -6,7 +6,7 @@ import xarray as xr
6
6
  import pytest
7
7
 
8
8
 
9
- NWP_FREQ = pd.Timedelta("3H")
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("0H", "16H", freq="1H")
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("6H")
142
- history_duration = pd.Timedelta("3H")
143
- freq = pd.Timedelta("1H")
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("6H")
176
- history_duration = pd.Timedelta("3H")
177
- freq = pd.Timedelta("1H")
178
- dropout_timedelta = pd.Timedelta(f"-{dropout_hours}H")
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("6H")
211
- history_duration = pd.Timedelta("3H")
212
- freq = pd.Timedelta("1H")
213
- dropout_timedelta = pd.Timedelta("-2H")
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