ocf-data-sampler 0.2.10__py3-none-any.whl → 0.2.12__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.

@@ -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.10
3
+ Version: 0.2.12
4
4
  Author: James Fulton, Peter Dudfield
5
5
  Author-email: Open Climate Fix team <info@openclimatefix.org>
6
6
  License: MIT License
@@ -35,7 +35,7 @@ Requires-Dist: numpy
35
35
  Requires-Dist: pandas
36
36
  Requires-Dist: xarray
37
37
  Requires-Dist: zarr==2.18.3
38
- Requires-Dist: numcodecs<0.16
38
+ Requires-Dist: numcodecs==0.13.1
39
39
  Requires-Dist: dask
40
40
  Requires-Dist: matplotlib
41
41
  Requires-Dist: ocf_blosc2
@@ -32,7 +32,7 @@ ocf_data_sampler/numpy_sample/sun_position.py,sha256=5tt-zNm6aRuZMsxZPaAxyg7Heik
32
32
  ocf_data_sampler/select/__init__.py,sha256=mK7Wu_-j9IXGTYrOuDf5yDDuU5a306b0iGKTAooNg_s,210
33
33
  ocf_data_sampler/select/dropout.py,sha256=WVOCweTGfIjufAlnfmYiPofz6X38TxQgzkLwtiB3TrU,1712
34
34
  ocf_data_sampler/select/fill_time_periods.py,sha256=TlGxp1xiAqnhdWfLy0pv3FuZc00dtimjWdLzr4JoTGA,865
35
- ocf_data_sampler/select/find_contiguous_time_periods.py,sha256=cEXrQDzk8pXknxB0q3v5DakosagHMoLDAj302B8Xpw0,11537
35
+ ocf_data_sampler/select/find_contiguous_time_periods.py,sha256=8lkWsV5i7iLCVGqQ-PGZbvWxsz3wBvLO70GSf6WeR0k,11363
36
36
  ocf_data_sampler/select/geospatial.py,sha256=CDExkl36eZOKmdJPzUr_K0Wn3axHqv5nYo-EkSiINcc,5032
37
37
  ocf_data_sampler/select/location.py,sha256=AZvGR8y62opiW7zACGXjoOtBEWRfSLOZIA73O5Deu0c,1037
38
38
  ocf_data_sampler/select/select_spatial_slice.py,sha256=liAqIa-Amj58pOqx5r16i99HURj9oQ41j7gnPgRDQP4,8201
@@ -52,7 +52,7 @@ ocf_data_sampler/torch_datasets/utils/time_slice_for_dataset.py,sha256=1DN6VsWWd
52
52
  ocf_data_sampler/torch_datasets/utils/valid_time_periods.py,sha256=xcy75cVxl0WrglnX5YUAFjXXlO2GwEBHWyqo8TDuiOA,4714
53
53
  scripts/refactor_site.py,sha256=skzvsPP0Cn9yTKndzkilyNcGz4DZ88ctvCJ0XrBdc2A,3135
54
54
  utils/compute_icon_mean_stddev.py,sha256=a1oWMRMnny39rV-dvu8rcx85sb4bXzPFrR1gkUr4Jpg,2296
55
- ocf_data_sampler-0.2.10.dist-info/METADATA,sha256=CEhASIN7vsyVYY8ZQzIXbdZrI3VhDip_gX7Hwct2p-M,11625
56
- ocf_data_sampler-0.2.10.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
57
- ocf_data_sampler-0.2.10.dist-info/top_level.txt,sha256=LEFU4Uk-PEo72QGLAfnVZIUEm37Q8mKuMeg_Xk-p33g,31
58
- ocf_data_sampler-0.2.10.dist-info/RECORD,,
55
+ ocf_data_sampler-0.2.12.dist-info/METADATA,sha256=G0rtK1M1DqIZrvtV0dOlbfumxxmOB8P96pXr61QTEfU,11628
56
+ ocf_data_sampler-0.2.12.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
57
+ ocf_data_sampler-0.2.12.dist-info/top_level.txt,sha256=LEFU4Uk-PEo72QGLAfnVZIUEm37Q8mKuMeg_Xk-p33g,31
58
+ ocf_data_sampler-0.2.12.dist-info/RECORD,,