corebridge 0.3.0__tar.gz → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: corebridge
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Bridge for Stactics AICore
5
5
  Home-page: https://github.com/fenke/corebridge
6
6
  Author: Fenke Meijer
@@ -0,0 +1 @@
1
+ __version__ = "0.3.2"
@@ -456,7 +456,7 @@ class AICoreRScriptModule(AICoreModuleBase):
456
456
 
457
457
  def get_flow_status(self):
458
458
  return [
459
- f"process {name} for {process.flow_object['name']} is done: {process.popen.poll()}, args: {process.popen_args}"
459
+ f"process {name} for {process.flow_object['name']} pollstatus: {process.popen.poll()}, args: {process.popen_args}"
460
460
  for name, process in self.flow_results.items()
461
461
  if process and process.popen
462
462
  ]
@@ -481,7 +481,7 @@ def update_flow(self:AICoreRScriptModule):
481
481
  process = self.flow_results[flow_object['name']]
482
482
  if process.popen.poll() is None:
483
483
  syslog.debug(f"Process is still running: {flow_object['name']}, args: {process.popen_args}")
484
- return process
484
+ return self.get_flow_status()
485
485
  else:
486
486
  syslog.debug(f"Process finished: {flow_object['name']}, args: {process.popen_args}, returncode: {process.popen.poll()}")
487
487
 
@@ -494,12 +494,12 @@ def update_flow(self:AICoreRScriptModule):
494
494
  libfolder=libfolder,
495
495
  pkg_repo=self.cran_repo
496
496
  )
497
- return self.flow_results[flow_object['name']]
498
497
 
499
498
  syslog.info(f"RScriptModule flow update complete.")
499
+ return self.get_flow_status()
500
500
 
501
501
 
502
- # %% ../nbs/02_rscriptbridge.ipynb 126
502
+ # %% ../nbs/02_rscriptbridge.ipynb 125
503
503
  def recursive_flatten_nested_data(
504
504
  data:dict,
505
505
  column_prefix:str='') -> dict:
@@ -544,7 +544,7 @@ def recursive_flatten_nested_data(
544
544
  )
545
545
 
546
546
 
547
- # %% ../nbs/02_rscriptbridge.ipynb 130
547
+ # %% ../nbs/02_rscriptbridge.ipynb 129
548
548
  @patch
549
549
  def write_uploaded_data(
550
550
  self:AICoreRScriptModule,
@@ -592,7 +592,8 @@ def infer(
592
592
  f"Startup time: {self.init_time.isoformat()}",
593
593
  f"init_args: {self.init_args}, init_kwargs: {self.init_kwargs}",
594
594
  ]
595
- self.update_flow()
595
+
596
+ msg += self.update_flow()
596
597
  # Pickup params, pop those that are not intended for the processor
597
598
  lastSeen = kwargs.pop('lastSeen', False)
598
599
  recordformat = kwargs.pop('format', "records").lower()
@@ -618,6 +619,7 @@ def infer(
618
619
  result = result[::-1]
619
620
 
620
621
  syslog.debug(f"Read {result.shape[0]} rows from {readTag}")
622
+
621
623
  return {
622
624
  'msg':msg,
623
625
  'data': timeseries_dataframe_to_datadict(
@@ -626,8 +628,9 @@ def infer(
626
628
  timezone=timezone,
627
629
  popNaN=True)
628
630
  }
631
+
629
632
  return {
630
- 'msg':msg,
633
+ 'msg':msg + self.get_flow_status(),
631
634
  'data': []
632
635
  }
633
636
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: corebridge
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Bridge for Stactics AICore
5
5
  Home-page: https://github.com/fenke/corebridge
6
6
  Author: Fenke Meijer
@@ -5,7 +5,7 @@
5
5
  ### Python library ###
6
6
  repo = corebridge
7
7
  lib_name = %(repo)s
8
- version = 0.3.0
8
+ version = 0.3.2
9
9
  min_python = 3.10
10
10
  license = apache2
11
11
  black_formatting = False
@@ -1 +0,0 @@
1
- __version__ = "0.3.0"
File without changes
File without changes
File without changes
File without changes
File without changes