ScriptCollection 3.5.129__py3-none-any.whl → 3.5.131__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.
ScriptCollection/SCLog.py CHANGED
@@ -10,6 +10,7 @@ class LogLevel(Enum):
10
10
  Warning = 2
11
11
  Information = 3
12
12
  Debug = 4
13
+ Diagnostic = 5
13
14
 
14
15
  def __int__(self):
15
16
  return self.value
@@ -59,6 +60,8 @@ class SCLog:
59
60
  part3 = f"Warning: {message}"
60
61
  if loglevel == LogLevel.Debug:
61
62
  part3 = f"Debug: {message}"
63
+ if loglevel == LogLevel.Diagnostic:
64
+ part3 = f"Diagnostic: {message}"
62
65
  if self.add_overhead:
63
66
  moment: datetime = None
64
67
  if self.zone_of_time is None:
@@ -74,6 +77,8 @@ class SCLog:
74
77
  part2 = f"Warning"
75
78
  elif loglevel == LogLevel.Debug:
76
79
  part2 = f"Debug"
80
+ elif loglevel == LogLevel.Diagnostic:
81
+ part2 = f"Diagnostic"
77
82
  else:
78
83
  raise ValueError("Unknown loglevel.")
79
84
  part3 = f"] {message}"
@@ -88,6 +93,8 @@ class SCLog:
88
93
  GeneralUtilities.print_text_in_yellow(part2, print_to_std_out, self.print_as_color)
89
94
  elif loglevel == LogLevel.Debug:
90
95
  GeneralUtilities.print_text_in_cyan(part2, print_to_std_out, self.print_as_color)
96
+ elif loglevel == LogLevel.Debug:
97
+ GeneralUtilities.print_text_in_cyan(part2, print_to_std_out, self.print_as_color)
91
98
  else:
92
99
  raise ValueError("Unknown loglevel.")
93
100
  GeneralUtilities.print_text(part3+"\n", print_to_std_out)
@@ -33,7 +33,7 @@ from .ProgramRunnerPopen import ProgramRunnerPopen
33
33
  from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
34
34
  from .SCLog import SCLog, LogLevel
35
35
 
36
- version = "3.5.129"
36
+ version = "3.5.131"
37
37
  __version__ = version
38
38
 
39
39
 
@@ -53,7 +53,7 @@ class ScriptCollectionCore:
53
53
  self.program_runner = ProgramRunnerPopen()
54
54
  self.call_program_runner_directly = None
55
55
  self.__mocked_program_calls = list[ScriptCollectionCore.__MockProgramCall]()
56
- self.log = SCLog(None, LogLevel.Quiet, False)
56
+ self.log = SCLog(None, LogLevel.Warning, False)
57
57
 
58
58
  @staticmethod
59
59
  @GeneralUtilities.check_arguments
@@ -1547,6 +1547,9 @@ class ScriptCollectionCore:
1547
1547
  if out_line.startswith("Debug: "):
1548
1548
  loglevel = LogLevel.Debug
1549
1549
  out_line = out_line[len("Debug: "):]
1550
+ if out_line.startswith("Diagnostic: "):
1551
+ loglevel = LogLevel.Diagnostic
1552
+ out_line = out_line[len("Diagnostic: "):]
1550
1553
  log.log(out_line, loglevel)
1551
1554
  # if print_live_output:
1552
1555
  # sys.stdout.flush()
@@ -1563,9 +1566,9 @@ class ScriptCollectionCore:
1563
1566
  if print_live_output:
1564
1567
  # print(err_line, end='\n', file=sys.stdout if print_errors_as_information else sys.stderr, flush=False)
1565
1568
  loglevel = LogLevel.Error
1566
- if out_line.startswith("Warning: "):
1569
+ if err_line.startswith("Warning: "):
1567
1570
  loglevel = LogLevel.Warning
1568
- out_line = out_line[len("Warning: "):]
1571
+ err_line = err_line[len("Warning: "):]
1569
1572
  if print_errors_as_information: # "errors" in "print_errors_as_information" means: all what is written to std-err
1570
1573
  loglevel = LogLevel.Information
1571
1574
  log.log(err_line, loglevel)
@@ -1609,6 +1612,7 @@ class ScriptCollectionCore:
1609
1612
  verbose = verbosity > 2
1610
1613
  if verbose:
1611
1614
  self.log.log(f"Run '{info_for_log}'.", LogLevel.Debug)
1615
+ self.log.log(f"Run '{info_for_log}' with the following properties: verbosity={verbosity}; timeoutInSeconds={timeoutInSeconds}, print_live_output={print_live_output}.", LogLevel.Diagnostic)
1612
1616
 
1613
1617
  exit_code: int = None
1614
1618
  stdout: str = GeneralUtilities.empty_string
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 3.5.129
3
+ Version: 3.5.131
4
4
  Summary: The ScriptCollection is the place for reusable scripts.
5
5
  Home-page: https://github.com/anionDev/ScriptCollection
6
6
  Author: Marius Göcke
@@ -6,12 +6,12 @@ ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZ
6
6
  ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
7
7
  ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
8
8
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
9
- ScriptCollection/SCLog.py,sha256=2oWISBU4RhAWBPtsM_nPWiOJ6UZEY1T4O9iXtjhRZ24,3685
10
- ScriptCollection/ScriptCollectionCore.py,sha256=fnE_EMbnV9_4bTT_TrKSw4Dk3cdIbsX44dKRE9MlCvw,128521
9
+ ScriptCollection/SCLog.py,sha256=Dd2P8vH2PA830wAv6bchlMHHdGE_7At-F4WQY5w4XdA,4016
10
+ ScriptCollection/ScriptCollectionCore.py,sha256=VeUXcTplrc4rETIBE_pbkEko4WKgZJk1tf4JnZ_BrpA,128945
11
11
  ScriptCollection/TasksForCommonProjectStructure.py,sha256=YdlVfTnVeAuYFqqqgXaf1gw2LtY0OO9cnrOXFQaRXYE,235511
12
12
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- scriptcollection-3.5.129.dist-info/METADATA,sha256=Fv8g2ahqWR9mTE93u-6F_PqjsJWf08IVBygZEKWkxmE,7694
14
- scriptcollection-3.5.129.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
15
- scriptcollection-3.5.129.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
16
- scriptcollection-3.5.129.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
17
- scriptcollection-3.5.129.dist-info/RECORD,,
13
+ scriptcollection-3.5.131.dist-info/METADATA,sha256=uiJ_-mag3M0Nzez34A3inrnXHncyHhSmlqYcyeGI4T4,7694
14
+ scriptcollection-3.5.131.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
15
+ scriptcollection-3.5.131.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
16
+ scriptcollection-3.5.131.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
17
+ scriptcollection-3.5.131.dist-info/RECORD,,