ScriptCollection 4.4.59__py3-none-any.whl → 4.4.61__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/ScriptCollectionCore.py +1 -1
- ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py +4 -4
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py +3 -3
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +2 -2
- ScriptCollection/TFCPS/TFCPS_Tools_General.py +65 -37
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.61.dist-info}/METADATA +172 -172
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.61.dist-info}/RECORD +10 -10
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.61.dist-info}/WHEEL +0 -0
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.61.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.61.dist-info}/top_level.txt +0 -0
|
@@ -12,7 +12,7 @@ from lxml import etree
|
|
|
12
12
|
from ..GeneralUtilities import GeneralUtilities, VersionEcholon
|
|
13
13
|
from ..ScriptCollectionCore import ScriptCollectionCore
|
|
14
14
|
from ..SCLog import LogLevel
|
|
15
|
-
from .TFCPS_Tools_General import TFCPS_Tools_General,
|
|
15
|
+
from .TFCPS_Tools_General import TFCPS_Tools_General, CommonProjectStructureVersion
|
|
16
16
|
from .TFCPS_RemoteBuild import TFCPS_RemoteBuild, RunnerOperatingSystem
|
|
17
17
|
|
|
18
18
|
|
|
@@ -30,7 +30,7 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
|
|
|
30
30
|
_protected_sc:ScriptCollectionCore = None
|
|
31
31
|
__is_pre_merge:bool=False
|
|
32
32
|
__validate_developers_of_repository:bool=True#TODO must be settable to false
|
|
33
|
-
codeunit_namespace:str=
|
|
33
|
+
codeunit_namespace:str= TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
|
|
34
34
|
|
|
35
35
|
def __init__(self,current_file:str,verbosity:LogLevel,target_envionment_type:str,use_cache:bool,is_pre_merge:bool):
|
|
36
36
|
self.__verbosity=verbosity
|
|
@@ -401,7 +401,7 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
|
|
|
401
401
|
product_information_file = os.path.join(self.get_repository_folder(), ".ScriptCollection", "ProductInformation.xml")
|
|
402
402
|
GeneralUtilities.assert_file_exists(product_information_file)
|
|
403
403
|
root: etree._ElementTree = etree.parse(product_information_file)
|
|
404
|
-
return str(root.xpath(f'/cps:productinformation/cps:{property_name}/text()', namespaces={'cps':
|
|
404
|
+
return str(root.xpath(f'/cps:productinformation/cps:{property_name}/text()', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0])
|
|
405
405
|
|
|
406
406
|
@GeneralUtilities.check_arguments
|
|
407
407
|
def get_current_folder(self)->str:
|
|
@@ -562,7 +562,7 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
|
|
|
562
562
|
@GeneralUtilities.check_arguments
|
|
563
563
|
def get_testcoverage_threshold_from_codeunit_file(self):
|
|
564
564
|
root: etree._ElementTree = etree.parse(self.get_codeunit_file())
|
|
565
|
-
return float(str(root.xpath('//cps:properties/cps:testsettings/@minimalcodecoverageinpercent', namespaces={'cps':
|
|
565
|
+
return float(str(root.xpath('//cps:properties/cps:testsettings/@minimalcodecoverageinpercent', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0]))
|
|
566
566
|
|
|
567
567
|
|
|
568
568
|
@GeneralUtilities.check_arguments
|
|
@@ -3,7 +3,7 @@ import re
|
|
|
3
3
|
from ..GeneralUtilities import GeneralUtilities
|
|
4
4
|
from ..ScriptCollectionCore import ScriptCollectionCore
|
|
5
5
|
from ..SCLog import LogLevel
|
|
6
|
-
from .TFCPS_Tools_General import TFCPS_Tools_General,
|
|
6
|
+
from .TFCPS_Tools_General import TFCPS_Tools_General, CommonProjectStructureVersion
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class TFCPS_CodeUnit_BuildCodeUnit:
|
|
@@ -106,8 +106,8 @@ class TFCPS_CodeUnit_BuildCodeUnit:
|
|
|
106
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
107
|
# TODO implement usage of reference_latest_version_of_xsd_when_generating_xml
|
|
108
108
|
GeneralUtilities.write_text_to_file(artifactsinformation_file, f"""<?xml version="1.0" encoding="UTF-8" ?>
|
|
109
|
-
<cps:artifactsinformation xmlns:cps="{
|
|
110
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="{
|
|
109
|
+
<cps:artifactsinformation xmlns:cps="{TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)}" artifactsinformationspecificationversion="1.0.0"
|
|
110
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="{TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)} {TFCPS_Tools_General.get_common_project_structure_xsd_base_url(CommonProjectStructureVersion)}/artifactsinformation.xsd">
|
|
111
111
|
<cps:name>{self.codeunit_name}</cps:name>
|
|
112
112
|
<cps:version>{codeunit_version}</cps:version>
|
|
113
113
|
<cps:timestamp>{moment}</cps:timestamp>
|
|
@@ -11,7 +11,7 @@ from .TFCPS_BuildCodeUnitsHook import TFCPS_BuildCodeUnitsHook
|
|
|
11
11
|
from .TFCPS_CodeUnit_BuildCodeUnit import TFCPS_CodeUnit_BuildCodeUnit
|
|
12
12
|
from .TFCPS_CodeSpellCheck import TFCPS_CodeSpellCheck
|
|
13
13
|
from .TFCPS_OCIImageSecretScan import TFCPS_OCIImageSecretScan
|
|
14
|
-
from .TFCPS_Tools_General import TFCPS_Tools_General,
|
|
14
|
+
from .TFCPS_Tools_General import TFCPS_Tools_General, CommonProjectStructureVersion
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class TFCPS_UpdateDependenciesHook(TFCPS_BuildCodeUnitsHook):
|
|
@@ -158,7 +158,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
158
158
|
self.__run_custom_pre_codeunit_build_script()
|
|
159
159
|
|
|
160
160
|
try:
|
|
161
|
-
xmlschema.validate(product_information_file, f"{
|
|
161
|
+
xmlschema.validate(product_information_file, f"{TFCPS_Tools_General.get_common_project_structure_xsd_base_url(CommonProjectStructureVersion)}/productinformation.xsd")
|
|
162
162
|
except Exception as exception:
|
|
163
163
|
self.sc.log.log_exception(f"'{product_information_file}' could not be validated against the XSD:", exception, LogLevel.Warning)
|
|
164
164
|
|
|
@@ -27,10 +27,10 @@ from .PlantUMLRenderer import PlantUMLRenderer
|
|
|
27
27
|
|
|
28
28
|
# Central definition of the common-project-structure-version. This is the single place which has to be updated to bump the
|
|
29
29
|
# whole repository (and all common-project-structure-files which are generated or validated by ScriptCollection) to a new
|
|
30
|
-
# common-project-structure-version. Both the namespace and the xsd-base-url are derived from this version
|
|
30
|
+
# common-project-structure-version. Both the namespace and the xsd-base-url are derived from this version (see
|
|
31
|
+
# TFCPS_Tools_General.get_common_project_structure_namespace and TFCPS_Tools_General.get_common_project_structure_xsd_base_url).
|
|
31
32
|
CommonProjectStructureVersion: str = "3.0.4"
|
|
32
|
-
|
|
33
|
-
CommonProjectStructureXSDBaseURL: str = f"https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/raw/v{CommonProjectStructureVersion}/Conventions/RepositoryStructure/CommonProjectStructure"
|
|
33
|
+
SupportedCommonProjectStructureVersions: list[str] = ["3.0.4"]
|
|
34
34
|
|
|
35
35
|
class TFCPS_Tools_General:
|
|
36
36
|
|
|
@@ -44,6 +44,16 @@ class TFCPS_Tools_General:
|
|
|
44
44
|
# own version in '<repo>/Other/Resources/Dependencies/JRE/Version.txt'. The file contains a build like "21.0.6+7".
|
|
45
45
|
__jre_version_resource_relative_path:str="Dependencies/JRE/Version.txt"
|
|
46
46
|
|
|
47
|
+
@staticmethod
|
|
48
|
+
@GeneralUtilities.check_arguments
|
|
49
|
+
def get_common_project_structure_namespace(common_project_structure_version: str) -> str:
|
|
50
|
+
return f"https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/v{common_project_structure_version}/Conventions/RepositoryStructure/CommonProjectStructure"
|
|
51
|
+
|
|
52
|
+
@staticmethod
|
|
53
|
+
@GeneralUtilities.check_arguments
|
|
54
|
+
def get_common_project_structure_xsd_base_url(common_project_structure_version: str) -> str:
|
|
55
|
+
return f"https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/raw/v{common_project_structure_version}/Conventions/RepositoryStructure/CommonProjectStructure"
|
|
56
|
+
|
|
47
57
|
def __init__(self,sc:ScriptCollectionCore):
|
|
48
58
|
self.__sc=sc
|
|
49
59
|
self.oci_image_manager=OCIImageManager(self.__sc)
|
|
@@ -52,7 +62,7 @@ class TFCPS_Tools_General:
|
|
|
52
62
|
@GeneralUtilities.check_arguments
|
|
53
63
|
def codeunit_is_enabled(self, codeunit_file: str) -> bool:
|
|
54
64
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
55
|
-
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:codeunit/@enabled', namespaces={'cps':
|
|
65
|
+
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:codeunit/@enabled', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0]))
|
|
56
66
|
|
|
57
67
|
@GeneralUtilities.check_arguments
|
|
58
68
|
def ensure_cyclonedxcli_is_available(self,enforce_update:bool) -> str:
|
|
@@ -185,12 +195,7 @@ class TFCPS_Tools_General:
|
|
|
185
195
|
version_to_download = pinned_version
|
|
186
196
|
self.__sc.log.log(f"Using pinned version '{version_to_download}' for {local_resource_name}.", LogLevel.Debug)
|
|
187
197
|
else:
|
|
188
|
-
|
|
189
|
-
self.__sc.log.log(f"Download \"{url}\"...", LogLevel.Debug)
|
|
190
|
-
time.sleep(2)
|
|
191
|
-
response = requests.get(url, headers=headers, allow_redirects=True, timeout=(10, 10))
|
|
192
|
-
response_json=response.json()
|
|
193
|
-
version_to_download = response_json["tag_name"]
|
|
198
|
+
version_to_download = self.get_tag_of_latest_github_release(githubuser, githubprojectname)
|
|
194
199
|
filename_on_github = get_filename_on_github(version_to_download)
|
|
195
200
|
link = f"https://github.com/{githubuser}/{githubprojectname}/releases/download/{version_to_download}/{filename_on_github}"
|
|
196
201
|
time.sleep(2)
|
|
@@ -219,16 +224,33 @@ class TFCPS_Tools_General:
|
|
|
219
224
|
GeneralUtilities.assert_file_exists(file)
|
|
220
225
|
return file
|
|
221
226
|
|
|
227
|
+
@GeneralUtilities.check_arguments
|
|
228
|
+
def get_tag_of_latest_github_release(self, githubuser: str, githubprojectname: str) -> str:
|
|
229
|
+
"""Returns the tag-name (for example "v1.2.3") of the latest release of the given GitHub-repository."""
|
|
230
|
+
headers = { 'User-Agent': 'Mozilla/5.0'}
|
|
231
|
+
self.__add_github_api_key_if_available(headers)
|
|
232
|
+
url = f"https://api.github.com/repos/{githubuser}/{githubprojectname}/releases/latest"
|
|
233
|
+
self.__sc.log.log(f"Download \"{url}\"...", LogLevel.Debug)
|
|
234
|
+
time.sleep(2)
|
|
235
|
+
response = requests.get(url, headers=headers, allow_redirects=True, timeout=(10, 10))
|
|
236
|
+
response.raise_for_status()
|
|
237
|
+
response_json=response.json()
|
|
238
|
+
return response_json["tag_name"]
|
|
239
|
+
|
|
222
240
|
def __add_github_api_key_if_available(self, headers: dict):
|
|
241
|
+
# Trailing newlines/whitespace in either the env var or the token-file
|
|
242
|
+
# would silently corrupt the Authorization header and make GitHub treat
|
|
243
|
+
# the request as anonymous (60/h rate limit), so strip in both paths.
|
|
223
244
|
token = os.getenv("GITHUB_TOKEN")
|
|
224
245
|
if token is not None:
|
|
225
|
-
|
|
226
|
-
|
|
246
|
+
token = token.strip()
|
|
247
|
+
if not token:
|
|
227
248
|
user_folder = str(Path.home())
|
|
228
249
|
github_token_file: str = str(os.path.join(user_folder, ".github", "token.txt"))
|
|
229
250
|
if os.path.isfile(github_token_file):
|
|
230
|
-
token = GeneralUtilities.read_text_from_file(github_token_file)
|
|
231
|
-
|
|
251
|
+
token = GeneralUtilities.read_text_from_file(github_token_file).strip()
|
|
252
|
+
if token:
|
|
253
|
+
headers["Authorization"] = f"Bearer {token}"
|
|
232
254
|
return headers
|
|
233
255
|
|
|
234
256
|
|
|
@@ -293,7 +315,7 @@ class TFCPS_Tools_General:
|
|
|
293
315
|
@GeneralUtilities.check_arguments
|
|
294
316
|
def get_dependent_code_units(self, codeunit_file: str) -> list[str]:
|
|
295
317
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
296
|
-
result = set(root.xpath('//cps:dependentcodeunit/text()', namespaces={'cps':
|
|
318
|
+
result = set(root.xpath('//cps:dependentcodeunit/text()', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)}))
|
|
297
319
|
result = sorted(result)
|
|
298
320
|
return result
|
|
299
321
|
|
|
@@ -400,7 +422,7 @@ class TFCPS_Tools_General:
|
|
|
400
422
|
versiononlyregex = f"^{versionregex}$"
|
|
401
423
|
if re.match(versiononlyregex, current_version) is None:
|
|
402
424
|
raise ValueError(f"Version '{current_version}' does not match version-regex '{versiononlyregex}'.")
|
|
403
|
-
namespace =
|
|
425
|
+
namespace = TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
|
|
404
426
|
#the namespace is registered as default-namespace, otherwise every tag of the file would be written with an invented prefix ("ns0:version") instead of the form the file uses.
|
|
405
427
|
ET.register_namespace("", namespace)
|
|
406
428
|
tree: ET.ElementTree = ET.parse(codeunit_file)
|
|
@@ -476,11 +498,11 @@ class TFCPS_Tools_General:
|
|
|
476
498
|
def get_version_of_codeunit(self,codeunit_file:str) -> None:
|
|
477
499
|
codeunit_file_content:str=GeneralUtilities.read_text_from_file(codeunit_file)
|
|
478
500
|
return self.get_version_of_codeunit_filecontent(codeunit_file_content)
|
|
479
|
-
|
|
501
|
+
|
|
480
502
|
@GeneralUtilities.check_arguments
|
|
481
503
|
def get_version_of_codeunit_filecontent(self,file_content:str) -> None:
|
|
482
504
|
root: etree._ElementTree = etree.fromstring(file_content.encode("utf-8"))
|
|
483
|
-
result = str(root.xpath('//cps:version/text()', namespaces={'cps':
|
|
505
|
+
result = str(root.xpath('//cps:version/text()', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0])
|
|
484
506
|
return result
|
|
485
507
|
|
|
486
508
|
@GeneralUtilities.check_arguments
|
|
@@ -493,14 +515,14 @@ class TFCPS_Tools_General:
|
|
|
493
515
|
@GeneralUtilities.check_arguments
|
|
494
516
|
def get_codeunit_description(self,codeunit_file:str) -> bool:
|
|
495
517
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
496
|
-
return str(root.xpath('//cps:properties/@description', namespaces={'cps':
|
|
518
|
+
return str(root.xpath('//cps:properties/@description', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0])
|
|
497
519
|
|
|
498
520
|
@GeneralUtilities.check_arguments
|
|
499
521
|
def get_product_name(self, repository_folder: str) -> str:
|
|
500
522
|
product_information_file = os.path.join(repository_folder, ".ScriptCollection", "ProductInformation.xml")
|
|
501
523
|
GeneralUtilities.assert_file_exists(product_information_file)
|
|
502
524
|
root: etree._ElementTree = etree.parse(product_information_file)
|
|
503
|
-
return str(root.xpath('/cps:productinformation/cps:producttitle/text()', namespaces={'cps':
|
|
525
|
+
return str(root.xpath('/cps:productinformation/cps:producttitle/text()', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0])
|
|
504
526
|
|
|
505
527
|
@GeneralUtilities.check_arguments
|
|
506
528
|
def get_required_environment_variable_names(self, repository: str) -> list[str]:
|
|
@@ -517,7 +539,7 @@ class TFCPS_Tools_General:
|
|
|
517
539
|
product_information_file = os.path.join(repository, ".ScriptCollection", "ProductInformation.xml")
|
|
518
540
|
GeneralUtilities.assert_file_exists(product_information_file)
|
|
519
541
|
root: etree._ElementTree = etree.parse(product_information_file)
|
|
520
|
-
namespaces = {'cps':
|
|
542
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)}
|
|
521
543
|
declaration_elements = root.xpath('/cps:productinformation/cps:requiredenvironmentvariables', namespaces=namespaces)
|
|
522
544
|
GeneralUtilities.assert_condition(1 == len(declaration_elements), f"'{product_information_file}' must contain exactly one 'requiredenvironmentvariables'-element but it contains {len(declaration_elements)}. Add '<cps:requiredenvironmentvariables></cps:requiredenvironmentvariables>' (empty if the build of this product does not need any environment-variable) to that file.")
|
|
523
545
|
result: list[str] = []
|
|
@@ -694,8 +716,8 @@ class TFCPS_Tools_General:
|
|
|
694
716
|
|
|
695
717
|
# TODO implement usage of self.reference_latest_version_of_xsd_when_generating_xml
|
|
696
718
|
GeneralUtilities.write_text_to_file(constants_metafile, f"""<?xml version="1.0" encoding="UTF-8" ?>
|
|
697
|
-
<cps:constant xmlns:cps="{
|
|
698
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="{
|
|
719
|
+
<cps:constant xmlns:cps="{TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)}" constantspecificationversion="1.1.0"
|
|
720
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="{TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)} {TFCPS_Tools_General.get_common_project_structure_xsd_base_url(CommonProjectStructureVersion)}/constant.xsd">
|
|
699
721
|
<cps:name>{constantname}</cps:name>
|
|
700
722
|
<cps:documentationsummary>{documentationsummary}</cps:documentationsummary>
|
|
701
723
|
<cps:path>{constants_valuefiler_reference}</cps:path>
|
|
@@ -720,7 +742,7 @@ class TFCPS_Tools_General:
|
|
|
720
742
|
self.assert_is_codeunit_folder(source_codeunit_folder)
|
|
721
743
|
root: etree._ElementTree = etree.parse(os.path.join(source_codeunit_folder, "Other", "Resources", "Constants", f"{constant_name}.constant.xml"))
|
|
722
744
|
results = root.xpath(f'//cps:{propertyname}/text()', namespaces={
|
|
723
|
-
'cps':
|
|
745
|
+
'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
|
|
724
746
|
})
|
|
725
747
|
length = len(results)
|
|
726
748
|
if (length == 0):
|
|
@@ -829,18 +851,18 @@ class TFCPS_Tools_General:
|
|
|
829
851
|
def codeunit_has_testable_sourcecode(self,codeunit_file:str) -> bool:
|
|
830
852
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
831
853
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
832
|
-
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithastestablesourcecode', namespaces={'cps':
|
|
854
|
+
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithastestablesourcecode', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0]))
|
|
833
855
|
|
|
834
856
|
@GeneralUtilities.check_arguments
|
|
835
857
|
def codeunit_has_updatable_dependencies(self,codeunit_file:str) -> bool:
|
|
836
858
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
837
859
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
838
|
-
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithasupdatabledependencies', namespaces={'cps':
|
|
860
|
+
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithasupdatabledependencies', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0]))
|
|
839
861
|
|
|
840
862
|
@GeneralUtilities.check_arguments
|
|
841
863
|
def get_codeunit_owner_emailaddress(self,codeunit_file:str) -> None:
|
|
842
864
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
843
|
-
namespaces = {'cps':
|
|
865
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion), 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
|
844
866
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
845
867
|
result = root.xpath('//cps:codeunit/cps:codeunitowneremailaddress/text()', namespaces=namespaces)[0]
|
|
846
868
|
return result
|
|
@@ -848,7 +870,7 @@ class TFCPS_Tools_General:
|
|
|
848
870
|
@GeneralUtilities.check_arguments
|
|
849
871
|
def get_codeunit_owner_name(self,codeunit_file:str) -> None:
|
|
850
872
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
851
|
-
namespaces = {'cps':
|
|
873
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion), 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
|
852
874
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
853
875
|
result = root.xpath('//cps:codeunit/cps:codeunitownername/text()', namespaces=namespaces)[0]
|
|
854
876
|
return result
|
|
@@ -1379,23 +1401,23 @@ class TFCPS_Tools_General:
|
|
|
1379
1401
|
@GeneralUtilities.check_arguments
|
|
1380
1402
|
def __ensure_grylibrary_is_available(self, use_cache:bool) -> None:
|
|
1381
1403
|
grylibrary_folder =os.path.join( self.__sc.get_global_cache_folder(),"Tools","GRYLibrary")
|
|
1382
|
-
|
|
1404
|
+
#the artifacts-archive of a GRYLibrary-release contains the folder "GRYLibrary" as root-folder
|
|
1405
|
+
grylibrary_dll_file = os.path.join(grylibrary_folder, "GRYLibrary", "BuildResult_DotNet_win-x64", "GRYLibrary.dll")
|
|
1383
1406
|
grylibrary_dll_file_exists = os.path.isfile(grylibrary_dll_file)
|
|
1384
1407
|
if not os.path.isfile(grylibrary_dll_file):
|
|
1385
1408
|
self.__sc.log.log("Download GRYLibrary to global cache...",LogLevel.Information)
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
grylibrary_latest_version = self.get_version_of_codeunit_filecontent(url_result.read().decode("utf-8"))
|
|
1409
|
+
grylibrary_latest_tag = self.get_tag_of_latest_github_release("anionDevelopment", "GRYLibrary")
|
|
1410
|
+
GeneralUtilities.assert_condition(grylibrary_latest_tag.startswith("v"), f"The tag '{grylibrary_latest_tag}' of the latest GRYLibrary-release does not have the expected format 'v<version>'.")
|
|
1411
|
+
grylibrary_latest_version = grylibrary_latest_tag[1:]
|
|
1390
1412
|
if grylibrary_dll_file_exists:
|
|
1391
|
-
grylibrary_existing_codeunit_file = os.path.join(grylibrary_folder, "SourceCode", "GRYLibrary.codeunit.xml")
|
|
1413
|
+
grylibrary_existing_codeunit_file = os.path.join(grylibrary_folder, "GRYLibrary", "SourceCode", "GRYLibrary.codeunit.xml")
|
|
1392
1414
|
grylibrary_existing_codeunit_version = self.get_version_of_codeunit(grylibrary_existing_codeunit_file)
|
|
1393
1415
|
if grylibrary_existing_codeunit_version != grylibrary_latest_version:
|
|
1394
1416
|
GeneralUtilities.ensure_directory_does_not_exist(grylibrary_folder)
|
|
1395
1417
|
GeneralUtilities.ensure_directory_does_not_exist(grylibrary_folder)
|
|
1396
1418
|
GeneralUtilities.ensure_directory_exists(grylibrary_folder)
|
|
1397
|
-
archive_name = f"
|
|
1398
|
-
archive_download_link = f"https://github.com/anionDevelopment/GRYLibrary/releases/download/
|
|
1419
|
+
archive_name = f"GRYLibrary_Artifacts_v{grylibrary_latest_version}.zip"
|
|
1420
|
+
archive_download_link = f"https://github.com/anionDevelopment/GRYLibrary/releases/download/{grylibrary_latest_tag}/{archive_name}"
|
|
1399
1421
|
archive_file = os.path.join(grylibrary_folder, archive_name)
|
|
1400
1422
|
urllib.request.urlretrieve(archive_download_link, archive_file)
|
|
1401
1423
|
with zipfile.ZipFile(archive_file, 'r') as zip_ref:
|
|
@@ -2092,7 +2114,7 @@ class TFCPS_Tools_General:
|
|
|
2092
2114
|
@GeneralUtilities.check_arguments
|
|
2093
2115
|
def get_dependencies_which_are_ignored_from_updates(self, codeunit_folder: str) -> list[str]:
|
|
2094
2116
|
self.assert_is_codeunit_folder(codeunit_folder)
|
|
2095
|
-
namespaces = {'cps':
|
|
2117
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion), 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
|
2096
2118
|
codeunit_name = os.path.basename(codeunit_folder)
|
|
2097
2119
|
codeunit_file = os.path.join(codeunit_folder, f"{codeunit_name}.codeunit.xml")
|
|
2098
2120
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
@@ -2260,3 +2282,9 @@ class TFCPS_Tools_General:
|
|
|
2260
2282
|
languages_file = os.path.join(languages_folder, "Languages.txt")
|
|
2261
2283
|
GeneralUtilities.ensure_file_exists(languages_file)
|
|
2262
2284
|
GeneralUtilities.write_lines_to_file(languages_file, languages)
|
|
2285
|
+
|
|
2286
|
+
# Kept for compatibility with callers outside of ScriptCollection which use these values directly. Both are derived from
|
|
2287
|
+
# CommonProjectStructureVersion via TFCPS_Tools_General.get_common_project_structure_namespace and
|
|
2288
|
+
# TFCPS_Tools_General.get_common_project_structure_xsd_base_url, so the version still has to be updated only in one place.
|
|
2289
|
+
CommonProjectStructureNamespace: str = TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
|
|
2290
|
+
CommonProjectStructureXSDBaseURL: str = TFCPS_Tools_General.get_common_project_structure_xsd_base_url(CommonProjectStructureVersion)
|
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: scriptcollection
|
|
3
|
-
Version: 4.4.
|
|
4
|
-
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
|
-
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
|
-
License-Expression: GPL-3.0-only
|
|
7
|
-
Project-URL: Homepage, https://github.com/anionDevelopment/ScriptCollection
|
|
8
|
-
Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
|
|
9
|
-
Project-URL: Changelog, https://github.com/anionDevelopment/ScriptCollection/tree/main/Other/Resources/Changelog
|
|
10
|
-
Keywords: package,release,build,management
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
-
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
16
|
-
Classifier: Topic :: System :: Logging
|
|
17
|
-
Classifier: Topic :: System :: Monitoring
|
|
18
|
-
Classifier: Topic :: System :: Archiving :: Packaging
|
|
19
|
-
Classifier: Topic :: System :: Systems Administration
|
|
20
|
-
Classifier: Topic :: Terminals
|
|
21
|
-
Classifier: Topic :: Utilities
|
|
22
|
-
Requires-Python: >=3.11
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
Requires-Dist: build>=1.6.1
|
|
25
|
-
Requires-Dist: codespell>=2.4.3
|
|
26
|
-
Requires-Dist: CountryInformation>=1.0.12
|
|
27
|
-
Requires-Dist: coverage>=7.16.2
|
|
28
|
-
Requires-Dist: cyclonedx-bom>=7.1.0
|
|
29
|
-
Requires-Dist: defusedxml>=0.7.1
|
|
30
|
-
Requires-Dist: keyboard>=0.13.5
|
|
31
|
-
Requires-Dist: lcov-cobertura>=2.1.1
|
|
32
|
-
Requires-Dist: lxml>=6.0.1
|
|
33
|
-
Requires-Dist: ntplib>=0.4.0
|
|
34
|
-
Requires-Dist: Pillow>=11.3.0
|
|
35
|
-
Requires-Dist: psutil>=7.2.2
|
|
36
|
-
Requires-Dist: pycdlib>=1.22.0
|
|
37
|
-
Requires-Dist: Pygments>=2.21.0
|
|
38
|
-
Requires-Dist: pylint>=4.1.
|
|
39
|
-
Requires-Dist: pyOpenSSL>=25.3.0
|
|
40
|
-
Requires-Dist: PyPDF>=6.
|
|
41
|
-
Requires-Dist: pytest>=8.4.2
|
|
42
|
-
Requires-Dist: PyYAML>=6.0.3
|
|
43
|
-
Requires-Dist: qrcode>=8.2.0
|
|
44
|
-
Requires-Dist: send2trash>=1.8.3
|
|
45
|
-
Requires-Dist: twine>=6.2.0
|
|
46
|
-
Requires-Dist: xmlschema>=4.3.2
|
|
47
|
-
|
|
48
|
-
# ScriptCollection
|
|
49
|
-
|
|
50
|
-
## General
|
|
51
|
-
|
|
52
|
-
[](https://pypi.org/project/ScriptCollection/)
|
|
53
|
-

|
|
54
|
-

|
|
55
|
-
|
|
56
|
-
[](https://www.codefactor.io/repository/github/anionDevelopment/scriptcollection/overview/main)
|
|
57
|
-
[](https://pepy.tech/project/scriptcollection)
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
The ScriptCollection is the place for reusable scripts.
|
|
61
|
-
|
|
62
|
-
## Reference
|
|
63
|
-
|
|
64
|
-
The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
|
|
65
|
-
|
|
66
|
-
## Hints
|
|
67
|
-
|
|
68
|
-
Most of the scripts are written in [python](https://www.python.org) 3.
|
|
69
|
-
|
|
70
|
-
Caution: Before executing **any** script of this repository read the sourcecode of the script (and the sourcecode of all functions called by this function directly or transitively) carefully and verify that the script does exactly what you want to do and nothing else.
|
|
71
|
-
|
|
72
|
-
Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
|
|
73
|
-
|
|
74
|
-
When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
|
|
75
|
-
|
|
76
|
-
## Get ScriptCollection
|
|
77
|
-
|
|
78
|
-
### Installation via pip
|
|
79
|
-
|
|
80
|
-
`pip3 install ScriptCollection`
|
|
81
|
-
|
|
82
|
-
See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
|
|
83
|
-
|
|
84
|
-
### Download sourcecode using git
|
|
85
|
-
|
|
86
|
-
You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
|
|
87
|
-
|
|
88
|
-
`git clone https://github.com/anionDevelopment/ScriptCollection.git`
|
|
89
|
-
|
|
90
|
-
It may be easier to pip-install the ScriptCollection but technically pip is not required. Actually you need to git-clone (or download as zip-file from [GitHub](https://github.com/anionDevelopment/ScriptCollection)) the ScriptCollection to use the scripts in this repository which are not written in python.
|
|
91
|
-
|
|
92
|
-
## Troubleshooting
|
|
93
|
-
|
|
94
|
-
It is recommended to always use only the newest version of the ScriptCollection. If you have an older version: Update it (e. g. using `pip3 install ScriptCollection --upgrade` if you installed the ScriptCollection via pip). If you still have problems, then feel free to create an [issue](https://github.com/anionDevelopment/ScriptCollection/issues).
|
|
95
|
-
|
|
96
|
-
If you have installed the ScriptCollection as pip-package you can simply check the version by running `scshowversion` or using Python with the following commands:
|
|
97
|
-
|
|
98
|
-
```python
|
|
99
|
-
from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
|
|
100
|
-
ScriptCollectionCore.get_scriptcollection_version()
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Or you can simply run `pip3 freeze` to get information about (all) currently installed pip-packages.
|
|
104
|
-
|
|
105
|
-
## Development
|
|
106
|
-
|
|
107
|
-
### Branching-system
|
|
108
|
-
|
|
109
|
-
This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
|
|
110
|
-
|
|
111
|
-
### Repository-structure
|
|
112
|
-
|
|
113
|
-
This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md) as repository-structure.
|
|
114
|
-
|
|
115
|
-
### Install dependencies
|
|
116
|
-
|
|
117
|
-
ScriptCollection requires [Python](https://www.python.org) 3.11 or newer.
|
|
118
|
-
|
|
119
|
-
To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
|
|
120
|
-
|
|
121
|
-
- `python` (on some systems `python3`)
|
|
122
|
-
- `pip3`
|
|
123
|
-
|
|
124
|
-
The pip-packages which are required for developing on this project are defined in `ScriptCollection/requirements.txt`.
|
|
125
|
-
|
|
126
|
-
### IDE
|
|
127
|
-
|
|
128
|
-
The recommended IDE for developing ScriptCollection is Visual Studio Code.
|
|
129
|
-
The recommended addons for developing ScriptCollection with Visual Studio Code are:
|
|
130
|
-
|
|
131
|
-
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
132
|
-
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
|
|
133
|
-
- [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
|
|
134
|
-
- [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
|
|
135
|
-
|
|
136
|
-
### Build
|
|
137
|
-
|
|
138
|
-
To create and install a ScriptCollection locally simply do the following commands in the repository-root:
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
python ./ScriptCollection/Other/Build/Build.py
|
|
142
|
-
pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/BuildResult_Wheel/scriptcollection-x.x.x-py3-none-any.whl
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
(Note: `x.x.x` must be replaced by the appropriate version-number.)
|
|
146
|
-
|
|
147
|
-
The complete build-pipeline (build, testcases, linting, reference-generation, etc.) is run by `scbuildcodeunits` in the repository-root (or `task bb` if [Task](https://taskfile.dev) is installed). Afterwards `task dl` installs the built wheel locally.
|
|
148
|
-
|
|
149
|
-
### Coding style
|
|
150
|
-
|
|
151
|
-
In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
|
|
152
|
-
If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
|
|
153
|
-
|
|
154
|
-
If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
|
|
155
|
-
|
|
156
|
-
## Runtime dependencies
|
|
157
|
-
|
|
158
|
-
ScriptCollection requires [Python](https://www.python.org) 3.11 or newer.
|
|
159
|
-
|
|
160
|
-
The usual Python-dependencies will be installed automagically by `pip`.
|
|
161
|
-
|
|
162
|
-
For functions to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
|
|
163
|
-
|
|
164
|
-
- chmod
|
|
165
|
-
- chown
|
|
166
|
-
- ls
|
|
167
|
-
|
|
168
|
-
These tools must be available on the system where the functions should be executed. Meanwhile these tools are also available on Windows but may have a slightly limited functionality.
|
|
169
|
-
|
|
170
|
-
## License
|
|
171
|
-
|
|
172
|
-
See [License.txt](https://raw.githubusercontent.com/anionDevelopment/ScriptCollection/main/License.txt) for license-information.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scriptcollection
|
|
3
|
+
Version: 4.4.61
|
|
4
|
+
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
|
+
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://github.com/anionDevelopment/ScriptCollection
|
|
8
|
+
Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
|
|
9
|
+
Project-URL: Changelog, https://github.com/anionDevelopment/ScriptCollection/tree/main/Other/Resources/Changelog
|
|
10
|
+
Keywords: package,release,build,management
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
16
|
+
Classifier: Topic :: System :: Logging
|
|
17
|
+
Classifier: Topic :: System :: Monitoring
|
|
18
|
+
Classifier: Topic :: System :: Archiving :: Packaging
|
|
19
|
+
Classifier: Topic :: System :: Systems Administration
|
|
20
|
+
Classifier: Topic :: Terminals
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: build>=1.6.1
|
|
25
|
+
Requires-Dist: codespell>=2.4.3
|
|
26
|
+
Requires-Dist: CountryInformation>=1.0.12
|
|
27
|
+
Requires-Dist: coverage>=7.16.2
|
|
28
|
+
Requires-Dist: cyclonedx-bom>=7.1.0
|
|
29
|
+
Requires-Dist: defusedxml>=0.7.1
|
|
30
|
+
Requires-Dist: keyboard>=0.13.5
|
|
31
|
+
Requires-Dist: lcov-cobertura>=2.1.1
|
|
32
|
+
Requires-Dist: lxml>=6.0.1
|
|
33
|
+
Requires-Dist: ntplib>=0.4.0
|
|
34
|
+
Requires-Dist: Pillow>=11.3.0
|
|
35
|
+
Requires-Dist: psutil>=7.2.2
|
|
36
|
+
Requires-Dist: pycdlib>=1.22.0
|
|
37
|
+
Requires-Dist: Pygments>=2.21.0
|
|
38
|
+
Requires-Dist: pylint>=4.1.3
|
|
39
|
+
Requires-Dist: pyOpenSSL>=25.3.0
|
|
40
|
+
Requires-Dist: PyPDF>=6.21.1
|
|
41
|
+
Requires-Dist: pytest>=8.4.2
|
|
42
|
+
Requires-Dist: PyYAML>=6.0.3
|
|
43
|
+
Requires-Dist: qrcode>=8.2.0
|
|
44
|
+
Requires-Dist: send2trash>=1.8.3
|
|
45
|
+
Requires-Dist: twine>=6.2.0
|
|
46
|
+
Requires-Dist: xmlschema>=4.3.2
|
|
47
|
+
|
|
48
|
+
# ScriptCollection
|
|
49
|
+
|
|
50
|
+
## General
|
|
51
|
+
|
|
52
|
+
[](https://pypi.org/project/ScriptCollection/)
|
|
53
|
+

|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
[](https://www.codefactor.io/repository/github/anionDevelopment/scriptcollection/overview/main)
|
|
57
|
+
[](https://pepy.tech/project/scriptcollection)
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
The ScriptCollection is the place for reusable scripts.
|
|
61
|
+
|
|
62
|
+
## Reference
|
|
63
|
+
|
|
64
|
+
The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
|
|
65
|
+
|
|
66
|
+
## Hints
|
|
67
|
+
|
|
68
|
+
Most of the scripts are written in [python](https://www.python.org) 3.
|
|
69
|
+
|
|
70
|
+
Caution: Before executing **any** script of this repository read the sourcecode of the script (and the sourcecode of all functions called by this function directly or transitively) carefully and verify that the script does exactly what you want to do and nothing else.
|
|
71
|
+
|
|
72
|
+
Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
|
|
73
|
+
|
|
74
|
+
When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
|
|
75
|
+
|
|
76
|
+
## Get ScriptCollection
|
|
77
|
+
|
|
78
|
+
### Installation via pip
|
|
79
|
+
|
|
80
|
+
`pip3 install ScriptCollection`
|
|
81
|
+
|
|
82
|
+
See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
|
|
83
|
+
|
|
84
|
+
### Download sourcecode using git
|
|
85
|
+
|
|
86
|
+
You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
|
|
87
|
+
|
|
88
|
+
`git clone https://github.com/anionDevelopment/ScriptCollection.git`
|
|
89
|
+
|
|
90
|
+
It may be easier to pip-install the ScriptCollection but technically pip is not required. Actually you need to git-clone (or download as zip-file from [GitHub](https://github.com/anionDevelopment/ScriptCollection)) the ScriptCollection to use the scripts in this repository which are not written in python.
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
It is recommended to always use only the newest version of the ScriptCollection. If you have an older version: Update it (e. g. using `pip3 install ScriptCollection --upgrade` if you installed the ScriptCollection via pip). If you still have problems, then feel free to create an [issue](https://github.com/anionDevelopment/ScriptCollection/issues).
|
|
95
|
+
|
|
96
|
+
If you have installed the ScriptCollection as pip-package you can simply check the version by running `scshowversion` or using Python with the following commands:
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
|
|
100
|
+
ScriptCollectionCore.get_scriptcollection_version()
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Or you can simply run `pip3 freeze` to get information about (all) currently installed pip-packages.
|
|
104
|
+
|
|
105
|
+
## Development
|
|
106
|
+
|
|
107
|
+
### Branching-system
|
|
108
|
+
|
|
109
|
+
This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
|
|
110
|
+
|
|
111
|
+
### Repository-structure
|
|
112
|
+
|
|
113
|
+
This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md) as repository-structure.
|
|
114
|
+
|
|
115
|
+
### Install dependencies
|
|
116
|
+
|
|
117
|
+
ScriptCollection requires [Python](https://www.python.org) 3.11 or newer.
|
|
118
|
+
|
|
119
|
+
To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
|
|
120
|
+
|
|
121
|
+
- `python` (on some systems `python3`)
|
|
122
|
+
- `pip3`
|
|
123
|
+
|
|
124
|
+
The pip-packages which are required for developing on this project are defined in `ScriptCollection/requirements.txt`.
|
|
125
|
+
|
|
126
|
+
### IDE
|
|
127
|
+
|
|
128
|
+
The recommended IDE for developing ScriptCollection is Visual Studio Code.
|
|
129
|
+
The recommended addons for developing ScriptCollection with Visual Studio Code are:
|
|
130
|
+
|
|
131
|
+
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
132
|
+
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
|
|
133
|
+
- [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
|
|
134
|
+
- [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
|
|
135
|
+
|
|
136
|
+
### Build
|
|
137
|
+
|
|
138
|
+
To create and install a ScriptCollection locally simply do the following commands in the repository-root:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
python ./ScriptCollection/Other/Build/Build.py
|
|
142
|
+
pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/BuildResult_Wheel/scriptcollection-x.x.x-py3-none-any.whl
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
(Note: `x.x.x` must be replaced by the appropriate version-number.)
|
|
146
|
+
|
|
147
|
+
The complete build-pipeline (build, testcases, linting, reference-generation, etc.) is run by `scbuildcodeunits` in the repository-root (or `task bb` if [Task](https://taskfile.dev) is installed). Afterwards `task dl` installs the built wheel locally.
|
|
148
|
+
|
|
149
|
+
### Coding style
|
|
150
|
+
|
|
151
|
+
In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
|
|
152
|
+
If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
|
|
153
|
+
|
|
154
|
+
If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
|
|
155
|
+
|
|
156
|
+
## Runtime dependencies
|
|
157
|
+
|
|
158
|
+
ScriptCollection requires [Python](https://www.python.org) 3.11 or newer.
|
|
159
|
+
|
|
160
|
+
The usual Python-dependencies will be installed automagically by `pip`.
|
|
161
|
+
|
|
162
|
+
For functions to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
|
|
163
|
+
|
|
164
|
+
- chmod
|
|
165
|
+
- chown
|
|
166
|
+
- ls
|
|
167
|
+
|
|
168
|
+
These tools must be available on the system where the functions should be executed. Meanwhile these tools are also available on Windows but may have a slightly limited functionality.
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
See [License.txt](https://raw.githubusercontent.com/anionDevelopment/ScriptCollection/main/License.txt) for license-information.
|
|
@@ -11,7 +11,7 @@ ScriptCollection/ProgramRunnerSudo.py,sha256=vwKq-MOcqsgiKhSf-MBUDBC_UyaU8evP3Ro
|
|
|
11
11
|
ScriptCollection/RepositoryDiagramGenerator.py,sha256=K_u2NW_p4ozdWD50irJEkkcDVa70TcUJpZN63TeXSLw,7092
|
|
12
12
|
ScriptCollection/RepositoryHistoryAnalyzer.py,sha256=u9141B9D-Kef-9uo3yR7BXKUMzIKLVsesnYk7H-cWm4,6157
|
|
13
13
|
ScriptCollection/SCLog.py,sha256=Fjf8Pdi63cXHGMxL_aI6A0dwGm7QIfrv3czjvpSUlaM,4705
|
|
14
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
14
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=iiOvej2wdxKVh6dRp-2HqIsm9i2KTiG35ca6WP0aYPk,310633
|
|
15
15
|
ScriptCollection/TestKind.py,sha256=jqLJwNvQeyea7SZf-UFzMC9pM0znv4do7FIC1xq8u9M,1672
|
|
16
16
|
ScriptCollection/UnassignedVariablesCheck.py,sha256=8xNcp1D5HeOLO1a1NEerq2TsnpFhw7yzYPkaay-oisY,3804
|
|
17
17
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -37,9 +37,9 @@ ScriptCollection/TFCPS/PubDependencies.py,sha256=hl6BfYjzb0-esO-pqyV_sxBLbHBi55G
|
|
|
37
37
|
ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=mmtpxrFn36GlW9ZdmEb_oigsQZBqJ85awJb9BOP3tGI,31089
|
|
38
38
|
ScriptCollection/TFCPS/TFCPS_BuildCodeUnitsHook.py,sha256=67_DQwoH5bhxxSmwtuAeoW1NOCMiLMzOy48OqlJX-KY,1744
|
|
39
39
|
ScriptCollection/TFCPS/TFCPS_CodeSpellCheck.py,sha256=zV62O7UiGjewx1yQUIWmUJ9D-5ipkV_f28uNhp-JWUs,5306
|
|
40
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=
|
|
41
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=
|
|
42
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=
|
|
40
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=Rh7S84B8QbeWn5qJxRItoI7jquJYvFnNRi_WiX3FjWo,40414
|
|
41
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=CB0K8OZNtQESdS2pqX9RQqN-lI5M-cbmXYOR0rbuRlk,9741
|
|
42
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=j7HMOG0kttgmnsUNMZErpyufjsrm3gF8Cm-5luEQFZk,63640
|
|
43
43
|
ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=BVK3fpEyjcXYVHIb6YYLH7bWe6iKRaCtPrJ3tXAemYw,6582
|
|
44
44
|
ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=mRBcf7XuNWOSXbZYc3NuJow18AMZ30D6Z-BtyNYfNcM,2072
|
|
45
45
|
ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=Krt5oyGNcRAN3szsgU7LoTh8yVTOdHW-Kq7R9MDDV-Q,7673
|
|
@@ -47,7 +47,7 @@ ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=oYEhz5ZWMnbu97_CcYEqdDxakUF
|
|
|
47
47
|
ScriptCollection/TFCPS/TFCPS_OCIImageSecretScan.py,sha256=Jb7AaMcJDW-gYEYBUVZAG3QLTTNWmXlvVEW-lZsykws,14821
|
|
48
48
|
ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=XLVsFTA1jvfDbZ7wYJgIdEByZhF_bYVbA5jkisuvK4k,2322
|
|
49
49
|
ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=2Tx5HLk1ZftBWDCTiGZdP2QiiGNyWsEuTCSt33dNQjc,23891
|
|
50
|
-
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=
|
|
50
|
+
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=HLOprSZy4wvE5Vyxe32SxLGw8GZqUSNoBqeaSZ8CtKs,160766
|
|
51
51
|
ScriptCollection/TFCPS/TFCPS_VisualRegressionTests.py,sha256=F90CF5kLCgV_M3yN696xWzF1cglWLXecau9My2ZyGxw,42230
|
|
52
52
|
ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
ScriptCollection/TFCPS/CPP/TFCPS_CodeUnitSpecific_CPP.py,sha256=BNZPMjGiWLMBH7QDtP06WEVLMnI38NLX4Dpd13bSbi4,16614
|
|
@@ -73,8 +73,8 @@ ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=yyjWPMHQjPLkML
|
|
|
73
73
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
74
|
ScriptCollection/TFCPS/TypeScript/TFCPS_CodeUnitSpecific_TypeScript.py,sha256=ILVhJHvwG5TvPBBqSvyACYb7W9QnWrJpxKgHu8IQu4g,9249
|
|
75
75
|
ScriptCollection/TFCPS/TypeScript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
|
-
scriptcollection-4.4.
|
|
77
|
-
scriptcollection-4.4.
|
|
78
|
-
scriptcollection-4.4.
|
|
79
|
-
scriptcollection-4.4.
|
|
80
|
-
scriptcollection-4.4.
|
|
76
|
+
scriptcollection-4.4.61.dist-info/METADATA,sha256=TRCqRXBsDxdQhL3dk4o5EAWEBgTr_1PJBQ44PhtpL04,8032
|
|
77
|
+
scriptcollection-4.4.61.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
78
|
+
scriptcollection-4.4.61.dist-info/entry_points.txt,sha256=--Xk3EcTa14uk1YnUD8CQ2naQjNKJFohScd1ONy4CeY,6135
|
|
79
|
+
scriptcollection-4.4.61.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
80
|
+
scriptcollection-4.4.61.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|