ecopipeline 0.11.4__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.
- ecopipeline/event_tracking/event_tracking.py +7 -1
- {ecopipeline-0.11.4.dist-info → ecopipeline-0.11.6.dist-info}/METADATA +1 -1
- {ecopipeline-0.11.4.dist-info → ecopipeline-0.11.6.dist-info}/RECORD +6 -6
- {ecopipeline-0.11.4.dist-info → ecopipeline-0.11.6.dist-info}/WHEEL +0 -0
- {ecopipeline-0.11.4.dist-info → ecopipeline-0.11.6.dist-info}/licenses/LICENSE +0 -0
- {ecopipeline-0.11.4.dist-info → ecopipeline-0.11.6.dist-info}/top_level.txt +0 -0
|
@@ -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)
|
|
@@ -293,6 +296,9 @@ def power_ratio_alarm(daily_df: pd.DataFrame, config : ConfigManager, day_table_
|
|
|
293
296
|
for required_column in required_columns:
|
|
294
297
|
if not required_column in ratios_df.columns:
|
|
295
298
|
raise Exception(f"{required_column} is not present in Variable_Names.csv")
|
|
299
|
+
if ratios_df['alarm_codes'].isna().all() or ratios_df['alarm_codes'].isnull().all():
|
|
300
|
+
print("No alarm codes in ", variable_names_path)
|
|
301
|
+
return pd.DataFrame()
|
|
296
302
|
if not 'pretty_name' in ratios_df.columns:
|
|
297
303
|
ratios_df['pretty_name'] = ratios_df['variable_name']
|
|
298
304
|
else:
|
|
@@ -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=
|
|
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.
|
|
17
|
-
ecopipeline-0.11.
|
|
18
|
-
ecopipeline-0.11.
|
|
19
|
-
ecopipeline-0.11.
|
|
20
|
-
ecopipeline-0.11.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|