ecopipeline 0.11.5__py3-none-any.whl → 0.11.6__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.
@@ -78,7 +78,7 @@ def flag_abnormal_COP(daily_data: pd.DataFrame, config : ConfigManager, system:
78
78
  for bound_var, bounds in bounds_df.iterrows():
79
79
  if bound_var in cop_columns:
80
80
  for day, day_values in daily_data.iterrows():
81
- if day_values[bound_var] > bounds['high_alarm'] or day_values[bound_var] < bounds['low_alarm']:
81
+ if not day_values[bound_var] is None and (day_values[bound_var] > bounds['high_alarm'] or day_values[bound_var] < bounds['low_alarm']):
82
82
  alarm_str = f"Unexpected COP Value detected: {bounds['pretty_name']} = {round(day_values[bound_var],2)}"
83
83
  if day in alarms_dict:
84
84
  alarms_dict[day].append([bound_var, alarm_str])
@@ -135,6 +135,9 @@ def flag_boundary_alarms(df: pd.DataFrame, config : ConfigManager, default_fault
135
135
  pd.DataFrame:
136
136
  Pandas dataframe with alarm events
137
137
  """
138
+ if df.empty:
139
+ print("cannot flag boundary alarms. Dataframe is empty")
140
+ return pd.DataFrame()
138
141
  variable_names_path = config.get_var_names_path()
139
142
  try:
140
143
  bounds_df = pd.read_csv(variable_names_path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.11.5
3
+ Version: 0.11.6
4
4
  Summary: Contains functions for use in Ecotope Datapipelines
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: GNU General Public License (GPL)
@@ -1,6 +1,6 @@
1
1
  ecopipeline/__init__.py,sha256=pjC00JWsjVAhS0jUKHD-wyi4UIpTsWbIg9JaxLS1mlc,275
2
2
  ecopipeline/event_tracking/__init__.py,sha256=SV2kkvJgptjeyLQlqHWcDRpQO6-JC433_dRZ3H9-ZNU,131
3
- ecopipeline/event_tracking/event_tracking.py,sha256=uqGfku6QBqFALCedKn9pbOkJtFJ9_aJUUU2nij2y2YQ,29829
3
+ ecopipeline/event_tracking/event_tracking.py,sha256=NxrGJylD5m5t_OI4VwItbUUbtLW19LrDLy3sjUeQL80,29981
4
4
  ecopipeline/extract/__init__.py,sha256=gQ3sak6NJ63Gpo-hZXrtZfeKOTHLRyAVXfTgxxRpqPo,675
5
5
  ecopipeline/extract/extract.py,sha256=5C6KrfMAGQhTxHaWc1Lgm8yV5g994Fiinwk-IEVSHbM,51519
6
6
  ecopipeline/load/__init__.py,sha256=NLa_efQJZ8aP-J0Y5xx9DP7mtfRH9jY6Jz1ZMZN_BAA,292
@@ -13,8 +13,8 @@ ecopipeline/utils/ConfigManager.py,sha256=-g1wtExdvhYO5Y6Q3cRbywa__DxRMFruLrB4Ya
13
13
  ecopipeline/utils/NOAADataDownloader.py,sha256=iC2nl_O4PS1KFrchcPXRZxshwZwUMSqXy6BQBUwnOUU,20927
14
14
  ecopipeline/utils/__init__.py,sha256=7dT3tP6SMK4uBW6NBmQ8i6LaNTTuV6fpAZToBBlJ904,62
15
15
  ecopipeline/utils/unit_convert.py,sha256=VFh1we2Y8KV3u21BeWb-U3TlZJXo83q5vdxxkpgcuME,3064
16
- ecopipeline-0.11.5.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- ecopipeline-0.11.5.dist-info/METADATA,sha256=y6Y85wETutaGhBOT0NbNcsUT-gqjq__93HBm4jxRS8U,2330
18
- ecopipeline-0.11.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- ecopipeline-0.11.5.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
20
- ecopipeline-0.11.5.dist-info/RECORD,,
16
+ ecopipeline-0.11.6.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ ecopipeline-0.11.6.dist-info/METADATA,sha256=gpFWc8ZON7l0l4u7zp6b4OLx7s2XDfgln5ZmA5gT8Ko,2330
18
+ ecopipeline-0.11.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ ecopipeline-0.11.6.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
20
+ ecopipeline-0.11.6.dist-info/RECORD,,