ocf-data-sampler 0.2.11__tar.gz → 0.2.13__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 (64) hide show
  1. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/PKG-INFO +1 -3
  2. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/__init__.py +0 -1
  3. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/find_contiguous_time_periods.py +3 -8
  4. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler.egg-info/PKG-INFO +1 -3
  5. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler.egg-info/requires.txt +0 -2
  6. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/pyproject.toml +0 -2
  7. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/LICENSE +0 -0
  8. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/README.md +0 -0
  9. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/__init__.py +0 -0
  10. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/config/__init__.py +0 -0
  11. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/config/load.py +0 -0
  12. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/config/model.py +0 -0
  13. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/config/save.py +0 -0
  14. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/data/uk_gsp_locations.csv +0 -0
  15. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/gsp.py +0 -0
  16. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/load_dataset.py +0 -0
  17. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/__init__.py +0 -0
  18. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/nwp.py +0 -0
  19. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/providers/__init__.py +0 -0
  20. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/providers/cloudcasting.py +0 -0
  21. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/providers/ecmwf.py +0 -0
  22. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/providers/gfs.py +0 -0
  23. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/providers/icon.py +0 -0
  24. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/providers/ukv.py +0 -0
  25. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/nwp/providers/utils.py +0 -0
  26. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/satellite.py +0 -0
  27. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/site.py +0 -0
  28. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/load/utils.py +0 -0
  29. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/__init__.py +0 -0
  30. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/collate.py +0 -0
  31. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/common_types.py +0 -0
  32. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/datetime_features.py +0 -0
  33. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/gsp.py +0 -0
  34. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/nwp.py +0 -0
  35. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/satellite.py +0 -0
  36. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/site.py +0 -0
  37. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/numpy_sample/sun_position.py +0 -0
  38. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/__init__.py +0 -0
  39. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/dropout.py +0 -0
  40. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/fill_time_periods.py +0 -0
  41. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/geospatial.py +0 -0
  42. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/location.py +0 -0
  43. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/select_spatial_slice.py +0 -0
  44. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/select/select_time_slice.py +0 -0
  45. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/datasets/__init__.py +0 -0
  46. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/datasets/pvnet_uk.py +0 -0
  47. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/datasets/site.py +0 -0
  48. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/sample/__init__.py +0 -0
  49. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/sample/base.py +0 -0
  50. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/sample/site.py +0 -0
  51. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/sample/uk_regional.py +0 -0
  52. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/utils/__init__.py +0 -0
  53. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/utils/channel_dict_to_dataarray.py +0 -0
  54. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/utils/merge_and_fill_utils.py +0 -0
  55. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/utils/spatial_slice_for_dataset.py +0 -0
  56. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/utils/time_slice_for_dataset.py +0 -0
  57. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/torch_datasets/utils/valid_time_periods.py +0 -0
  58. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler/utils.py +0 -0
  59. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler.egg-info/SOURCES.txt +0 -0
  60. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler.egg-info/dependency_links.txt +0 -0
  61. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/ocf_data_sampler.egg-info/top_level.txt +0 -0
  62. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/scripts/refactor_site.py +0 -0
  63. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/setup.cfg +0 -0
  64. {ocf_data_sampler-0.2.11 → ocf_data_sampler-0.2.13}/utils/compute_icon_mean_stddev.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocf-data-sampler
3
- Version: 0.2.11
3
+ Version: 0.2.13
4
4
  Author: James Fulton, Peter Dudfield
5
5
  Author-email: Open Climate Fix team <info@openclimatefix.org>
6
6
  License: MIT License
@@ -38,11 +38,9 @@ Requires-Dist: zarr==2.18.3
38
38
  Requires-Dist: numcodecs==0.13.1
39
39
  Requires-Dist: dask
40
40
  Requires-Dist: matplotlib
41
- Requires-Dist: ocf_blosc2
42
41
  Requires-Dist: pvlib
43
42
  Requires-Dist: pydantic
44
43
  Requires-Dist: pyproj
45
- Requires-Dist: pathy
46
44
  Requires-Dist: pyaml_env
47
45
  Requires-Dist: pyresample
48
46
  Requires-Dist: h5netcdf
@@ -1,4 +1,3 @@
1
- import ocf_blosc2
2
1
  from ocf_data_sampler.load.gsp import open_gsp
3
2
  from ocf_data_sampler.load.nwp import open_nwp
4
3
  from ocf_data_sampler.load.satellite import open_sat_data
@@ -247,15 +247,10 @@ def intersection_of_2_dataframes_of_periods(a: pd.DataFrame, b: pd.DataFrame) ->
247
247
  # Five ways in which two periods may overlap:
248
248
  # a: |----| or |---| or |---| or |--| or |-|
249
249
  # b: |--| |---| |---| |------| |-|
250
- # In all five, `a` must always start before `b` ends,
251
- # and `a` must always end after `b` starts:
250
+ # In all five, `a` must always start before (or equal to) where `b` ends,
251
+ # and `a` must always end after (or equal to) where `b` starts.
252
252
 
253
- # TODO: <= and >= because we should allow overlap time periods of length 1. e.g.
254
- # a: |----| or |---|
255
- # b: |--| |---|
256
- # These aren't allowed if we use < and >.
257
-
258
- overlapping_periods = b[(a_period.start_dt < b.end_dt) & (a_period.end_dt > b.start_dt)]
253
+ overlapping_periods = b[(a_period.start_dt <= b.end_dt) & (a_period.end_dt >= b.start_dt)]
259
254
 
260
255
  # There are two ways in which two periods may *not* overlap:
261
256
  # a: |---| or |---|
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocf-data-sampler
3
- Version: 0.2.11
3
+ Version: 0.2.13
4
4
  Author: James Fulton, Peter Dudfield
5
5
  Author-email: Open Climate Fix team <info@openclimatefix.org>
6
6
  License: MIT License
@@ -38,11 +38,9 @@ Requires-Dist: zarr==2.18.3
38
38
  Requires-Dist: numcodecs==0.13.1
39
39
  Requires-Dist: dask
40
40
  Requires-Dist: matplotlib
41
- Requires-Dist: ocf_blosc2
42
41
  Requires-Dist: pvlib
43
42
  Requires-Dist: pydantic
44
43
  Requires-Dist: pyproj
45
- Requires-Dist: pathy
46
44
  Requires-Dist: pyaml_env
47
45
  Requires-Dist: pyresample
48
46
  Requires-Dist: h5netcdf
@@ -6,11 +6,9 @@ zarr==2.18.3
6
6
  numcodecs==0.13.1
7
7
  dask
8
8
  matplotlib
9
- ocf_blosc2
10
9
  pvlib
11
10
  pydantic
12
11
  pyproj
13
- pathy
14
12
  pyaml_env
15
13
  pyresample
16
14
  h5netcdf
@@ -29,11 +29,9 @@ dependencies = [
29
29
  "numcodecs==0.13.1",
30
30
  "dask",
31
31
  "matplotlib",
32
- "ocf_blosc2",
33
32
  "pvlib",
34
33
  "pydantic",
35
34
  "pyproj",
36
- "pathy",
37
35
  "pyaml_env",
38
36
  "pyresample",
39
37
  "h5netcdf",