ecopipeline 0.8.1__tar.gz → 0.8.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. {ecopipeline-0.8.1/src/ecopipeline.egg-info → ecopipeline-0.8.2}/PKG-INFO +1 -1
  2. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/setup.cfg +1 -1
  3. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/event_tracking/event_tracking.py +8 -5
  4. {ecopipeline-0.8.1 → ecopipeline-0.8.2/src/ecopipeline.egg-info}/PKG-INFO +1 -1
  5. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/LICENSE +0 -0
  6. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/README.md +0 -0
  7. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/pyproject.toml +0 -0
  8. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/setup.py +0 -0
  9. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/__init__.py +0 -0
  10. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/event_tracking/__init__.py +0 -0
  11. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/extract/__init__.py +0 -0
  12. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/extract/extract.py +0 -0
  13. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/load/__init__.py +0 -0
  14. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/load/load.py +0 -0
  15. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/transform/__init__.py +0 -0
  16. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/transform/bayview.py +0 -0
  17. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/transform/lbnl.py +0 -0
  18. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/transform/transform.py +0 -0
  19. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/utils/ConfigManager.py +0 -0
  20. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/utils/__init__.py +0 -0
  21. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline/utils/unit_convert.py +0 -0
  22. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline.egg-info/SOURCES.txt +0 -0
  23. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline.egg-info/dependency_links.txt +0 -0
  24. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline.egg-info/requires.txt +0 -0
  25. {ecopipeline-0.8.1 → ecopipeline-0.8.2}/src/ecopipeline.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.8.1
3
+ Version: 0.8.2
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
  [metadata]
2
2
  name = ecopipeline
3
- version = 0.8.1
3
+ version = 0.8.2
4
4
  authors = ["Carlos Bello, <bellocarlos@seattleu.edu>, Emil Fahrig <fahrigemil@seattleu.edu>, Casey Mang <cmang@seattleu.edu>, Julian Harris <harrisjulian@seattleu.edu>, Roger Tram <rtram@seattleu.edu>, Nolan Price <nolan@ecotope.com>"]
5
5
  description = Contains functions for use in Ecotope Datapipelines
6
6
  long_description = file: README.md
@@ -3,7 +3,7 @@ import numpy as np
3
3
  import datetime as dt
4
4
  from ecopipeline import ConfigManager
5
5
 
6
- def flag_boundary_alarms(df: pd.DataFrame, daily_df : pd.DataFrame, config : ConfigManager, default_fault_time : int = 15, site: str = "") -> pd.DataFrame:
6
+ def flag_boundary_alarms(df: pd.DataFrame, config : ConfigManager, default_fault_time : int = 15, site: str = "") -> pd.DataFrame:
7
7
  """
8
8
  Function will take a pandas dataframe and location of alarm information in a csv,
9
9
  and create an dataframe with applicable alarm events
@@ -11,9 +11,8 @@ def flag_boundary_alarms(df: pd.DataFrame, daily_df : pd.DataFrame, config : Con
11
11
  Parameters
12
12
  ----------
13
13
  df: pd.DataFrame
14
- post-transformed dataframe for minute data
15
- daily_df: pd.DataFrame
16
- post-transformed dataframe for daily data
14
+ post-transformed dataframe for minute data. It should be noted that this function expects consecutive, in order minutes. If minutes
15
+ are out of order or have gaps, the function may return erroneous alarms.
17
16
  config : ecopipeline.ConfigManager
18
17
  The ConfigManager object that holds configuration data for the pipeline. Among other things, this object will point to a file
19
18
  called Varriable_Names.csv in the input folder of the pipeline (e.g. "full/path/to/pipeline/input/Variable_Names.csv").
@@ -51,6 +50,10 @@ def flag_boundary_alarms(df: pd.DataFrame, daily_df : pd.DataFrame, config : Con
51
50
  bounds_df['pretty_name'] = bounds_df['variable_name']
52
51
  if not 'fault_time' in bounds_df.columns:
53
52
  bounds_df['fault_time'] = default_fault_time
53
+
54
+ idx = df.index
55
+ unique_days = pd.to_datetime(pd.Series(idx).dt.normalize().unique())
56
+
54
57
  bounds_df = bounds_df.loc[:, ["variable_name", "high_alarm", "low_alarm", "fault_time", "pretty_name"]]
55
58
  bounds_df.dropna(axis=0, thresh=2, inplace=True)
56
59
  bounds_df.set_index(['variable_name'], inplace=True)
@@ -66,7 +69,7 @@ def flag_boundary_alarms(df: pd.DataFrame, daily_df : pd.DataFrame, config : Con
66
69
  upper_mask = df[bound_var] > bounds["high_alarm"]
67
70
  if pd.isna(bounds['fault_time']):
68
71
  bounds['fault_time'] = default_fault_time
69
- for day in daily_df.index:
72
+ for day in unique_days:
70
73
  next_day = day + pd.Timedelta(days=1)
71
74
  # low alert
72
75
  low_filtered_df = lower_mask.loc[(lower_mask.index >= day) & (lower_mask.index < next_day)]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.8.1
3
+ Version: 0.8.2
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)
File without changes
File without changes
File without changes
File without changes