ScriptCollection 4.3.63__py3-none-any.whl → 4.4.0__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.
Files changed (38) hide show
  1. ScriptCollection/AnionBuildPlatform.py +205 -205
  2. ScriptCollection/CertificateUpdater.py +157 -155
  3. ScriptCollection/Executables.py +4 -2
  4. ScriptCollection/GeneralUtilities.py +1696 -1696
  5. ScriptCollection/OCIImages/OCIImageManager.py +278 -278
  6. ScriptCollection/ProcessesRunner.py +43 -43
  7. ScriptCollection/ProgramRunnerSudo.py +110 -110
  8. ScriptCollection/Resources/CultureChooser/CultureChooser.js +0 -0
  9. ScriptCollection/Resources/CultureChooser/index.html +0 -0
  10. ScriptCollection/Resources/Dependencies/JRE/Version.txt +0 -0
  11. ScriptCollection/Resources/Dependencies/OpenAPIGenerator/Version.txt +0 -0
  12. ScriptCollection/Resources/Dependencies/PlantUML/Version.txt +0 -0
  13. ScriptCollection/Resources/Fonts/DejaVuSans-Bold.ttf +0 -0
  14. ScriptCollection/Resources/Fonts/DejaVuSans-BoldOblique.ttf +0 -0
  15. ScriptCollection/Resources/Fonts/DejaVuSans-Oblique.ttf +0 -0
  16. ScriptCollection/Resources/Fonts/DejaVuSans.ttf +0 -0
  17. ScriptCollection/Resources/Fonts/LICENSE.txt +0 -0
  18. ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html +0 -0
  19. ScriptCollection/SCLog.py +115 -115
  20. ScriptCollection/ScriptCollectionCore.py +4372 -4292
  21. ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py +8 -2
  22. ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py +716 -709
  23. ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py +235 -235
  24. ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py +258 -258
  25. ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py +524 -524
  26. ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py +157 -155
  27. ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +691 -672
  28. ScriptCollection/TFCPS/TFCPS_CreateRelease.py +98 -98
  29. ScriptCollection/TFCPS/TFCPS_Generic.py +44 -44
  30. ScriptCollection/TFCPS/TFCPS_MergeToMain.py +132 -131
  31. ScriptCollection/TFCPS/TFCPS_MergeToStable.py +358 -358
  32. ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py +48 -48
  33. ScriptCollection/TFCPS/TFCPS_Tools_General.py +38 -8
  34. {scriptcollection-4.3.63.dist-info → scriptcollection-4.4.0.dist-info}/METADATA +1 -1
  35. {scriptcollection-4.3.63.dist-info → scriptcollection-4.4.0.dist-info}/RECORD +27 -27
  36. {scriptcollection-4.3.63.dist-info → scriptcollection-4.4.0.dist-info}/WHEEL +0 -0
  37. {scriptcollection-4.3.63.dist-info → scriptcollection-4.4.0.dist-info}/entry_points.txt +0 -0
  38. {scriptcollection-4.3.63.dist-info → scriptcollection-4.4.0.dist-info}/top_level.txt +0 -0
@@ -1,155 +1,157 @@
1
- import os
2
- import re
3
- from ..GeneralUtilities import GeneralUtilities
4
- from ..ScriptCollectionCore import ScriptCollectionCore
5
- from ..SCLog import LogLevel
6
- from .TFCPS_Tools_General import TFCPS_Tools_General
7
-
8
-
9
- class TFCPS_CodeUnit_BuildCodeUnit:
10
-
11
- codeunit_folder: str = None
12
- repository_folder: str = None
13
- sc: ScriptCollectionCore = ScriptCollectionCore()
14
- codeunit_name: str = None
15
- tFCPS_Tools: TFCPS_Tools_General = None
16
- target_environment_type: str = None
17
- additionalargumentsfile: str = None
18
- use_cache: bool = None
19
- is_pre_merge: bool = None
20
-
21
- def __init__(self, codeunit_folder: str, verbosity: LogLevel, target_environment_type: str, additionalargumentsfile: str, use_cache: bool,is_pre_merge:bool):
22
- self.sc = ScriptCollectionCore()
23
- self.sc.log.loglevel = verbosity
24
- self.tFCPS_Tools = TFCPS_Tools_General(self.sc)
25
- self.tFCPS_Tools.assert_is_codeunit_folder(codeunit_folder)
26
- self.codeunit_folder = codeunit_folder
27
- self.codeunit_name = os.path.basename(self.codeunit_folder)
28
- self.repository_folder =os.path.dirname(codeunit_folder)
29
- self.sc.assert_is_git_repository(self.repository_folder)
30
- self.target_environment_type = target_environment_type
31
- self.additionalargumentsfile = additionalargumentsfile
32
- self.use_cache = use_cache
33
- self.is_pre_merge=is_pre_merge
34
-
35
- @GeneralUtilities.check_arguments
36
- def build_codeunit(self) -> None:
37
- codeunit_file: str = str(os.path.join(self.codeunit_folder, f"{self.codeunit_name}.codeunit.xml"))
38
-
39
- if not self.tFCPS_Tools.codeunit_is_enabled(codeunit_file):
40
- self.sc.log.log(f"Codeunit {self.codeunit_name} is disabled.", LogLevel.Warning)
41
- return
42
-
43
- self.sc.log.log(f"Build codeunit {self.codeunit_name}...")
44
-
45
- GeneralUtilities.ensure_folder_exists_and_is_empty(self.codeunit_folder+"/Other/Artifacts")
46
-
47
- arguments: str = f"--targetenvironmenttype {self.target_environment_type} --verbosity {int(self.sc.log.loglevel)}"
48
- if self.additionalargumentsfile is not None:
49
- arguments=arguments+f" --additionalargumentsfile {self.additionalargumentsfile}"
50
- if not self.use_cache:
51
- arguments = f"{arguments} --nocache"
52
-
53
- if self.is_pre_merge:
54
- arguments = f"{arguments} --ispremerge"
55
-
56
- self.sc.log.log("Do common tasks...")
57
- self.sc.run_program(GeneralUtilities.get_python_executable(), f"CommonTasks.py {arguments}", os.path.join(self.codeunit_folder, "Other"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
58
- self.verify_artifact_exists(self.codeunit_folder, dict[str, bool]({"License": True}))
59
-
60
- self.sc.log.log("Build...")
61
- self.sc.run_program(GeneralUtilities.get_python_executable(), f"Build.py {arguments}", os.path.join(self.codeunit_folder, "Other", "Build"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
62
- artifacts = {"BuildResult_.+": True, "BOM": False, "SourceCode": self.tFCPS_Tools.codeunit_has_testable_sourcecode(codeunit_file)}
63
- self.verify_artifact_exists(self.codeunit_folder, dict[str, bool](artifacts))
64
-
65
- if self.tFCPS_Tools.codeunit_has_testable_sourcecode(codeunit_file):
66
- self.sc.log.log("Run testcases...")
67
- self.sc.run_program(GeneralUtilities.get_python_executable(), f"RunTestcases.py {arguments}", os.path.join(self.codeunit_folder, "Other", "QualityCheck"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
68
- self.verify_artifact_exists(self.codeunit_folder, dict[str, bool]({"TestCoverage": True, "TestCoverageReport": False}))
69
-
70
- self.sc.log.log("Check for linting-issues...")
71
- linting_result = self.sc.run_program(GeneralUtilities.get_python_executable(), f"Linting.py {arguments}", os.path.join(self.codeunit_folder, "Other", "QualityCheck"), print_live_output=self.sc.log.loglevel==LogLevel.Quiet, throw_exception_if_exitcode_is_not_zero=False)
72
- if linting_result[0] != 0:
73
- self.sc.log.log("Linting-issues were found.", LogLevel.Warning)
74
- for line in GeneralUtilities.string_to_lines(linting_result[1]):
75
- self.sc.log.log(line, LogLevel.Warning)
76
- for line in GeneralUtilities.string_to_lines(linting_result[2]):
77
- self.sc.log.log(line, LogLevel.Warning)
78
-
79
- self.sc.log.log("Generate reference...")
80
- try:
81
- self.sc.run_program(GeneralUtilities.get_python_executable(), "GenerateReference.py", os.path.join(self.codeunit_folder, "Other", "Reference"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
82
- except Exception as e:
83
- self.sc.log.log_exception(f"Generating reference failed with the following error",e, LogLevel.Warning)
84
- self.verify_artifact_exists(self.codeunit_folder, dict[str, bool]({"Reference": True}))
85
-
86
- if os.path.isfile(os.path.join(self.codeunit_folder, "Other", "OnBuildingFinished.py")):
87
- self.sc.log.log('Finalize building codeunits...')
88
- self.sc.run_program(GeneralUtilities.get_python_executable(), f"OnBuildingFinished.py {arguments}", os.path.join(self.codeunit_folder, "Other"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
89
-
90
- codeunit_version = self.tFCPS_Tools.get_version_of_codeunit(codeunit_file)
91
-
92
- # Generate diff-report
93
- self.tFCPS_Tools.generate_diff_report(self.repository_folder, self.codeunit_name, codeunit_version)
94
-
95
- artifacts_folder = os.path.join(self.codeunit_folder, "Other", "Artifacts")
96
- artifactsinformation_file = os.path.join(artifacts_folder, f"{self.codeunit_name}.artifactsinformation.xml")
97
- GeneralUtilities.ensure_file_exists(artifactsinformation_file)
98
- artifacts_list = []
99
- for artifact_folder in GeneralUtilities.get_direct_folders_of_folder(artifacts_folder):
100
- artifact_name = os.path.basename(artifact_folder)
101
- artifacts_list.append(f" <cps:artifact>{artifact_name}<cps:artifact>")
102
- artifacts = '\n'.join(artifacts_list)
103
- moment = GeneralUtilities.datetime_to_string(GeneralUtilities.get_now())
104
- commit_id = self.sc.git_get_commit_id(self.repository_folder) # the actual commit-id (not the branch-name) which was checked-out while building this codeunit
105
- # TODO implement usage of reference_latest_version_of_xsd_when_generating_xml
106
- GeneralUtilities.write_text_to_file(artifactsinformation_file, f"""<?xml version="1.0" encoding="UTF-8" ?>
107
- <cps:artifactsinformation xmlns:cps="https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure" artifactsinformationspecificationversion="1.0.0"
108
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/raw/main/Conventions/RepositoryStructure/CommonProjectStructure/artifactsinformation.xsd">
109
- <cps:name>{self.codeunit_name}</cps:name>
110
- <cps:version>{codeunit_version}</cps:version>
111
- <cps:timestamp>{moment}</cps:timestamp>
112
- <cps:targetenvironmenttype>{self.target_environment_type}</cps:targetenvironmenttype>
113
- <cps:commitid>{commit_id}</cps:commitid>
114
- <cps:artifacts>
115
- {artifacts}
116
- </cps:artifacts>
117
- </cps:artifactsinformation>""")
118
- # TODO validate artifactsinformation_file against xsd
119
- if self.sc.log.loglevel == LogLevel.Debug:
120
- artifacts_folder_size_bytes = sum(os.path.getsize(os.path.join(dirpath, f))
121
- for dirpath, _, filenames in os.walk(artifacts_folder)
122
- for f in filenames)
123
- size_value: float = float(artifacts_folder_size_bytes)
124
- size_unit: str = "B"
125
- for candidate_unit in ("KB", "MB", "GB", "TB"):
126
- if size_value < 1024:
127
- break
128
- size_value /= 1024
129
- size_unit = candidate_unit
130
- self.sc.log.log(f"Size of artifacts-folder of codeunit {self.codeunit_name}: {size_value:.2f} {size_unit}", LogLevel.Debug)
131
- self.sc.log.log(f"Finished building codeunit {self.codeunit_name} without errors.")
132
-
133
-
134
- @GeneralUtilities.check_arguments
135
- def verify_artifact_exists(self, codeunit_folder: str, artifact_name_regexes: dict[str, bool]) -> None:
136
- codeunit_name: str = os.path.basename(codeunit_folder)
137
- artifacts_folder = os.path.join(codeunit_folder, "Other/Artifacts")
138
- existing_artifacts = [os.path.basename(x) for x in GeneralUtilities.get_direct_folders_of_folder(artifacts_folder)]
139
- for artifact_name_regex, required in artifact_name_regexes.items():
140
- artifact_exists = False
141
- for existing_artifact in existing_artifacts:
142
- pattern = re.compile(artifact_name_regex)
143
- if pattern.match(existing_artifact):
144
- artifact_exists = True
145
- if not artifact_exists:
146
- message = f"Codeunit {codeunit_name} does not contain an artifact which matches the name '{artifact_name_regex}'."
147
- if required:
148
- raise ValueError(message)
149
- else:
150
- self.sc.log.log(message, LogLevel.Warning)
151
-
152
- @GeneralUtilities.check_arguments
153
- def update_dependencies(self) -> None:
154
- self.sc.log.log("Update dependencies for codeunit...")
155
- self.sc.run_program(GeneralUtilities.get_python_executable(), "UpdateDependencies.py", os.path.join(self.codeunit_folder, "Other"),print_live_output=True)
1
+ import os
2
+ import re
3
+ from ..GeneralUtilities import GeneralUtilities
4
+ from ..ScriptCollectionCore import ScriptCollectionCore
5
+ from ..SCLog import LogLevel
6
+ from .TFCPS_Tools_General import TFCPS_Tools_General
7
+
8
+
9
+ class TFCPS_CodeUnit_BuildCodeUnit:
10
+
11
+ codeunit_folder: str = None
12
+ repository_folder: str = None
13
+ sc: ScriptCollectionCore = None
14
+ codeunit_name: str = None
15
+ tFCPS_Tools: TFCPS_Tools_General = None
16
+ target_environment_type: str = None
17
+ additionalargumentsfile: str = None
18
+ use_cache: bool = None
19
+ is_pre_merge: bool = None
20
+ fast_lane: bool = None
21
+
22
+ def __init__(self, codeunit_folder: str, verbosity: LogLevel, target_environment_type: str, additionalargumentsfile: str, use_cache: bool,is_pre_merge:bool,fast_lane:bool=False):
23
+ self.sc = ScriptCollectionCore()
24
+ self.sc.log.loglevel = verbosity
25
+ self.tFCPS_Tools = TFCPS_Tools_General(self.sc)
26
+ self.tFCPS_Tools.assert_is_codeunit_folder(codeunit_folder)
27
+ self.codeunit_folder = codeunit_folder
28
+ self.codeunit_name = os.path.basename(self.codeunit_folder)
29
+ self.repository_folder =os.path.dirname(codeunit_folder)
30
+ self.sc.assert_is_git_repository(self.repository_folder)
31
+ self.target_environment_type = target_environment_type
32
+ self.additionalargumentsfile = additionalargumentsfile
33
+ self.use_cache = use_cache
34
+ self.is_pre_merge=is_pre_merge
35
+ self.fast_lane=fast_lane
36
+
37
+ @GeneralUtilities.check_arguments
38
+ def build_codeunit(self) -> None:
39
+ codeunit_file: str = str(os.path.join(self.codeunit_folder, f"{self.codeunit_name}.codeunit.xml"))
40
+
41
+ if not self.tFCPS_Tools.codeunit_is_enabled(codeunit_file):
42
+ self.sc.log.log(f"Codeunit {self.codeunit_name} is disabled.", LogLevel.Warning)
43
+ return
44
+
45
+ self.sc.log.log(f"Build codeunit {self.codeunit_name}...")
46
+
47
+ GeneralUtilities.ensure_folder_exists_and_is_empty(self.codeunit_folder+"/Other/Artifacts")
48
+
49
+ arguments: str = f"--targetenvironmenttype {self.target_environment_type} --verbosity {int(self.sc.log.loglevel)}"
50
+ if self.additionalargumentsfile is not None:
51
+ arguments=arguments+f" --additionalargumentsfile {self.additionalargumentsfile}"
52
+ if not self.use_cache:
53
+ arguments = f"{arguments} --nocache"
54
+
55
+ if self.is_pre_merge:
56
+ arguments = f"{arguments} --ispremerge"
57
+
58
+ self.sc.log.log("Do common tasks...")
59
+ self.sc.run_program(GeneralUtilities.get_python_executable(), f"CommonTasks.py {arguments}", os.path.join(self.codeunit_folder, "Other"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
60
+ self.verify_artifact_exists(self.codeunit_folder, dict[str, bool]({"License": True}))
61
+
62
+ self.sc.log.log("Build...")
63
+ self.sc.run_program(GeneralUtilities.get_python_executable(), f"Build.py {arguments}", os.path.join(self.codeunit_folder, "Other", "Build"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
64
+ artifacts = {"BuildResult_.+": True, "BOM": False, "SourceCode": self.tFCPS_Tools.codeunit_has_testable_sourcecode(codeunit_file)}
65
+ self.verify_artifact_exists(self.codeunit_folder, dict[str, bool](artifacts))
66
+
67
+ if self.tFCPS_Tools.codeunit_has_testable_sourcecode(codeunit_file) and not self.fast_lane:
68
+ self.sc.log.log("Run testcases...")
69
+ self.sc.run_program(GeneralUtilities.get_python_executable(), f"RunTestcases.py {arguments}", os.path.join(self.codeunit_folder, "Other", "QualityCheck"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
70
+ self.verify_artifact_exists(self.codeunit_folder, dict[str, bool]({"TestCoverage": True, "TestCoverageReport": False}))
71
+
72
+ self.sc.log.log("Check for linting-issues...")
73
+ linting_result = self.sc.run_program(GeneralUtilities.get_python_executable(), f"Linting.py {arguments}", os.path.join(self.codeunit_folder, "Other", "QualityCheck"), print_live_output=self.sc.log.loglevel==LogLevel.Quiet, throw_exception_if_exitcode_is_not_zero=False)
74
+ if linting_result[0] != 0:
75
+ self.sc.log.log("Linting-issues were found.", LogLevel.Warning)
76
+ for line in GeneralUtilities.string_to_lines(linting_result[1]):
77
+ self.sc.log.log(line, LogLevel.Warning)
78
+ for line in GeneralUtilities.string_to_lines(linting_result[2]):
79
+ self.sc.log.log(line, LogLevel.Warning)
80
+
81
+ self.sc.log.log("Generate reference...")
82
+ try:
83
+ self.sc.run_program(GeneralUtilities.get_python_executable(), "GenerateReference.py", os.path.join(self.codeunit_folder, "Other", "Reference"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
84
+ except Exception as e:
85
+ self.sc.log.log_exception(f"Generating reference failed with the following error",e, LogLevel.Warning)
86
+ self.verify_artifact_exists(self.codeunit_folder, dict[str, bool]({"Reference": True}))
87
+
88
+ if os.path.isfile(os.path.join(self.codeunit_folder, "Other", "OnBuildingFinished.py")):
89
+ self.sc.log.log('Finalize building codeunits...')
90
+ self.sc.run_program(GeneralUtilities.get_python_executable(), f"OnBuildingFinished.py {arguments}", os.path.join(self.codeunit_folder, "Other"), print_live_output=self.sc.log.loglevel==LogLevel.Debug)
91
+
92
+ codeunit_version = self.tFCPS_Tools.get_version_of_codeunit(codeunit_file)
93
+
94
+ # Generate diff-report
95
+ self.tFCPS_Tools.generate_diff_report(self.repository_folder, self.codeunit_name, codeunit_version)
96
+
97
+ artifacts_folder = os.path.join(self.codeunit_folder, "Other", "Artifacts")
98
+ artifactsinformation_file = os.path.join(artifacts_folder, f"{self.codeunit_name}.artifactsinformation.xml")
99
+ GeneralUtilities.ensure_file_exists(artifactsinformation_file)
100
+ artifacts_list = []
101
+ for artifact_folder in GeneralUtilities.get_direct_folders_of_folder(artifacts_folder):
102
+ artifact_name = os.path.basename(artifact_folder)
103
+ artifacts_list.append(f" <cps:artifact>{artifact_name}<cps:artifact>")
104
+ artifacts = '\n'.join(artifacts_list)
105
+ moment = GeneralUtilities.datetime_to_string(GeneralUtilities.get_now())
106
+ commit_id = self.sc.git_get_commit_id(self.repository_folder) # the actual commit-id (not the branch-name) which was checked-out while building this codeunit
107
+ # TODO implement usage of reference_latest_version_of_xsd_when_generating_xml
108
+ GeneralUtilities.write_text_to_file(artifactsinformation_file, f"""<?xml version="1.0" encoding="UTF-8" ?>
109
+ <cps:artifactsinformation xmlns:cps="https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure" artifactsinformationspecificationversion="1.0.0"
110
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/raw/main/Conventions/RepositoryStructure/CommonProjectStructure/artifactsinformation.xsd">
111
+ <cps:name>{self.codeunit_name}</cps:name>
112
+ <cps:version>{codeunit_version}</cps:version>
113
+ <cps:timestamp>{moment}</cps:timestamp>
114
+ <cps:targetenvironmenttype>{self.target_environment_type}</cps:targetenvironmenttype>
115
+ <cps:commitid>{commit_id}</cps:commitid>
116
+ <cps:artifacts>
117
+ {artifacts}
118
+ </cps:artifacts>
119
+ </cps:artifactsinformation>""")
120
+ # TODO validate artifactsinformation_file against xsd
121
+ if self.sc.log.loglevel == LogLevel.Debug:
122
+ artifacts_folder_size_bytes = sum(os.path.getsize(os.path.join(dirpath, f))
123
+ for dirpath, _, filenames in os.walk(artifacts_folder)
124
+ for f in filenames)
125
+ size_value: float = float(artifacts_folder_size_bytes)
126
+ size_unit: str = "B"
127
+ for candidate_unit in ("KB", "MB", "GB", "TB"):
128
+ if size_value < 1024:
129
+ break
130
+ size_value /= 1024
131
+ size_unit = candidate_unit
132
+ self.sc.log.log(f"Size of artifacts-folder of codeunit {self.codeunit_name}: {size_value:.2f} {size_unit}", LogLevel.Debug)
133
+ self.sc.log.log(f"Finished building codeunit {self.codeunit_name} without errors.")
134
+
135
+
136
+ @GeneralUtilities.check_arguments
137
+ def verify_artifact_exists(self, codeunit_folder: str, artifact_name_regexes: dict[str, bool]) -> None:
138
+ codeunit_name: str = os.path.basename(codeunit_folder)
139
+ artifacts_folder = os.path.join(codeunit_folder, "Other/Artifacts")
140
+ existing_artifacts = [os.path.basename(x) for x in GeneralUtilities.get_direct_folders_of_folder(artifacts_folder)]
141
+ for artifact_name_regex, required in artifact_name_regexes.items():
142
+ artifact_exists = False
143
+ for existing_artifact in existing_artifacts:
144
+ pattern = re.compile(artifact_name_regex)
145
+ if pattern.match(existing_artifact):
146
+ artifact_exists = True
147
+ if not artifact_exists:
148
+ message = f"Codeunit {codeunit_name} does not contain an artifact which matches the name '{artifact_name_regex}'."
149
+ if required:
150
+ raise ValueError(message)
151
+ else:
152
+ self.sc.log.log(message, LogLevel.Warning)
153
+
154
+ @GeneralUtilities.check_arguments
155
+ def update_dependencies(self) -> None:
156
+ self.sc.log.log("Update dependencies for codeunit...")
157
+ self.sc.run_program(GeneralUtilities.get_python_executable(), "UpdateDependencies.py", os.path.join(self.codeunit_folder, "Other"),print_live_output=True)