ScriptCollection 3.5.78__py3-none-any.whl → 3.5.79__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.
@@ -377,7 +377,7 @@ def GenerateARC42ReferenceTemplate() -> int:
377
377
  def CreateChangelogEntry() -> int:
378
378
  parser = argparse.ArgumentParser()
379
379
  parser.add_argument('-f', '--repositoryfolder', required=False, default=".")
380
- parser.add_argument('-m', '--message', required=True)
380
+ parser.add_argument('-m', '--message', required=False, default="Updates.")
381
381
  parser.add_argument('-c', '--commit', action='store_true', required=False, default=False)
382
382
  args = parser.parse_args()
383
383
 
@@ -964,7 +964,7 @@ class GeneralUtilities:
964
964
  message=f"Action failed {amount_of_attempts} times."
965
965
  if action_name is not None:
966
966
  message=f"{message} Name of action: {action_name}"
967
- GeneralUtilities.write_exception_to_stderr(message)
967
+ GeneralUtilities.write_message_to_stderr(message)
968
968
  raise
969
969
  return None
970
970
 
@@ -32,7 +32,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
32
32
  from .ProgramRunnerPopen import ProgramRunnerPopen
33
33
  from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
34
34
 
35
- version = "3.5.78"
35
+ version = "3.5.79"
36
36
  __version__ = version
37
37
 
38
38
 
@@ -192,8 +192,7 @@ class ScriptCollectionCore:
192
192
  until_as_string = self.__datetime_to_string_for_git(until)
193
193
  result = filter(lambda line: not GeneralUtilities.string_is_none_or_whitespace(line), self.run_program("git", f'log --since "{since_as_string}" --until "{until_as_string}" --pretty=format:"%H" --no-patch', repository_folder, throw_exception_if_exitcode_is_not_zero=True)[1].split("\n").replace("\r", ""))
194
194
  if ignore_commits_which_are_not_in_history_of_head:
195
- result = [commit_id for commit_id in result if self.git_commit_is_ancestor(
196
- repository_folder, commit_id)]
195
+ result = [commit_id for commit_id in result if self.git_commit_is_ancestor( repository_folder, commit_id)]
197
196
  return result
198
197
 
199
198
  @GeneralUtilities.check_arguments
@@ -391,10 +390,8 @@ class ScriptCollectionCore:
391
390
  self.run_program_argsasarray("git", ['checkout', '.'], directory, throw_exception_if_exitcode_is_not_zero=True, verbosity=0)
392
391
 
393
392
  @GeneralUtilities.check_arguments
394
- def git_commit(self, directory: str, message: str, author_name: str = None, author_email: str = None, stage_all_changes: bool = True, no_changes_behavior: int = 0) -> str:
395
- # no_changes_behavior=0 => No commit
396
- # no_changes_behavior=1 => Commit anyway
397
- # no_changes_behavior=2 => Exception
393
+ def git_commit(self, directory: str, message: str="Saved changes.", author_name: str = None, author_email: str = None, stage_all_changes: bool = True, no_changes_behavior: int = 0) -> str:
394
+ """no_changes_behavior=0 => No commit; no_changes_behavior=1 => Commit anyway; no_changes_behavior=2 => Exception"""
398
395
  author_name = GeneralUtilities.str_none_safe(author_name).strip()
399
396
  author_email = GeneralUtilities.str_none_safe(author_email).strip()
400
397
  argument = ['commit', '--quiet', '--allow-empty', '--message', message]
@@ -1819,15 +1816,15 @@ DNS = {domain}
1819
1816
  def update_dependencies_of_dotnet_project(self, csproj_file: str, verbosity: int, ignored_dependencies: list[str]):
1820
1817
  folder = os.path.dirname(csproj_file)
1821
1818
  csproj_filename = os.path.basename(csproj_file)
1822
- GeneralUtilities.write_message_to_stderr(f"Check for updates in {csproj_filename}")
1823
- result = self.run_program_with_retry("dotnet", f"list {csproj_filename} package --outdated", folder)
1819
+ GeneralUtilities.write_message_to_stdout(f"Check for updates in {csproj_filename}")
1820
+ result = self.run_program_with_retry("dotnet", f"list {csproj_filename} package --outdated", folder,print_errors_as_information=True)
1824
1821
  for line in result[1].replace("\r", "").split("\n"):
1825
1822
  # Relevant output-lines are something like " > NJsonSchema 10.7.0 10.7.0 10.9.0"
1826
1823
  if ">" in line:
1827
1824
  package_name = line.replace(">", "").strip().split(" ")[0]
1828
1825
  if not (package_name in ignored_dependencies):
1829
- GeneralUtilities.write_message_to_stderr(f"Update package {package_name}")
1830
- self.run_program("dotnet", f"add {csproj_filename} package {package_name}", folder)
1826
+ GeneralUtilities.write_message_to_stdout(f"Update package {package_name}...")
1827
+ self.run_program("dotnet", f"add {csproj_filename} package {package_name}", folder,print_errors_as_information=True)
1831
1828
 
1832
1829
  @GeneralUtilities.check_arguments
1833
1830
  def create_deb_package(self, toolname: str, binary_folder: str, control_file_content: str, deb_output_folder: str, verbosity: int, permission_of_executable_file_as_octet_triple: int) -> None:
@@ -2897,7 +2897,7 @@ class TasksForCommonProjectStructure:
2897
2897
  # update dependencies of resources
2898
2898
  global_scripts_folder = os.path.join(repository_folder, "Other", "Scripts")
2899
2899
  if os.path.isfile(os.path.join(global_scripts_folder, update_dependencies_script_filename)):
2900
- self.__sc.run_program("python", update_dependencies_script_filename, global_scripts_folder)
2900
+ self.__sc.run_program("python", update_dependencies_script_filename, global_scripts_folder,print_live_output=True)
2901
2901
 
2902
2902
  # update dependencies of codeunits
2903
2903
  for codeunit in codeunits:
@@ -2907,7 +2907,7 @@ class TasksForCommonProjectStructure:
2907
2907
  codeunit_folder = os.path.join(repository_folder, codeunit)
2908
2908
  update_dependencies_script_folder = os.path.join(codeunit_folder, "Other")
2909
2909
  GeneralUtilities.ensure_directory_exists(os.path.join(update_dependencies_script_folder, "Resources", "CodeAnalysisResult"))
2910
- self.__sc.run_program("python", update_dependencies_script_filename, update_dependencies_script_folder, verbosity)
2910
+ self.__sc.run_program("python", update_dependencies_script_filename, update_dependencies_script_folder, verbosity,print_live_output=True)
2911
2911
  if self.__sc.git_repository_has_uncommitted_changes(repository_folder):
2912
2912
  version_of_project = self.get_version_of_project(repository_folder)
2913
2913
  changelog_file = os.path.join(repository_folder, "Other", "Resources", "Changelog", f"v{version_of_project}.md")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ScriptCollection
3
- Version: 3.5.78
3
+ Version: 3.5.79
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
@@ -24,7 +24,7 @@ Requires-Python: >=3.10
24
24
  Description-Content-Type: text/markdown
25
25
  Requires-Dist: build>=1.2.2.post1
26
26
  Requires-Dist: coverage>=7.6.12
27
- Requires-Dist: cyclonedx-bom>=5.1.2
27
+ Requires-Dist: cyclonedx-bom>=5.2.0
28
28
  Requires-Dist: defusedxml>=0.7.1
29
29
  Requires-Dist: keyboard>=0.13.5
30
30
  Requires-Dist: lcov-cobertura>=2.0.2
@@ -1,16 +1,16 @@
1
- ScriptCollection/Executables.py,sha256=zxDRhv6UHzP0F9lFQvfPv8twy27BEA0-jIMvZfcZTb4,30016
2
- ScriptCollection/GeneralUtilities.py,sha256=qO7oYjdqmSZxKDoU5leA0XsXS1CdofwTpA8nd0j_b8w,40372
1
+ ScriptCollection/Executables.py,sha256=KAs82A9AsrpTY39Ohg1UrtZN-6e5_Ql17UbLlO0fZfA,30037
2
+ ScriptCollection/GeneralUtilities.py,sha256=ShcDc8N7B_Ad9V--cbmsuirfBaUYvuhkbq9NMR03bDA,40370
3
3
  ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
4
4
  ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
5
5
  ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
6
6
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
7
7
  ScriptCollection/RPStream.py,sha256=NRRHL3YSP3D9MuAV2jB_--0KUKCsvJGxeKnxgrRZ9kY,1545
8
- ScriptCollection/ScriptCollectionCore.py,sha256=0rKJseN_mndaMtnxyCZTcnueb0tRNkSZ4nAr3Z-qrZA,119120
9
- ScriptCollection/TasksForCommonProjectStructure.py,sha256=n3x4XRyjabsL0SuMGZz3LJiq5ctjz7mMAS77QoAJFP8,215347
8
+ ScriptCollection/ScriptCollectionCore.py,sha256=KeMiOHpmVmxAMbIQrzSOTE5QygrXKUpyFXVJ-7tUVJg,119176
9
+ ScriptCollection/TasksForCommonProjectStructure.py,sha256=Au3ipZR6JiBdF2V9phaNeWunPi5YWKjoem4RA-HShyw,215393
10
10
  ScriptCollection/UpdateCertificates.py,sha256=Eynbgu7k9jLxApP2D_8Il77B6BFjJap6K7oTeEAZYbk,7790
11
11
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- ScriptCollection-3.5.78.dist-info/METADATA,sha256=g3NkZZq5fSh4We9jcONpK0gpMaD6UqHhpz5xEvHQDS4,7664
13
- ScriptCollection-3.5.78.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
14
- ScriptCollection-3.5.78.dist-info/entry_points.txt,sha256=1jAL5AuB8mvdw2v-6E7wCZFThurQxchiQynL8DCi-Yg,3545
15
- ScriptCollection-3.5.78.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
- ScriptCollection-3.5.78.dist-info/RECORD,,
12
+ ScriptCollection-3.5.79.dist-info/METADATA,sha256=T-FE9553JDODO_d6hSoH7IAnlpfX1iOql_7z7FYFsbs,7664
13
+ ScriptCollection-3.5.79.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
14
+ ScriptCollection-3.5.79.dist-info/entry_points.txt,sha256=1jAL5AuB8mvdw2v-6E7wCZFThurQxchiQynL8DCi-Yg,3545
15
+ ScriptCollection-3.5.79.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
+ ScriptCollection-3.5.79.dist-info/RECORD,,