ScriptCollection 3.5.119__py3-none-any.whl → 3.5.121__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.
@@ -340,15 +340,15 @@ class TasksForCommonProjectStructure:
340
340
  filename = os.path.basename(wheel_file)
341
341
 
342
342
  if gpg_identity is None:
343
- gpg_identity_argument = ""
343
+ gpg_identity_argument = GeneralUtilities.empty_string
344
344
  else:
345
- gpg_identity_argument = "" # f" --sign --identity {gpg_identity}"
345
+ gpg_identity_argument = GeneralUtilities.empty_string # f" --sign --identity {gpg_identity}"
346
346
  # disabled due to https://blog.pypi.org/posts/2023-05-23-removing-pgp/
347
347
 
348
348
  if verbosity > 2:
349
349
  verbose_argument = " --verbose"
350
350
  else:
351
- verbose_argument = ""
351
+ verbose_argument = GeneralUtilities.empty_string
352
352
 
353
353
  twine_argument = f"upload{gpg_identity_argument} --repository {repository} --non-interactive {filename} --disable-progress-bar"
354
354
  twine_argument = f"{twine_argument} --username __token__ --password {api_key}{verbose_argument}"
@@ -649,8 +649,8 @@ class TasksForCommonProjectStructure:
649
649
  filename = os.path.basename(csproj_file)
650
650
  GeneralUtilities.write_message_to_stdout(f"Check {filename}...")
651
651
  file_content = GeneralUtilities.read_text_from_file(csproj_file)
652
- regex = regex.replace("\r", "").replace("\n", "\\n")
653
- file_content = file_content.replace("\r", "")
652
+ regex = regex.replace("\r", GeneralUtilities.empty_string).replace("\n", "\\n")
653
+ file_content = file_content.replace("\r", GeneralUtilities.empty_string)
654
654
  match = re.match(regex, file_content)
655
655
  return match is not None
656
656
 
@@ -972,13 +972,13 @@ class TasksForCommonProjectStructure:
972
972
  diff_target_file = os.path.join(diff_target_folder, "DiffReport.html")
973
973
  title = (f'Reference of codeunit {codeunitname} {codeunit_version_identifier} (contained in project <a href="{public_repository_url}">{projectname}</a> {project_version_identifier})')
974
974
  if public_repository_url is None:
975
- repo_url_html = ""
975
+ repo_url_html = GeneralUtilities.empty_string
976
976
  else:
977
977
  repo_url_html = f'<a href="{public_repository_url}/tree/{branch}/{codeunitname}">Source-code</a>'
978
978
  if codeunit_has_testcases:
979
979
  coverage_report_link = '<a href="./TestCoverageReport/index.html">Test-coverage-report</a><br>'
980
980
  else:
981
- coverage_report_link = ""
981
+ coverage_report_link = GeneralUtilities.empty_string
982
982
  index_file_for_reference = os.path.join(target_folder, "index.html")
983
983
 
984
984
  design_file = None
@@ -987,7 +987,7 @@ class TasksForCommonProjectStructure:
987
987
  design_file = GeneralUtilities.get_modest_dark_url()
988
988
  # TODO make designs from customizable sources be available by a customizable name and outsource this to a class-property because this is duplicated code.
989
989
  if design_file is None:
990
- design_html = ""
990
+ design_html = GeneralUtilities.empty_string
991
991
  else:
992
992
  design_html = f'<link type="text/css" rel="stylesheet" href="{design_file}" />'
993
993
 
@@ -1095,7 +1095,7 @@ class TasksForCommonProjectStructure:
1095
1095
  if version_identifier_of_project == "Latest":
1096
1096
  latest_version_hint = f" (v{project_version})"
1097
1097
  else:
1098
- latest_version_hint = ""
1098
+ latest_version_hint = GeneralUtilities.empty_string
1099
1099
  reference_versions_html_lines.append(f' <h2>{version_identifier_of_project}{latest_version_hint}</h2>')
1100
1100
  reference_versions_html_lines.append(" Contained codeunits:<br/>")
1101
1101
  reference_versions_html_lines.append(" <ul>")
@@ -1113,7 +1113,7 @@ class TasksForCommonProjectStructure:
1113
1113
  design_file = GeneralUtilities.get_modest_dark_url()
1114
1114
  # TODO make designs from customizable sources be available by a customizable name and outsource this to a class-property because this is duplicated code.
1115
1115
  if design_file is None:
1116
- design_html = ""
1116
+ design_html = GeneralUtilities.empty_string
1117
1117
  else:
1118
1118
  design_html = f'<link type="text/css" rel="stylesheet" href="{design_file}" />'
1119
1119
 
@@ -1423,7 +1423,7 @@ class TasksForCommonProjectStructure:
1423
1423
  self.__sc.format_xml_file(sbom_folder+f"/{codeunitname}.{codeunitversion}.sbom.xml")
1424
1424
 
1425
1425
  @GeneralUtilities.check_arguments
1426
- def push_docker_build_artifact(self, push_artifacts_file: str, registry: str, verbosity: int, push_readme: bool, commandline_arguments: list[str], repository_folder_name: str) -> None:
1426
+ def push_docker_build_artifact(self, push_artifacts_file: str, registry: str, verbosity: int, push_readme: bool, commandline_arguments: list[str], repository_folder_name: str,image_name:str=None) -> None:
1427
1427
  folder_of_this_file = os.path.dirname(push_artifacts_file)
1428
1428
  filename = os.path.basename(push_artifacts_file)
1429
1429
  codeunitname_regex: str = "([a-zA-Z0-9]+)"
@@ -1441,15 +1441,17 @@ class TasksForCommonProjectStructure:
1441
1441
  image_file = sc.find_file_by_extension(applicationimage_folder, "tar")
1442
1442
  image_filename = os.path.basename(image_file)
1443
1443
  codeunit_version = self.get_version_of_codeunit(os.path.join(codeunit_folder, f"{codeunitname}.codeunit.xml"))
1444
- image_tag_name = codeunitname.lower()
1445
- repo = f"{registry}/{image_tag_name}"
1444
+ if image_name is None:
1445
+ image_name = codeunitname
1446
+ image_name=image_name.lower()
1447
+ repo = f"{registry}/{image_name}"
1446
1448
  image_latest = f"{repo}:latest"
1447
1449
  image_version = f"{repo}:{codeunit_version}"
1448
1450
  GeneralUtilities.write_message_to_stdout("Load image...")
1449
1451
  sc.run_program("docker", f"load --input {image_filename}", applicationimage_folder, verbosity=verbosity)
1450
1452
  GeneralUtilities.write_message_to_stdout("Tag image...")
1451
- sc.run_program("docker", f"tag {image_tag_name}:{codeunit_version} {image_latest}", verbosity=verbosity)
1452
- sc.run_program("docker", f"tag {image_tag_name}:{codeunit_version} {image_version}", verbosity=verbosity)
1453
+ sc.run_program("docker", f"tag {image_name}:{codeunit_version} {image_latest}", verbosity=verbosity)
1454
+ sc.run_program("docker", f"tag {image_name}:{codeunit_version} {image_version}", verbosity=verbosity)
1453
1455
  GeneralUtilities.write_message_to_stdout("Push image...")
1454
1456
  sc.run_program("docker", f"push {image_latest}", verbosity=verbosity)
1455
1457
  sc.run_program("docker", f"push {image_version}", verbosity=verbosity)
@@ -1940,7 +1942,7 @@ class TasksForCommonProjectStructure:
1940
1942
  def set_constant(self, codeunit_folder: str, constantname: str, constant_value: str, documentationsummary: str = None, constants_valuefile: str = None) -> None:
1941
1943
  self.assert_is_codeunit_folder(codeunit_folder)
1942
1944
  if documentationsummary is None:
1943
- documentationsummary = ""
1945
+ documentationsummary = GeneralUtilities.empty_string
1944
1946
  constants_folder = os.path.join(codeunit_folder, "Other", "Resources", "Constants")
1945
1947
  GeneralUtilities.ensure_directory_exists(constants_folder)
1946
1948
  constants_metafile = os.path.join(constants_folder, f"{constantname}.constant.xml")
@@ -2259,7 +2261,7 @@ class TasksForCommonProjectStructure:
2259
2261
  codeunit_file = os.path.join(codeunit_folder, f"{codeunit_name}.codeunit.xml")
2260
2262
  root: etree._ElementTree = etree.parse(codeunit_file)
2261
2263
  ignoreddependencies = root.xpath('//cps:codeunit/cps:properties/cps:updatesettings/cps:ignoreddependencies/cps:ignoreddependency', namespaces=namespaces)
2262
- result = [x.text.replace("\\n", "").replace("\\r", "").replace("\n", "").replace("\r", "").strip() for x in ignoreddependencies]
2264
+ result = [x.text.replace("\\n", GeneralUtilities.empty_string).replace("\\r", GeneralUtilities.empty_string).replace("\n", GeneralUtilities.empty_string).replace("\r", GeneralUtilities.empty_string).strip() for x in ignoreddependencies]
2263
2265
  if print_warnings_for_ignored_dependencies and len(result) > 0:
2264
2266
  GeneralUtilities.write_message_to_stderr(f"Warning: Codeunit {codeunit_name} contains the following dependencies which will are ignoed for automatic updates: "+', '.join(result))
2265
2267
  return result
@@ -2346,7 +2348,7 @@ class TasksForCommonProjectStructure:
2346
2348
  sc: ScriptCollectionCore = ScriptCollectionCore()
2347
2349
  workspace_file: str = sc.find_file_by_extension(repository_folder, "code-workspace")
2348
2350
  task_file: str = os.path.join(repository_folder, "Taskfile.yml")
2349
- lines: list[str] = ["version: '3'", "", "tasks:", ""]
2351
+ lines: list[str] = ["version: '3'", GeneralUtilities.empty_string, "tasks:", GeneralUtilities.empty_string]
2350
2352
  workspace_file_content: str = GeneralUtilities.read_text_from_file(workspace_file)
2351
2353
  jsoncontent = json.loads(workspace_file_content)
2352
2354
  tasks = jsoncontent["tasks"]["tasks"]
@@ -2389,7 +2391,7 @@ class TasksForCommonProjectStructure:
2389
2391
  aliases = task["aliases"]
2390
2392
  for alias in aliases:
2391
2393
  lines.append(f' - {alias}')
2392
- lines.append("")
2394
+ lines.append(GeneralUtilities.empty_string)
2393
2395
  GeneralUtilities.write_lines_to_file(task_file, lines)
2394
2396
 
2395
2397
  @GeneralUtilities.check_arguments
@@ -2860,21 +2862,21 @@ class TasksForCommonProjectStructure:
2860
2862
 
2861
2863
  description = self.get_codeunit_description(codeunit_file)
2862
2864
 
2863
- lines.append(f"")
2865
+ lines.append(GeneralUtilities.empty_string)
2864
2866
  lines.append(f"[{codeunitname}]")
2865
2867
  lines.append(f"note as {codeunitname}Note")
2866
2868
  lines.append(f" {description}")
2867
2869
  lines.append(f"end note")
2868
2870
  lines.append(f"{codeunitname} .. {codeunitname}Note")
2869
2871
 
2870
- lines.append(f"")
2872
+ lines.append(GeneralUtilities.empty_string)
2871
2873
  for codeunitname in codeunits:
2872
2874
  codeunit_file: str = os.path.join(repository_folder, codeunitname, f"{codeunitname}.codeunit.xml")
2873
2875
  dependent_codeunits = self.get_dependent_code_units(codeunit_file)
2874
2876
  for dependent_codeunit in dependent_codeunits:
2875
2877
  lines.append(f"{codeunitname} --> {dependent_codeunit}")
2876
2878
 
2877
- lines.append(f"")
2879
+ lines.append(GeneralUtilities.empty_string)
2878
2880
  lines.append("@enduml")
2879
2881
 
2880
2882
  GeneralUtilities.write_lines_to_file(target_file, lines)
@@ -3015,15 +3017,15 @@ class TasksForCommonProjectStructure:
3015
3017
  build_folder = os.path.join(other_folder, "Build")
3016
3018
  quality_folder = os.path.join(other_folder, "QualityCheck")
3017
3019
  reference_folder = os.path.join(other_folder, "Reference")
3018
- additional_arguments_c: str = ""
3019
- additional_arguments_b: str = ""
3020
- additional_arguments_r: str = ""
3021
- additional_arguments_l: str = ""
3022
- additional_arguments_g: str = ""
3023
- additional_arguments_f: str = ""
3020
+ additional_arguments_c: str = GeneralUtilities.empty_string
3021
+ additional_arguments_b: str = GeneralUtilities.empty_string
3022
+ additional_arguments_r: str = GeneralUtilities.empty_string
3023
+ additional_arguments_l: str = GeneralUtilities.empty_string
3024
+ additional_arguments_g: str = GeneralUtilities.empty_string
3025
+ additional_arguments_f: str = GeneralUtilities.empty_string
3024
3026
  general_argument = f' --overwrite_verbosity {str(verbosity)} --overwrite_targetenvironmenttype {target_environmenttype}'
3025
3027
 
3026
- c_additionalargumentsfile_argument = ""
3028
+ c_additionalargumentsfile_argument = GeneralUtilities.empty_string
3027
3029
 
3028
3030
  if is_pre_merge:
3029
3031
  general_argument = general_argument+" --overwrite_is_pre_merge true"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 3.5.119
3
+ Version: 3.5.121
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
@@ -0,0 +1,17 @@
1
+ ScriptCollection/CertificateUpdater.py,sha256=OAxrG21k_o3W3niOOGNSZzUPJlvolOWc1lRB2dMhc3g,9212
2
+ ScriptCollection/Executables.py,sha256=ht-RZFu4g34Sr09b_L0c2QpKcjLWX-wFtKSMDMZYqsw,32266
3
+ ScriptCollection/GeneralUtilities.py,sha256=hqAKRF99uu2RCSBgjX4qjYn3IlImwm6rehRvt8hbNFQ,46407
4
+ ScriptCollection/ImageUpdater.py,sha256=lel1nevTN7fgdoCDE6Xg8YY6XPsZaOQiCIyWXbmVnh0,20882
5
+ ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
6
+ ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
7
+ ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
8
+ ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
9
+ ScriptCollection/SCLog.py,sha256=GEvh0m4OXz_0703XgY-LyAy9RDYg8x1baNZSrWhhu2A,3127
10
+ ScriptCollection/ScriptCollectionCore.py,sha256=eoVmIEoaU_B8sIgaJTN1e7ocurjsLyT2VzxvrsQLyV4,127859
11
+ ScriptCollection/TasksForCommonProjectStructure.py,sha256=4aEuIf89jbgKE4uMYm4DlPDe9Iu1Zujo8wPOzDld09w,234867
12
+ ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ scriptcollection-3.5.121.dist-info/METADATA,sha256=guQOcS7sLrfO50qZx1bILbJ5sgUGP2b4IdJb-BG5ZcE,7694
14
+ scriptcollection-3.5.121.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
15
+ scriptcollection-3.5.121.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
16
+ scriptcollection-3.5.121.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
17
+ scriptcollection-3.5.121.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,16 +0,0 @@
1
- ScriptCollection/CertificateUpdater.py,sha256=pJopWFcwaLAEVljtC4O3SVrlpIpoJNUhT1V4mgiqLvE,8970
2
- ScriptCollection/Executables.py,sha256=ht-RZFu4g34Sr09b_L0c2QpKcjLWX-wFtKSMDMZYqsw,32266
3
- ScriptCollection/GeneralUtilities.py,sha256=VO4a7xctkjN5dcBXc32gz0x9U07DEagasjvYVKqLmdM,44173
4
- ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
5
- ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
6
- ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
7
- ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
8
- ScriptCollection/SCLog.py,sha256=GYnmS97_zQY8uzfrYQnRW9QyBTQgrKMUNfK1QHhcXC4,2384
9
- ScriptCollection/ScriptCollectionCore.py,sha256=GcAkvv1mcQYyrmhLBRlFu8bCpEbaJPm8cgQrIZXuYa4,131693
10
- ScriptCollection/TasksForCommonProjectStructure.py,sha256=OfCJsg-FLdde6Duhy4FjBcfwLr-9iLhQAimRa1ZgRyE,234045
11
- ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- scriptcollection-3.5.119.dist-info/METADATA,sha256=2nU78EkyhuLoi4sy4hvG9xiD4kGcswnOLWloi5NZVSg,7694
13
- scriptcollection-3.5.119.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
14
- scriptcollection-3.5.119.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
15
- scriptcollection-3.5.119.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
- scriptcollection-3.5.119.dist-info/RECORD,,