cgse-common 0.16.4__py3-none-any.whl → 0.16.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgse-common
3
- Version: 0.16.4
3
+ Version: 0.16.6
4
4
  Summary: Software framework to support hardware testing
5
5
  Author: IvS KU Leuven
6
6
  Maintainer-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
@@ -8,7 +8,7 @@ egse/counter.py,sha256=7UwBeTAu213xdNdGAOYpUWNQ4jD4yVM1bOG10Ax4UFs,5097
8
8
  egse/decorators.py,sha256=B-zRa1WdLO71zqS5M27JBglcThYPho7seYfa4HOGj5c,27171
9
9
  egse/device.py,sha256=nn2HkN1KIHAmo37WZcqig-p2mQz1LgqpIfj1wPrUTLc,13240
10
10
  egse/dicts.py,sha256=dUAq7PTPvs73OrZb2Fh3loxvYv4ifUiK6bBcgrFU77Y,3972
11
- egse/env.py,sha256=0gynCT5mzbVtlKtZkpRUNa7aiyC1jXv7InW4X0BfThU,28809
11
+ egse/env.py,sha256=7HKzb61Mtd5f-kNoN6-Lrik1ZriWkplqE36CnBdRtAM,29074
12
12
  egse/exceptions.py,sha256=QB3MZRJizecWOj1cPbvG0UcIqFn7NRJ6rw1xtdNSFxw,1225
13
13
  egse/heartbeat.py,sha256=xt5mePu9Zr9fLAhN1MLq1Z7aCOKtNIhRVCAmWhtNwP8,3039
14
14
  egse/hk.py,sha256=AumSpB8SYXes75CB2iiKXfLkMK5IkVDHITFKrf8IT6g,32010
@@ -29,7 +29,7 @@ egse/scpi.py,sha256=WJ73EaLgRUV6ah1V41l0L7AXI-Dc6Jct7hPHlbbCIcg,15461
29
29
  egse/settings.py,sha256=YrRsMUn_IpOVnhTqUGREQUjMw8-AQ6aUBulQiij9MwY,15486
30
30
  egse/settings.yaml,sha256=mz9O2QqmiptezsMvxJRLhnC1ROwIHENX0nbnhMaXUpE,190
31
31
  egse/setup.py,sha256=1k-5CjzY3_tZ6XCitNOIyZEWyAUC8LqGcnmdKS68vYw,33945
32
- egse/signal.py,sha256=zW_36xm-RpzwuCu6x30dTvjkfnuyRebKKpl69Yk1QSc,7990
32
+ egse/signal.py,sha256=f5pyOiNW9iTSIxV_ce5stIfG0ub9MRbaekE85kQOVzs,7992
33
33
  egse/socketdevice.py,sha256=R8XwYHTH3lFhFngfsGbi_L7bTnTLHxMTEKIF7gmm5rc,7465
34
34
  egse/state.py,sha256=HdU2MFOlYRbawYRZmizV6Y8MgnZrUF0bx4fXaYU-M_s,3023
35
35
  egse/system.py,sha256=tBlhNoKvop_QpOGQhyhGUBPuAixCDOiClwqeZM-eC4I,75538
@@ -39,7 +39,7 @@ egse/zmq_ser.py,sha256=d2lETLkLUll_F1Phc1pI7MEeA41uX7YZ8lhSFmBQZVw,3022
39
39
  egse/plugins/metrics/duckdb.py,sha256=E2eeNo3I7ajRuByodaYiPNvC0Zwyc7hsIlhr1W_eXdo,16148
40
40
  egse/plugins/metrics/influxdb.py,sha256=ecxjA_csYwf8RW3sXjiQxZHREfyrfStH1HA_rAs1AA8,6690
41
41
  egse/plugins/metrics/timescaledb.py,sha256=Ug0NWDV1Ky2VeFY6tDZL9xg6AFgnAEh2F_llVPnlRBA,21191
42
- cgse_common-0.16.4.dist-info/METADATA,sha256=iW9UICw-YDIcw4W1X8W9y6UzricCmeOI0JCJ3rtIKoA,3032
43
- cgse_common-0.16.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
- cgse_common-0.16.4.dist-info/entry_points.txt,sha256=erQovXd1bGzsngB0_sfY7IYRNwHIhwq3K8fmQvGS12o,198
45
- cgse_common-0.16.4.dist-info/RECORD,,
42
+ cgse_common-0.16.6.dist-info/METADATA,sha256=Xip11z58Z_Y17DAmym5_HbkGfYQ2lgCMfoAfm6J4Eq4,3032
43
+ cgse_common-0.16.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ cgse_common-0.16.6.dist-info/entry_points.txt,sha256=erQovXd1bGzsngB0_sfY7IYRNwHIhwq3K8fmQvGS12o,198
45
+ cgse_common-0.16.6.dist-info/RECORD,,
egse/env.py CHANGED
@@ -573,6 +573,15 @@ def print_env():
573
573
  console.print(f" {get_local_settings_env_name():{col_width}s}: {get_local_settings_path()}")
574
574
 
575
575
 
576
+ def bool_env(var_name: str) -> bool:
577
+ """Return True if the environment variable is set to 1, true, yes, or on. All case-insensitive."""
578
+
579
+ if value := os.getenv(var_name):
580
+ return value.strip().lower() in {"1", "true", "yes", "on"}
581
+
582
+ return False
583
+
584
+
576
585
  @contextlib.contextmanager
577
586
  def env_var(**kwargs: str | int | float | bool | None):
578
587
  """
egse/signal.py CHANGED
@@ -158,7 +158,7 @@ class FileBasedSignaling:
158
158
  """Terminate the monitoring loop thread."""
159
159
  self.running = False
160
160
  if self.thread.is_alive():
161
- self.thread.join(timeout=1)
161
+ self.thread.join(timeout=1.0)
162
162
 
163
163
 
164
164
  def create_signal_command_file(signal_dir: Path, service_id: str, command: dict) -> None: