ecopipeline 0.9.1__tar.gz → 0.9.3__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.9.1/src/ecopipeline.egg-info → ecopipeline-0.9.3}/PKG-INFO +1 -1
  2. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/setup.cfg +1 -1
  3. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/extract/extract.py +4 -0
  4. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/transform/transform.py +6 -5
  5. {ecopipeline-0.9.1 → ecopipeline-0.9.3/src/ecopipeline.egg-info}/PKG-INFO +1 -1
  6. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/LICENSE +0 -0
  7. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/README.md +0 -0
  8. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/pyproject.toml +0 -0
  9. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/setup.py +0 -0
  10. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/__init__.py +0 -0
  11. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/event_tracking/__init__.py +0 -0
  12. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/event_tracking/event_tracking.py +0 -0
  13. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/extract/__init__.py +0 -0
  14. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/load/__init__.py +0 -0
  15. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/load/load.py +0 -0
  16. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/transform/__init__.py +0 -0
  17. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/transform/bayview.py +0 -0
  18. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/transform/lbnl.py +0 -0
  19. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/utils/ConfigManager.py +0 -0
  20. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/utils/__init__.py +0 -0
  21. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline/utils/unit_convert.py +0 -0
  22. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline.egg-info/SOURCES.txt +0 -0
  23. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline.egg-info/dependency_links.txt +0 -0
  24. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/src/ecopipeline.egg-info/requires.txt +0 -0
  25. {ecopipeline-0.9.1 → ecopipeline-0.9.3}/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.9.1
3
+ Version: 0.9.3
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.9.1
3
+ version = 0.9.3
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
@@ -728,6 +728,10 @@ def fm_api_to_df(config: ConfigManager, startTime: datetime = None, endTime: dat
728
728
  json_message = response.json()
729
729
  string_to_match = 'The log size is too large - please try again with a smaller date range.'
730
730
  if 'error' in json_message and 'message' in json_message['error'] and json_message['error']['message'] == string_to_match:
731
+ if endTime - timedelta(minutes=30) < startTime:
732
+ # if we can't retrieve less then 30 minutes of data, the dataframe is bust...
733
+ print(f"Unable to retrieve data for {startTime} - {endTime}")
734
+ return pd.DataFrame()
731
735
  # Calculate the midpoint between the two datetimes
732
736
  time_diff = endTime - startTime
733
737
  midpointTime = startTime + time_diff / 2
@@ -396,11 +396,12 @@ def column_name_change(df : pd.DataFrame, dt : pd.Timestamp, new_column : str, o
396
396
  remove_old_column : bool
397
397
  remove old column when done
398
398
  """
399
- if df.index.min() < dt:
400
- mask = df.index < dt
401
- df.loc[mask, new_column] = df.loc[mask, old_column]
402
- if remove_old_column:
403
- df = df.drop(columns=[old_column])
399
+ if old_column in df.columns:
400
+ if df.index.min() < dt:
401
+ mask = df.index < dt
402
+ df.loc[mask, new_column] = df.loc[mask, old_column]
403
+ if remove_old_column:
404
+ df = df.drop(columns=[old_column])
404
405
  return df
405
406
 
406
407
  def heat_output_calc(df: pd.DataFrame, flow_var : str, hot_temp : str, cold_temp : str, heat_out_col_name : str, return_as_kw : bool = True) -> pd.DataFrame:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.9.1
3
+ Version: 0.9.3
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