captest 0.13.1__tar.gz → 0.13.2__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.
Files changed (25) hide show
  1. {captest-0.13.1/src/captest.egg-info → captest-0.13.2}/PKG-INFO +15 -2
  2. {captest-0.13.1 → captest-0.13.2}/src/captest/_version.py +3 -3
  3. {captest-0.13.1 → captest-0.13.2}/src/captest/capdata.py +6 -6
  4. {captest-0.13.1 → captest-0.13.2}/src/captest/io.py +4 -1
  5. {captest-0.13.1 → captest-0.13.2}/src/captest/plotting.py +1 -1
  6. {captest-0.13.1 → captest-0.13.2/src/captest.egg-info}/PKG-INFO +15 -2
  7. {captest-0.13.1 → captest-0.13.2}/tests/test_CapData.py +5 -5
  8. {captest-0.13.1 → captest-0.13.2}/tests/test_io.py +16 -0
  9. {captest-0.13.1 → captest-0.13.2}/LICENSE.txt +0 -0
  10. {captest-0.13.1 → captest-0.13.2}/MANIFEST.in +0 -0
  11. {captest-0.13.1 → captest-0.13.2}/README.rst +0 -0
  12. {captest-0.13.1 → captest-0.13.2}/pyproject.toml +0 -0
  13. {captest-0.13.1 → captest-0.13.2}/setup.cfg +0 -0
  14. {captest-0.13.1 → captest-0.13.2}/setup.py +0 -0
  15. {captest-0.13.1 → captest-0.13.2}/src/captest/__init__.py +0 -0
  16. {captest-0.13.1 → captest-0.13.2}/src/captest/columngroups.py +0 -0
  17. {captest-0.13.1 → captest-0.13.2}/src/captest/prtest.py +0 -0
  18. {captest-0.13.1 → captest-0.13.2}/src/captest/util.py +0 -0
  19. {captest-0.13.1 → captest-0.13.2}/src/captest.egg-info/SOURCES.txt +0 -0
  20. {captest-0.13.1 → captest-0.13.2}/src/captest.egg-info/dependency_links.txt +0 -0
  21. {captest-0.13.1 → captest-0.13.2}/src/captest.egg-info/requires.txt +0 -0
  22. {captest-0.13.1 → captest-0.13.2}/src/captest.egg-info/top_level.txt +0 -0
  23. {captest-0.13.1 → captest-0.13.2}/tests/test_columngroups.py +0 -0
  24. {captest-0.13.1 → captest-0.13.2}/tests/test_prtest.py +0 -0
  25. {captest-0.13.1 → captest-0.13.2}/tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: captest
3
- Version: 0.13.1
3
+ Version: 0.13.2
4
4
  Summary: Framework and methods to facilitate photovoltaic facility capacity testing following ASTM E2848.
5
5
  Home-page: http://github.com/bt-/pvcaptest
6
6
  Author: Ben Taylor
@@ -77,6 +77,19 @@ Requires-Dist: recommonmark==0.7.1; extra == "all"
77
77
  Requires-Dist: sphinx==6.1.3; extra == "all"
78
78
  Requires-Dist: sphinx_rtd_theme==1.2.0; extra == "all"
79
79
  Requires-Dist: twine; extra == "all"
80
+ Dynamic: author
81
+ Dynamic: author-email
82
+ Dynamic: classifier
83
+ Dynamic: description
84
+ Dynamic: description-content-type
85
+ Dynamic: home-page
86
+ Dynamic: license
87
+ Dynamic: license-file
88
+ Dynamic: platform
89
+ Dynamic: provides-extra
90
+ Dynamic: requires-dist
91
+ Dynamic: requires-python
92
+ Dynamic: summary
80
93
 
81
94
  pvcaptest
82
95
  ==================
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-06-05T09:07:57-0500",
11
+ "date": "2025-07-17T21:52:17-0500",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "6ff85027ec972897c15e912464c7eef0f1565439",
15
- "version": "0.13.1"
14
+ "full-revisionid": "0481b5ec3e414464fb6bf52d9a124a6c272a5deb",
15
+ "version": "0.13.2"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -639,7 +639,7 @@ class ReportingIrradiance(param.Parameterized):
639
639
  )
640
640
  if poa_flt['valid'].sum() == 0:
641
641
  self.poa_flt = poa_flt
642
- self.irr_rc = np.NaN
642
+ self.irr_rc = np.nan
643
643
  warnings.warn(
644
644
  'No valid reference irradiance found. Try reviewing the min and max '
645
645
  'reference irradiance values and the min and max percent below and '
@@ -704,7 +704,7 @@ class ReportingIrradiance(param.Parameterized):
704
704
  self.poa_flt['above_count'].reset_index(), ['poa'], ['above_count'],
705
705
  label='Count pts above',
706
706
  )
707
- if self.irr_rc is not np.NaN:
707
+ if self.irr_rc is not np.nan:
708
708
  count_ellipse = hv.Ellipse(
709
709
  self.irr_rc,
710
710
  self.poa_flt.loc[self.irr_rc, 'below_count'],
@@ -719,7 +719,7 @@ class ReportingIrradiance(param.Parameterized):
719
719
  hv.VLine(self.min_ref_irradiance) *
720
720
  hv.VLine(self.max_ref_irradiance)
721
721
  )
722
- if self.irr_rc is not np.NaN:
722
+ if self.irr_rc is not np.nan:
723
723
  perc_ellipse = hv.Ellipse(
724
724
  self.irr_rc,
725
725
  self.poa_flt.loc[self.irr_rc, 'perc_below'],
@@ -731,7 +731,7 @@ class ReportingIrradiance(param.Parameterized):
731
731
  ) *
732
732
  hv.HLine(self.points_required)
733
733
  )
734
- if self.irr_rc is not np.NaN:
734
+ if self.irr_rc is not np.nan:
735
735
  total_points_ellipse = hv.Ellipse(
736
736
  self.irr_rc,
737
737
  self.poa_flt.loc[self.irr_rc, 'total_pts'],
@@ -744,7 +744,7 @@ class ReportingIrradiance(param.Parameterized):
744
744
  else:
745
745
  ylim_top = self.total_pts + 50
746
746
  vl = hv.VLine(self.rc_irr_60th_perc).opts(line_color='gray')
747
- if self.irr_rc is not np.NaN:
747
+ if self.irr_rc is not np.nan:
748
748
  rep_cond_plot = (
749
749
  (below_count_scatter * above_count_scatter * count_ellipse * vl).opts(ylabel='count points') +
750
750
  (perc_below_scatter * perc_ellipse).opts(ylim=(0, 100)) +
@@ -3145,7 +3145,7 @@ class CapData(object):
3145
3145
 
3146
3146
  Time intervals removed are marked with a "1".
3147
3147
  Time intervals kept are marked with a "0".
3148
- Time intervals removed by a previous filter are np.NaN/blank.
3148
+ Time intervals removed by a previous filter are np.nan/blank.
3149
3149
  Columns/filters are in order they are run from left to right.
3150
3150
  The last column labeled "all_filters" shows is True for intervals that were
3151
3151
  not removed by any of the filters.
@@ -210,7 +210,10 @@ def file_reader(path, **kwargs):
210
210
  continue
211
211
  else:
212
212
  break
213
- data_file.dropna(how="all", axis=0, inplace=True)
213
+ if data_file.isna().all().all():
214
+ warnings.warn("There is no data in the file {}".format(path))
215
+ else:
216
+ data_file.dropna(how="all", axis=0, inplace=True)
214
217
  if data_file.index.equals(pd.Index(np.arange(len(data_file.index)))):
215
218
  kwargs['index_col'] = 1
216
219
  data_file = pd.read_csv(
@@ -181,7 +181,7 @@ def plot_tag(data, tag, width=1500, height=250):
181
181
  plot = hv.NdOverlay(curves)
182
182
  elif len(tag) == 0:
183
183
  plot = hv.Curve(pd.DataFrame(
184
- {'no_data': [np.NaN] * data.shape[0]},
184
+ {'no_data': [np.nan] * data.shape[0]},
185
185
  index=data.index
186
186
  ))
187
187
  plot.opts(
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: captest
3
- Version: 0.13.1
3
+ Version: 0.13.2
4
4
  Summary: Framework and methods to facilitate photovoltaic facility capacity testing following ASTM E2848.
5
5
  Home-page: http://github.com/bt-/pvcaptest
6
6
  Author: Ben Taylor
@@ -77,6 +77,19 @@ Requires-Dist: recommonmark==0.7.1; extra == "all"
77
77
  Requires-Dist: sphinx==6.1.3; extra == "all"
78
78
  Requires-Dist: sphinx_rtd_theme==1.2.0; extra == "all"
79
79
  Requires-Dist: twine; extra == "all"
80
+ Dynamic: author
81
+ Dynamic: author-email
82
+ Dynamic: classifier
83
+ Dynamic: description
84
+ Dynamic: description-content-type
85
+ Dynamic: home-page
86
+ Dynamic: license
87
+ Dynamic: license-file
88
+ Dynamic: platform
89
+ Dynamic: provides-extra
90
+ Dynamic: requires-dist
91
+ Dynamic: requires-python
92
+ Dynamic: summary
80
93
 
81
94
  pvcaptest
82
95
  ==================
@@ -1486,7 +1486,7 @@ class TestAbsDiffFromAverage():
1486
1486
  is less than the threshold.
1487
1487
  """
1488
1488
  s = pd.Series(
1489
- [800, 805, 806, np.NAN], index=['poa1', 'poa2', 'poa3', 'poa4'])
1489
+ [800, 805, 806, np.nan], index=['poa1', 'poa2', 'poa3', 'poa4'])
1490
1490
  meets_threshold = pvc.abs_diff_from_average(s, 25)
1491
1491
  assert meets_threshold is True
1492
1492
 
@@ -1925,10 +1925,10 @@ class TestFilterMissing():
1925
1925
  )
1926
1926
  assert all(meas.floc['regcols'].isna().sum() == 0)
1927
1927
  assert meas.data_filtered.shape[0] == 1440
1928
- meas.data_filtered.loc['10/9/90 12:00', 'meter_power'] = np.NaN
1929
- meas.data_filtered.loc['10/9/90 12:30', 'met1_poa_refcell'] = np.NaN
1930
- meas.data_filtered.loc['10/10/90 12:35', 'met2_amb_temp'] = np.NaN
1931
- meas.data_filtered.loc['10/10/90 12:50', 'met1_windspeed'] = np.NaN
1928
+ meas.data_filtered.loc['10/9/90 12:00', 'meter_power'] = np.nan
1929
+ meas.data_filtered.loc['10/9/90 12:30', 'met1_poa_refcell'] = np.nan
1930
+ meas.data_filtered.loc['10/10/90 12:35', 'met2_amb_temp'] = np.nan
1931
+ meas.data_filtered.loc['10/10/90 12:50', 'met1_windspeed'] = np.nan
1932
1932
  meas.filter_missing()
1933
1933
  assert meas.data_filtered.shape[0] == 1436
1934
1934
 
@@ -180,6 +180,22 @@ class TestFileReader:
180
180
  assert loaded_data.columns[0] == "met1_poa1"
181
181
  assert isinstance(loaded_data.index, pd.DatetimeIndex)
182
182
 
183
+ def test_empty_file(self, tmp_path):
184
+ """
185
+ Test loading a csv with ok indices but no data.
186
+ """
187
+ csv_path = tmp_path / "no_data.csv"
188
+ pd.DataFrame(
189
+ {
190
+ "met1_poa1": np.nan * 20,
191
+ "met1_poa2": np.nan * 20,
192
+ },
193
+ index=pd.date_range(start="8/1/22", periods=20, freq="1min"),
194
+ ).to_csv(csv_path)
195
+ loaded_data = io.file_reader(csv_path)
196
+ print(loaded_data)
197
+ assert loaded_data.isna().all().all()
198
+
183
199
  def test_double_headers_with_blank(self, tmp_path):
184
200
  """Two header rows followed by a blank line."""
185
201
  test_csv = StringIO()
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