ScriptCollection 4.4.59__py3-none-any.whl → 4.4.60__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 +57 -33
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.60.dist-info}/METADATA +172 -172
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.60.dist-info}/RECORD +10 -10
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.60.dist-info}/WHEEL +0 -0
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.60.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.4.59.dist-info → scriptcollection-4.4.60.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,6 +224,19 @@ 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):
|
|
223
241
|
token = os.getenv("GITHUB_TOKEN")
|
|
224
242
|
if token is not None:
|
|
@@ -293,7 +311,7 @@ class TFCPS_Tools_General:
|
|
|
293
311
|
@GeneralUtilities.check_arguments
|
|
294
312
|
def get_dependent_code_units(self, codeunit_file: str) -> list[str]:
|
|
295
313
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
296
|
-
result = set(root.xpath('//cps:dependentcodeunit/text()', namespaces={'cps':
|
|
314
|
+
result = set(root.xpath('//cps:dependentcodeunit/text()', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)}))
|
|
297
315
|
result = sorted(result)
|
|
298
316
|
return result
|
|
299
317
|
|
|
@@ -400,7 +418,7 @@ class TFCPS_Tools_General:
|
|
|
400
418
|
versiononlyregex = f"^{versionregex}$"
|
|
401
419
|
if re.match(versiononlyregex, current_version) is None:
|
|
402
420
|
raise ValueError(f"Version '{current_version}' does not match version-regex '{versiononlyregex}'.")
|
|
403
|
-
namespace =
|
|
421
|
+
namespace = TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
|
|
404
422
|
#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
423
|
ET.register_namespace("", namespace)
|
|
406
424
|
tree: ET.ElementTree = ET.parse(codeunit_file)
|
|
@@ -476,11 +494,11 @@ class TFCPS_Tools_General:
|
|
|
476
494
|
def get_version_of_codeunit(self,codeunit_file:str) -> None:
|
|
477
495
|
codeunit_file_content:str=GeneralUtilities.read_text_from_file(codeunit_file)
|
|
478
496
|
return self.get_version_of_codeunit_filecontent(codeunit_file_content)
|
|
479
|
-
|
|
497
|
+
|
|
480
498
|
@GeneralUtilities.check_arguments
|
|
481
499
|
def get_version_of_codeunit_filecontent(self,file_content:str) -> None:
|
|
482
500
|
root: etree._ElementTree = etree.fromstring(file_content.encode("utf-8"))
|
|
483
|
-
result = str(root.xpath('//cps:version/text()', namespaces={'cps':
|
|
501
|
+
result = str(root.xpath('//cps:version/text()', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0])
|
|
484
502
|
return result
|
|
485
503
|
|
|
486
504
|
@GeneralUtilities.check_arguments
|
|
@@ -493,14 +511,14 @@ class TFCPS_Tools_General:
|
|
|
493
511
|
@GeneralUtilities.check_arguments
|
|
494
512
|
def get_codeunit_description(self,codeunit_file:str) -> bool:
|
|
495
513
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
496
|
-
return str(root.xpath('//cps:properties/@description', namespaces={'cps':
|
|
514
|
+
return str(root.xpath('//cps:properties/@description', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0])
|
|
497
515
|
|
|
498
516
|
@GeneralUtilities.check_arguments
|
|
499
517
|
def get_product_name(self, repository_folder: str) -> str:
|
|
500
518
|
product_information_file = os.path.join(repository_folder, ".ScriptCollection", "ProductInformation.xml")
|
|
501
519
|
GeneralUtilities.assert_file_exists(product_information_file)
|
|
502
520
|
root: etree._ElementTree = etree.parse(product_information_file)
|
|
503
|
-
return str(root.xpath('/cps:productinformation/cps:producttitle/text()', namespaces={'cps':
|
|
521
|
+
return str(root.xpath('/cps:productinformation/cps:producttitle/text()', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0])
|
|
504
522
|
|
|
505
523
|
@GeneralUtilities.check_arguments
|
|
506
524
|
def get_required_environment_variable_names(self, repository: str) -> list[str]:
|
|
@@ -517,7 +535,7 @@ class TFCPS_Tools_General:
|
|
|
517
535
|
product_information_file = os.path.join(repository, ".ScriptCollection", "ProductInformation.xml")
|
|
518
536
|
GeneralUtilities.assert_file_exists(product_information_file)
|
|
519
537
|
root: etree._ElementTree = etree.parse(product_information_file)
|
|
520
|
-
namespaces = {'cps':
|
|
538
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)}
|
|
521
539
|
declaration_elements = root.xpath('/cps:productinformation/cps:requiredenvironmentvariables', namespaces=namespaces)
|
|
522
540
|
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
541
|
result: list[str] = []
|
|
@@ -694,8 +712,8 @@ class TFCPS_Tools_General:
|
|
|
694
712
|
|
|
695
713
|
# TODO implement usage of self.reference_latest_version_of_xsd_when_generating_xml
|
|
696
714
|
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="{
|
|
715
|
+
<cps:constant xmlns:cps="{TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)}" constantspecificationversion="1.1.0"
|
|
716
|
+
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
717
|
<cps:name>{constantname}</cps:name>
|
|
700
718
|
<cps:documentationsummary>{documentationsummary}</cps:documentationsummary>
|
|
701
719
|
<cps:path>{constants_valuefiler_reference}</cps:path>
|
|
@@ -720,7 +738,7 @@ class TFCPS_Tools_General:
|
|
|
720
738
|
self.assert_is_codeunit_folder(source_codeunit_folder)
|
|
721
739
|
root: etree._ElementTree = etree.parse(os.path.join(source_codeunit_folder, "Other", "Resources", "Constants", f"{constant_name}.constant.xml"))
|
|
722
740
|
results = root.xpath(f'//cps:{propertyname}/text()', namespaces={
|
|
723
|
-
'cps':
|
|
741
|
+
'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
|
|
724
742
|
})
|
|
725
743
|
length = len(results)
|
|
726
744
|
if (length == 0):
|
|
@@ -829,18 +847,18 @@ class TFCPS_Tools_General:
|
|
|
829
847
|
def codeunit_has_testable_sourcecode(self,codeunit_file:str) -> bool:
|
|
830
848
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
831
849
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
832
|
-
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithastestablesourcecode', namespaces={'cps':
|
|
850
|
+
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithastestablesourcecode', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0]))
|
|
833
851
|
|
|
834
852
|
@GeneralUtilities.check_arguments
|
|
835
853
|
def codeunit_has_updatable_dependencies(self,codeunit_file:str) -> bool:
|
|
836
854
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
837
855
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
838
|
-
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithasupdatabledependencies', namespaces={'cps':
|
|
856
|
+
return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:properties/@codeunithasupdatabledependencies', namespaces={'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)})[0]))
|
|
839
857
|
|
|
840
858
|
@GeneralUtilities.check_arguments
|
|
841
859
|
def get_codeunit_owner_emailaddress(self,codeunit_file:str) -> None:
|
|
842
860
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
843
|
-
namespaces = {'cps':
|
|
861
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion), 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
|
844
862
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
845
863
|
result = root.xpath('//cps:codeunit/cps:codeunitowneremailaddress/text()', namespaces=namespaces)[0]
|
|
846
864
|
return result
|
|
@@ -848,7 +866,7 @@ class TFCPS_Tools_General:
|
|
|
848
866
|
@GeneralUtilities.check_arguments
|
|
849
867
|
def get_codeunit_owner_name(self,codeunit_file:str) -> None:
|
|
850
868
|
self.assert_is_codeunit_folder(os.path.dirname(codeunit_file))
|
|
851
|
-
namespaces = {'cps':
|
|
869
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion), 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
|
852
870
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
853
871
|
result = root.xpath('//cps:codeunit/cps:codeunitownername/text()', namespaces=namespaces)[0]
|
|
854
872
|
return result
|
|
@@ -1379,23 +1397,23 @@ class TFCPS_Tools_General:
|
|
|
1379
1397
|
@GeneralUtilities.check_arguments
|
|
1380
1398
|
def __ensure_grylibrary_is_available(self, use_cache:bool) -> None:
|
|
1381
1399
|
grylibrary_folder =os.path.join( self.__sc.get_global_cache_folder(),"Tools","GRYLibrary")
|
|
1382
|
-
|
|
1400
|
+
#the artifacts-archive of a GRYLibrary-release contains the folder "GRYLibrary" as root-folder
|
|
1401
|
+
grylibrary_dll_file = os.path.join(grylibrary_folder, "GRYLibrary", "BuildResult_DotNet_win-x64", "GRYLibrary.dll")
|
|
1383
1402
|
grylibrary_dll_file_exists = os.path.isfile(grylibrary_dll_file)
|
|
1384
1403
|
if not os.path.isfile(grylibrary_dll_file):
|
|
1385
1404
|
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"))
|
|
1405
|
+
grylibrary_latest_tag = self.get_tag_of_latest_github_release("anionDevelopment", "GRYLibrary")
|
|
1406
|
+
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>'.")
|
|
1407
|
+
grylibrary_latest_version = grylibrary_latest_tag[1:]
|
|
1390
1408
|
if grylibrary_dll_file_exists:
|
|
1391
|
-
grylibrary_existing_codeunit_file = os.path.join(grylibrary_folder, "SourceCode", "GRYLibrary.codeunit.xml")
|
|
1409
|
+
grylibrary_existing_codeunit_file = os.path.join(grylibrary_folder, "GRYLibrary", "SourceCode", "GRYLibrary.codeunit.xml")
|
|
1392
1410
|
grylibrary_existing_codeunit_version = self.get_version_of_codeunit(grylibrary_existing_codeunit_file)
|
|
1393
1411
|
if grylibrary_existing_codeunit_version != grylibrary_latest_version:
|
|
1394
1412
|
GeneralUtilities.ensure_directory_does_not_exist(grylibrary_folder)
|
|
1395
1413
|
GeneralUtilities.ensure_directory_does_not_exist(grylibrary_folder)
|
|
1396
1414
|
GeneralUtilities.ensure_directory_exists(grylibrary_folder)
|
|
1397
|
-
archive_name = f"
|
|
1398
|
-
archive_download_link = f"https://github.com/anionDevelopment/GRYLibrary/releases/download/
|
|
1415
|
+
archive_name = f"GRYLibrary_Artifacts_v{grylibrary_latest_version}.zip"
|
|
1416
|
+
archive_download_link = f"https://github.com/anionDevelopment/GRYLibrary/releases/download/{grylibrary_latest_tag}/{archive_name}"
|
|
1399
1417
|
archive_file = os.path.join(grylibrary_folder, archive_name)
|
|
1400
1418
|
urllib.request.urlretrieve(archive_download_link, archive_file)
|
|
1401
1419
|
with zipfile.ZipFile(archive_file, 'r') as zip_ref:
|
|
@@ -2092,7 +2110,7 @@ class TFCPS_Tools_General:
|
|
|
2092
2110
|
@GeneralUtilities.check_arguments
|
|
2093
2111
|
def get_dependencies_which_are_ignored_from_updates(self, codeunit_folder: str) -> list[str]:
|
|
2094
2112
|
self.assert_is_codeunit_folder(codeunit_folder)
|
|
2095
|
-
namespaces = {'cps':
|
|
2113
|
+
namespaces = {'cps': TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion), 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
|
2096
2114
|
codeunit_name = os.path.basename(codeunit_folder)
|
|
2097
2115
|
codeunit_file = os.path.join(codeunit_folder, f"{codeunit_name}.codeunit.xml")
|
|
2098
2116
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
|
@@ -2260,3 +2278,9 @@ class TFCPS_Tools_General:
|
|
|
2260
2278
|
languages_file = os.path.join(languages_folder, "Languages.txt")
|
|
2261
2279
|
GeneralUtilities.ensure_file_exists(languages_file)
|
|
2262
2280
|
GeneralUtilities.write_lines_to_file(languages_file, languages)
|
|
2281
|
+
|
|
2282
|
+
# Kept for compatibility with callers outside of ScriptCollection which use these values directly. Both are derived from
|
|
2283
|
+
# CommonProjectStructureVersion via TFCPS_Tools_General.get_common_project_structure_namespace and
|
|
2284
|
+
# TFCPS_Tools_General.get_common_project_structure_xsd_base_url, so the version still has to be updated only in one place.
|
|
2285
|
+
CommonProjectStructureNamespace: str = TFCPS_Tools_General.get_common_project_structure_namespace(CommonProjectStructureVersion)
|
|
2286
|
+
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.60
|
|
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=9Th5XXyQIGQWQ7ZwXwVhhYKD9_REr3RzU8X5mjylSOs,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=x14mMI8MAL1IkfVb8fXgRL4OVlQgLA4s9ed5UEGJGhM,160522
|
|
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.60.dist-info/METADATA,sha256=n0nNo0P5YP-odhwwCQu41xz-IwmQ-se0JItkM7AyZnU,8032
|
|
77
|
+
scriptcollection-4.4.60.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
78
|
+
scriptcollection-4.4.60.dist-info/entry_points.txt,sha256=--Xk3EcTa14uk1YnUD8CQ2naQjNKJFohScd1ONy4CeY,6135
|
|
79
|
+
scriptcollection-4.4.60.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
80
|
+
scriptcollection-4.4.60.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|