ecopipeline 0.7.1__py3-none-any.whl → 0.7.2__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/load/load.py CHANGED
@@ -460,7 +460,7 @@ def report_data_loss(config : ConfigManager, site_name : str = None):
460
460
  cursor.close()
461
461
  return True
462
462
 
463
- def load_data_statistics(config : ConfigManager, daily_stats_df : pd.DataFrame, config_daily_indicator : str = "day"):
463
+ def load_data_statistics(config : ConfigManager, daily_stats_df : pd.DataFrame, config_daily_indicator : str = "day", custom_table_name : str = None):
464
464
  """
465
465
  Logs data statistics for the site in a table with name "{daily table name}_stats"
466
466
 
@@ -472,13 +472,18 @@ def load_data_statistics(config : ConfigManager, daily_stats_df : pd.DataFrame,
472
472
  dataframe created by the create_data_statistics_df() function in ecopipeline.transform
473
473
  config_daily_indicator : str
474
474
  the indicator of the daily_table name in the config.ini file of the data pipeline
475
+ custom_table_name : str
476
+ custom table name for data statistics. Overwrites the name "{daily table name}_stats" to your custom name.
477
+ In this sense config_daily_indicator's pointer is no longer used.
475
478
 
476
479
  Returns
477
480
  -------
478
481
  bool:
479
482
  A boolean value indicating if the data was successfully written to the database.
480
483
  """
481
- table_name = f"{config.get_table_name(config_daily_indicator)}_stats"
484
+ table_name = custom_table_name
485
+ if table_name is None:
486
+ table_name = f"{config.get_table_name(config_daily_indicator)}_stats"
482
487
  return load_overwrite_database(config, daily_stats_df, config.get_db_table_info([]), config_daily_indicator, table_name=table_name)
483
488
 
484
489
  def _generate_mysql_update_event_table(row, id):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.7.1
3
+ Version: 0.7.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)
@@ -2,7 +2,7 @@ ecopipeline/__init__.py,sha256=vCRzwd781ciCSXMP1ycM_BXAqxj3KVaNKIjsLOPcbwc,171
2
2
  ecopipeline/extract/__init__.py,sha256=3u_CUMdCguVewU3kN8x6xhVNyo1-p-gwTrhjOh7Psqg,645
3
3
  ecopipeline/extract/extract.py,sha256=heWcWTeRVTRITh_1sHVnkaKOOi5PwUOEVIi4k5tw2Z8,43384
4
4
  ecopipeline/load/__init__.py,sha256=NLa_efQJZ8aP-J0Y5xx9DP7mtfRH9jY6Jz1ZMZN_BAA,292
5
- ecopipeline/load/load.py,sha256=eNps857QRf0DZw_s90ShYbPMAyfOwbQJJfdKqYl7g-Y,22469
5
+ ecopipeline/load/load.py,sha256=u4EkTVScu7EUHkAe-qpm1XDqapihzxApC8rVt8z-XLg,22786
6
6
  ecopipeline/transform/__init__.py,sha256=hYb4F64fXdXtjBSYCqv6gLFBwKZjjnl0z7s291pFE98,2505
7
7
  ecopipeline/transform/bayview.py,sha256=TP24dnTsUD95X-f6732egPZKjepFLJgDm9ImGr-fppY,17899
8
8
  ecopipeline/transform/lbnl.py,sha256=EQ54G4rJXaZ7pwVusKcdK2KBehSdCsNo2ybphtMGs7o,33400
@@ -10,8 +10,8 @@ ecopipeline/transform/transform.py,sha256=l1jw6uQ9Bqcb8tCydpxO3WEE5t_B3CKxfhohrl
10
10
  ecopipeline/utils/ConfigManager.py,sha256=E7e2RC2FveigjREMfeaiFu9fNQ8_b0xlWDfLCywS92k,10088
11
11
  ecopipeline/utils/__init__.py,sha256=ccWUR0m7gD9DfcgsxBCLOfi4lho6RdYuB2Ugy_g6ZdQ,28
12
12
  ecopipeline/utils/unit_convert.py,sha256=VFh1we2Y8KV3u21BeWb-U3TlZJXo83q5vdxxkpgcuME,3064
13
- ecopipeline-0.7.1.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- ecopipeline-0.7.1.dist-info/METADATA,sha256=Jr0oFXTGHK2XGj0Nx6fnmp3NIba-Znjhxf9TinY1Sx4,2329
15
- ecopipeline-0.7.1.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
16
- ecopipeline-0.7.1.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
17
- ecopipeline-0.7.1.dist-info/RECORD,,
13
+ ecopipeline-0.7.2.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ ecopipeline-0.7.2.dist-info/METADATA,sha256=Amdiyygs5UZLIXZn4wyvk4pCHI6d1k-SKckRHXRVGpE,2329
15
+ ecopipeline-0.7.2.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
16
+ ecopipeline-0.7.2.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
17
+ ecopipeline-0.7.2.dist-info/RECORD,,