ScriptCollection 4.3.53__py3-none-any.whl → 4.3.55__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/Go/TFCPS_CodeUnitSpecific_Go.py +72 -72
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +10 -0
- ScriptCollection/TFCPS/TFCPS_Tools_General.py +26 -23
- {scriptcollection-4.3.53.dist-info → scriptcollection-4.3.55.dist-info}/METADATA +168 -168
- {scriptcollection-4.3.53.dist-info → scriptcollection-4.3.55.dist-info}/RECORD +9 -9
- {scriptcollection-4.3.53.dist-info → scriptcollection-4.3.55.dist-info}/WHEEL +0 -0
- {scriptcollection-4.3.53.dist-info → scriptcollection-4.3.55.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.3.53.dist-info → scriptcollection-4.3.55.dist-info}/top_level.txt +0 -0
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from lxml import etree
|
|
3
|
-
from ...GeneralUtilities import GeneralUtilities
|
|
4
|
-
from ...ScriptCollectionCore import ScriptCollectionCore
|
|
5
|
-
from ...SCLog import LogLevel
|
|
6
|
-
from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base,TFCPS_CodeUnitSpecific_Base_CLI
|
|
7
|
-
|
|
8
|
-
class TFCPS_CodeUnitSpecific_Go_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
9
|
-
|
|
10
|
-
def __init__(self,current_file:str,verbosity:LogLevel,targetenvironmenttype:str,use_cache:bool,is_pre_merge:bool):
|
|
11
|
-
super().__init__(current_file, verbosity,targetenvironmenttype,use_cache,is_pre_merge)
|
|
12
|
-
|
|
13
|
-
@GeneralUtilities.check_arguments
|
|
14
|
-
def build(self) -> None:
|
|
15
|
-
#TODO
|
|
16
|
-
self.__generate_sbom_for_go_image()
|
|
17
|
-
|
|
18
|
-
@GeneralUtilities.check_arguments
|
|
19
|
-
def __generate_sbom_for_go_image(self) -> None:
|
|
20
|
-
pass#TODO
|
|
21
|
-
|
|
22
|
-
@GeneralUtilities.check_arguments
|
|
23
|
-
def linting(self) -> None:
|
|
24
|
-
pass#TODO
|
|
25
|
-
|
|
26
|
-
@GeneralUtilities.check_arguments
|
|
27
|
-
def __update_coverage_file(self,coverage_file:str) -> None:
|
|
28
|
-
tree = etree.parse(coverage_file)
|
|
29
|
-
root = tree.getroot()
|
|
30
|
-
for package in root.findall(".//package"):
|
|
31
|
-
package.set("name",self.get_codeunit_name())
|
|
32
|
-
for cls in root.findall(".//class"):
|
|
33
|
-
filename = cls.get("filename")
|
|
34
|
-
if filename:
|
|
35
|
-
cls.set("filename", f"./{filename}")
|
|
36
|
-
cls.set("name",str(filename).rsplit("/", 1)[-1])
|
|
37
|
-
tree.write(coverage_file, encoding="utf-8", xml_declaration=True, pretty_print=True)
|
|
38
|
-
|
|
39
|
-
@GeneralUtilities.check_arguments
|
|
40
|
-
def run_testcases(self) -> None:
|
|
41
|
-
test_coverage_folder = os.path.join(self.get_codeunit_folder(), "Other", "Artifacts", "TestCoverage").replace("\\", "/")
|
|
42
|
-
GeneralUtilities.ensure_directory_exists(test_coverage_folder)
|
|
43
|
-
src_folder = GeneralUtilities.resolve_relative_path(self.get_codeunit_name(), self.get_codeunit_folder())
|
|
44
|
-
sc: ScriptCollectionCore = ScriptCollectionCore()
|
|
45
|
-
sc.run_program_argsasarray("go", ["install", "github.com/t-yuki/gocover-cobertura@latest"], src_folder)
|
|
46
|
-
sc.run_program_argsasarray("go", ["test", "-coverprofile=coverage.out", "./..."], src_folder)
|
|
47
|
-
coverage_file:str=f"{test_coverage_folder}/TestCoverage.xml"
|
|
48
|
-
sc.run_program_argsasarray("sh", ["-c", f"gocover-cobertura < coverage.out > {coverage_file}"], src_folder)
|
|
49
|
-
self.__update_coverage_file(coverage_file)
|
|
50
|
-
self.run_testcases_common_post_task(self.get_repository_folder(),self.get_codeunit_name(),True,self.get_type_environment_type())
|
|
51
|
-
|
|
52
|
-
def get_dependencies(self)->dict[str,set[str]]:
|
|
53
|
-
return dict[str,set[str]]()#TODO
|
|
54
|
-
|
|
55
|
-
@GeneralUtilities.check_arguments
|
|
56
|
-
def get_available_versions(self,dependencyname:str)->list[str]:
|
|
57
|
-
return []#TODO
|
|
58
|
-
|
|
59
|
-
@GeneralUtilities.check_arguments
|
|
60
|
-
def set_dependency_version(self,name:str,new_version:str)->None:
|
|
61
|
-
raise ValueError(f"Operation is not implemented.")
|
|
62
|
-
|
|
63
|
-
class TFCPS_CodeUnitSpecific_Go_CLI:
|
|
64
|
-
|
|
65
|
-
@staticmethod
|
|
66
|
-
@GeneralUtilities.check_arguments
|
|
67
|
-
def parse(file:str)->TFCPS_CodeUnitSpecific_Go_Functions:
|
|
68
|
-
parser=TFCPS_CodeUnitSpecific_Base_CLI.get_base_parser()
|
|
69
|
-
#add custom parameter if desired
|
|
70
|
-
args=parser.parse_args()
|
|
71
|
-
result:TFCPS_CodeUnitSpecific_Go_Functions=TFCPS_CodeUnitSpecific_Go_Functions(file,LogLevel(int(args.verbosity)),args.targetenvironmenttype,not args.nocache,args.ispremerge)
|
|
72
|
-
return result
|
|
1
|
+
import os
|
|
2
|
+
from lxml import etree
|
|
3
|
+
from ...GeneralUtilities import GeneralUtilities
|
|
4
|
+
from ...ScriptCollectionCore import ScriptCollectionCore
|
|
5
|
+
from ...SCLog import LogLevel
|
|
6
|
+
from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base,TFCPS_CodeUnitSpecific_Base_CLI
|
|
7
|
+
|
|
8
|
+
class TFCPS_CodeUnitSpecific_Go_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
9
|
+
|
|
10
|
+
def __init__(self,current_file:str,verbosity:LogLevel,targetenvironmenttype:str,use_cache:bool,is_pre_merge:bool):
|
|
11
|
+
super().__init__(current_file, verbosity,targetenvironmenttype,use_cache,is_pre_merge)
|
|
12
|
+
|
|
13
|
+
@GeneralUtilities.check_arguments
|
|
14
|
+
def build(self) -> None:
|
|
15
|
+
#TODO
|
|
16
|
+
self.__generate_sbom_for_go_image()
|
|
17
|
+
|
|
18
|
+
@GeneralUtilities.check_arguments
|
|
19
|
+
def __generate_sbom_for_go_image(self) -> None:
|
|
20
|
+
pass#TODO
|
|
21
|
+
|
|
22
|
+
@GeneralUtilities.check_arguments
|
|
23
|
+
def linting(self) -> None:
|
|
24
|
+
pass#TODO
|
|
25
|
+
|
|
26
|
+
@GeneralUtilities.check_arguments
|
|
27
|
+
def __update_coverage_file(self,coverage_file:str) -> None:
|
|
28
|
+
tree = etree.parse(coverage_file)
|
|
29
|
+
root = tree.getroot()
|
|
30
|
+
for package in root.findall(".//package"):
|
|
31
|
+
package.set("name",self.get_codeunit_name())
|
|
32
|
+
for cls in root.findall(".//class"):
|
|
33
|
+
filename = cls.get("filename")
|
|
34
|
+
if filename:
|
|
35
|
+
cls.set("filename", f"./{filename}")
|
|
36
|
+
cls.set("name",str(filename).rsplit("/", 1)[-1])
|
|
37
|
+
tree.write(coverage_file, encoding="utf-8", xml_declaration=True, pretty_print=True)
|
|
38
|
+
|
|
39
|
+
@GeneralUtilities.check_arguments
|
|
40
|
+
def run_testcases(self) -> None:
|
|
41
|
+
test_coverage_folder = os.path.join(self.get_codeunit_folder(), "Other", "Artifacts", "TestCoverage").replace("\\", "/")
|
|
42
|
+
GeneralUtilities.ensure_directory_exists(test_coverage_folder)
|
|
43
|
+
src_folder = GeneralUtilities.resolve_relative_path(self.get_codeunit_name(), self.get_codeunit_folder())
|
|
44
|
+
sc: ScriptCollectionCore = ScriptCollectionCore()
|
|
45
|
+
sc.run_program_argsasarray("go", ["install", "github.com/t-yuki/gocover-cobertura@latest"], src_folder)
|
|
46
|
+
sc.run_program_argsasarray("go", ["test", "-coverprofile=coverage.out", "./..."], src_folder)
|
|
47
|
+
coverage_file:str=f"{test_coverage_folder}/TestCoverage.xml"
|
|
48
|
+
sc.run_program_argsasarray("sh", ["-c", f"gocover-cobertura < coverage.out > {coverage_file}"], src_folder)
|
|
49
|
+
self.__update_coverage_file(coverage_file)
|
|
50
|
+
self.run_testcases_common_post_task(self.get_repository_folder(),self.get_codeunit_name(),True,self.get_type_environment_type())
|
|
51
|
+
|
|
52
|
+
def get_dependencies(self)->dict[str,set[str]]:
|
|
53
|
+
return dict[str,set[str]]()#TODO
|
|
54
|
+
|
|
55
|
+
@GeneralUtilities.check_arguments
|
|
56
|
+
def get_available_versions(self,dependencyname:str)->list[str]:
|
|
57
|
+
return []#TODO
|
|
58
|
+
|
|
59
|
+
@GeneralUtilities.check_arguments
|
|
60
|
+
def set_dependency_version(self,name:str,new_version:str)->None:
|
|
61
|
+
raise ValueError(f"Operation is not implemented.")
|
|
62
|
+
|
|
63
|
+
class TFCPS_CodeUnitSpecific_Go_CLI:
|
|
64
|
+
|
|
65
|
+
@staticmethod
|
|
66
|
+
@GeneralUtilities.check_arguments
|
|
67
|
+
def parse(file:str)->TFCPS_CodeUnitSpecific_Go_Functions:
|
|
68
|
+
parser=TFCPS_CodeUnitSpecific_Base_CLI.get_base_parser()
|
|
69
|
+
#add custom parameter if desired
|
|
70
|
+
args=parser.parse_args()
|
|
71
|
+
result:TFCPS_CodeUnitSpecific_Go_Functions=TFCPS_CodeUnitSpecific_Go_Functions(file,LogLevel(int(args.verbosity)),args.targetenvironmenttype,not args.nocache,args.ispremerge)
|
|
72
|
+
return result
|
|
@@ -245,6 +245,16 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
245
245
|
if test:
|
|
246
246
|
scbuildcodeunits_arguments=["bash","-c", "pip3 install scriptcollection --upgrade && scshowversion && "+" ".join(scbuildcodeunits_arguments)]
|
|
247
247
|
|
|
248
|
+
args=["--repository",self.repository,"--targetenvironmenttype",self.target_environment_type,"--verbosity",str(int(self.sc.log.loglevel))]
|
|
249
|
+
|
|
250
|
+
if os.path.isfile( os.path.join( GeneralUtilities.get_scriptcollection_configuration_folder(),"TFCPS","CustomPreCodeUnitBuildScriptForContainer.py")):
|
|
251
|
+
self.sc.log.log("Run custom pre-codeunitbuild script for container...")
|
|
252
|
+
self.sc.run_program_argsasarray(GeneralUtilities.get_python_executable(),["CustomPreCodeUnitBuildScriptForContainer.py"]+args, os.path.join( GeneralUtilities.get_scriptcollection_configuration_folder(),"TFCPS"),print_live_output=True)
|
|
253
|
+
|
|
254
|
+
if os.path.isfile( os.path.join(self.repository,"Other","Scripts","CustomPreCodeUnitBuildScriptForContainer.py")):
|
|
255
|
+
self.sc.log.log("Prepare build codeunits for container...")
|
|
256
|
+
self.sc.run_program_argsasarray(GeneralUtilities.get_python_executable(),["CustomPreCodeUnitBuildScriptForContainer.py"]+args, os.path.join(self.repository,"Other","Scripts"),print_live_output=True)
|
|
257
|
+
|
|
248
258
|
#pass the env-variables defined in <repository>/.ScriptCollection/RequiredEnvVariables.csv (if any) into the container so they do not have to be specified explicitly on every scbuildcodeunitsc-call.
|
|
249
259
|
env_arguments: list[str] = []
|
|
250
260
|
for env_variable_name, env_variable_value in self.tfcps_tools_general.get_required_env_variables(self.repository).items():
|
|
@@ -458,10 +458,6 @@ class TFCPS_Tools_General:
|
|
|
458
458
|
root: etree._ElementTree = etree.parse(product_information_file)
|
|
459
459
|
return str(root.xpath('/cps:productinformation/cps:producttitle/text()', namespaces={'cps': 'https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure'})[0])
|
|
460
460
|
|
|
461
|
-
@GeneralUtilities.check_arguments
|
|
462
|
-
def get_required_env_variables_file(self, repository: str) -> str:
|
|
463
|
-
return os.path.join(repository, ".ScriptCollection", "RequiredEnvVariables.csv")
|
|
464
|
-
|
|
465
461
|
@GeneralUtilities.check_arguments
|
|
466
462
|
def get_required_env_variables(self, repository: str) -> dict[str, str]:
|
|
467
463
|
"""Reads '<repository>/.ScriptCollection/RequiredEnvVariables.csv' and resolves the value of each environment-variable
|
|
@@ -472,25 +468,32 @@ class TFCPS_Tools_General:
|
|
|
472
468
|
caller which needs these environment-variables (for example to pass them into a build-container) obtains identical
|
|
473
469
|
values instead of re-implementing the resolution-logic."""
|
|
474
470
|
result: dict[str, str] = {}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
for
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
471
|
+
files=[
|
|
472
|
+
os.path.join(repository, ".ScriptCollection", "RequiredEnvVariables.local.csv"),
|
|
473
|
+
os.path.join(repository, ".ScriptCollection", "RequiredEnvVariables.csv")
|
|
474
|
+
]
|
|
475
|
+
for file in files:
|
|
476
|
+
if not os.path.isfile(file):
|
|
477
|
+
return result
|
|
478
|
+
allowed_kinds = ["literal", "hostenvvariable", "file"]
|
|
479
|
+
for entry in GeneralUtilities.read_csv_file(file, True):
|
|
480
|
+
env_variable_name = entry[0]
|
|
481
|
+
kind = entry[1]
|
|
482
|
+
value = entry[2]
|
|
483
|
+
GeneralUtilities.assert_condition(kind in allowed_kinds, f"Unknown kind '{kind}' for required environment-variable '{env_variable_name}' defined in '{file}'. Allowed values are: {', '.join(allowed_kinds)}.")
|
|
484
|
+
if kind == "literal":
|
|
485
|
+
resolved_value = value
|
|
486
|
+
elif kind == "hostenvvariable":
|
|
487
|
+
resolved_value = os.environ.get(value)
|
|
488
|
+
GeneralUtilities.assert_condition(resolved_value is not None, f"The environment-variable '{env_variable_name}' defined in '{file}' is supposed to be taken from the host-environment-variable '{value}', but that environment-variable is not set.")
|
|
489
|
+
elif kind == "file":
|
|
490
|
+
value = os.path.expanduser(value)
|
|
491
|
+
value_file = GeneralUtilities.resolve_relative_path(value, repository)
|
|
492
|
+
GeneralUtilities.assert_file_exists(value_file, f"The environment-variable '{env_variable_name}' defined in '{file}' is supposed to be taken from the file '{value_file}', but that file does not exist.")
|
|
493
|
+
resolved_value = GeneralUtilities.read_text_from_file(value_file).strip()
|
|
494
|
+
else:
|
|
495
|
+
raise ValueError(f"Unknown kind '{kind}' for required environment-variable '{env_variable_name}' defined in '{file}'. Allowed values are: {', '.join(allowed_kinds)}.")
|
|
496
|
+
result[env_variable_name] = resolved_value
|
|
494
497
|
return result
|
|
495
498
|
|
|
496
499
|
@GeneralUtilities.check_arguments
|
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: scriptcollection
|
|
3
|
-
Version: 4.3.
|
|
4
|
-
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
|
-
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
|
-
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
7
|
-
Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
|
|
8
|
-
Project-URL: Changelog, https://github.com/anionDev/ScriptCollection/tree/main/Other/Resources/Changelog
|
|
9
|
-
Keywords: package,release,build,management
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
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.5.0
|
|
25
|
-
Requires-Dist: coverage>=7.15.2
|
|
26
|
-
Requires-Dist: cyclonedx-bom>=7.1.0
|
|
27
|
-
Requires-Dist: defusedxml>=0.7.1
|
|
28
|
-
Requires-Dist: keyboard>=0.13.5
|
|
29
|
-
Requires-Dist: lcov-cobertura>=2.1.1
|
|
30
|
-
Requires-Dist: lxml>=6.0.1
|
|
31
|
-
Requires-Dist: ntplib>=0.4.0
|
|
32
|
-
Requires-Dist: Pillow>=11.3.0
|
|
33
|
-
Requires-Dist: psutil>=7.2.2
|
|
34
|
-
Requires-Dist: pycdlib>=1.16.0
|
|
35
|
-
Requires-Dist: Pygments>=2.20.0
|
|
36
|
-
Requires-Dist: pylint>=4.0.6
|
|
37
|
-
Requires-Dist: pyOpenSSL>=25.3.0
|
|
38
|
-
Requires-Dist: PyPDF>=6.14.2
|
|
39
|
-
Requires-Dist: pytest>=8.4.2
|
|
40
|
-
Requires-Dist: PyYAML>=6.0.3
|
|
41
|
-
Requires-Dist: qrcode>=8.2.0
|
|
42
|
-
Requires-Dist: send2trash>=1.8.3
|
|
43
|
-
Requires-Dist: twine>=6.2.0
|
|
44
|
-
Requires-Dist: xmlschema>=4.3.2
|
|
45
|
-
|
|
46
|
-
# ScriptCollection
|
|
47
|
-
|
|
48
|
-
## General
|
|
49
|
-
|
|
50
|
-
[](https://pypi.org/project/ScriptCollection/)
|
|
51
|
-

|
|
52
|
-

|
|
53
|
-
|
|
54
|
-
[](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
|
|
55
|
-
[](https://pepy.tech/project/scriptcollection)
|
|
56
|
-

|
|
57
|
-
|
|
58
|
-
The ScriptCollection is the place for reusable scripts.
|
|
59
|
-
|
|
60
|
-
## Reference
|
|
61
|
-
|
|
62
|
-
The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
|
|
63
|
-
|
|
64
|
-
## Hints
|
|
65
|
-
|
|
66
|
-
Most of the scripts are written in [python](https://www.python.org) 3.
|
|
67
|
-
|
|
68
|
-
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.
|
|
69
|
-
|
|
70
|
-
Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
|
|
71
|
-
|
|
72
|
-
When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
|
|
73
|
-
|
|
74
|
-
## Get ScriptCollection
|
|
75
|
-
|
|
76
|
-
### Installation via pip
|
|
77
|
-
|
|
78
|
-
`pip3 install ScriptCollection`
|
|
79
|
-
|
|
80
|
-
See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
|
|
81
|
-
|
|
82
|
-
### Download sourcecode using git
|
|
83
|
-
|
|
84
|
-
You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
|
|
85
|
-
|
|
86
|
-
`git clone https://github.com/anionDevevlopment/ScriptCollection.git`
|
|
87
|
-
|
|
88
|
-
It may be more easy 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/anionDevevlopment/ScriptCollection) the ScriptCollection to use the scripts in this repository which are not written in python.
|
|
89
|
-
|
|
90
|
-
## Troubleshooting
|
|
91
|
-
|
|
92
|
-
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/anionDevevlopment/ScriptCollection/issues).
|
|
93
|
-
|
|
94
|
-
If you have installed the ScriptCollection as pip-package you can simply check the version using Python with the following commands:
|
|
95
|
-
|
|
96
|
-
```lang-bash
|
|
97
|
-
from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
|
|
98
|
-
ScriptCollectionCore.get_scriptcollection_version()
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Or you can simply run `pip3 freeze` folder to get information about (all) currently installed pip-packages.
|
|
102
|
-
|
|
103
|
-
## Development
|
|
104
|
-
|
|
105
|
-
### Branching-system
|
|
106
|
-
|
|
107
|
-
This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
|
|
108
|
-
|
|
109
|
-
### Repository-structure
|
|
110
|
-
|
|
111
|
-
This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md)-branching-system.
|
|
112
|
-
|
|
113
|
-
### Install dependencies
|
|
114
|
-
|
|
115
|
-
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
116
|
-
|
|
117
|
-
To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
|
|
118
|
-
|
|
119
|
-
- `python` (on some systems `python3`)
|
|
120
|
-
- `pip3`
|
|
121
|
-
|
|
122
|
-
The pip-packages which are required for developing on this project are defined in `requirements.txt`.
|
|
123
|
-
|
|
124
|
-
### IDE
|
|
125
|
-
|
|
126
|
-
The recommended IDE for developing ScriptCollection is Visual Studio Code.
|
|
127
|
-
The recommended addons for developing ScriptCollection with Visual Studio Code are:
|
|
128
|
-
|
|
129
|
-
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
130
|
-
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
|
|
131
|
-
- [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
|
|
132
|
-
- [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
|
|
133
|
-
|
|
134
|
-
### Build
|
|
135
|
-
|
|
136
|
-
To create and install an ScriptCollection locally simply do the following commands:
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
python ./ScriptCollection/Other/Build/Build.py
|
|
140
|
-
pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/Wheel/ScriptCollection-x.x.x-py3-none-any.whl
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
(Note: `x.x.x` must be replaced by the appropriate version-number.)
|
|
144
|
-
|
|
145
|
-
### Coding style
|
|
146
|
-
|
|
147
|
-
In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
|
|
148
|
-
If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
|
|
149
|
-
|
|
150
|
-
If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
|
|
151
|
-
|
|
152
|
-
## Runtime dependencies
|
|
153
|
-
|
|
154
|
-
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
155
|
-
|
|
156
|
-
The usual Python-dependencies will be installed automagically by `pip`.
|
|
157
|
-
|
|
158
|
-
For functions to to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
|
|
159
|
-
|
|
160
|
-
- chmod
|
|
161
|
-
- chown
|
|
162
|
-
- ls
|
|
163
|
-
|
|
164
|
-
This tools must be available on the system where the functions should be executed. Meanwhile this tools are also available on Windows but may have a slightly limited functionality.
|
|
165
|
-
|
|
166
|
-
## License
|
|
167
|
-
|
|
168
|
-
See [License.txt](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/License.txt) for license-information.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scriptcollection
|
|
3
|
+
Version: 4.3.55
|
|
4
|
+
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
|
+
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
7
|
+
Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
|
|
8
|
+
Project-URL: Changelog, https://github.com/anionDev/ScriptCollection/tree/main/Other/Resources/Changelog
|
|
9
|
+
Keywords: package,release,build,management
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
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.5.0
|
|
25
|
+
Requires-Dist: coverage>=7.15.2
|
|
26
|
+
Requires-Dist: cyclonedx-bom>=7.1.0
|
|
27
|
+
Requires-Dist: defusedxml>=0.7.1
|
|
28
|
+
Requires-Dist: keyboard>=0.13.5
|
|
29
|
+
Requires-Dist: lcov-cobertura>=2.1.1
|
|
30
|
+
Requires-Dist: lxml>=6.0.1
|
|
31
|
+
Requires-Dist: ntplib>=0.4.0
|
|
32
|
+
Requires-Dist: Pillow>=11.3.0
|
|
33
|
+
Requires-Dist: psutil>=7.2.2
|
|
34
|
+
Requires-Dist: pycdlib>=1.16.0
|
|
35
|
+
Requires-Dist: Pygments>=2.20.0
|
|
36
|
+
Requires-Dist: pylint>=4.0.6
|
|
37
|
+
Requires-Dist: pyOpenSSL>=25.3.0
|
|
38
|
+
Requires-Dist: PyPDF>=6.14.2
|
|
39
|
+
Requires-Dist: pytest>=8.4.2
|
|
40
|
+
Requires-Dist: PyYAML>=6.0.3
|
|
41
|
+
Requires-Dist: qrcode>=8.2.0
|
|
42
|
+
Requires-Dist: send2trash>=1.8.3
|
|
43
|
+
Requires-Dist: twine>=6.2.0
|
|
44
|
+
Requires-Dist: xmlschema>=4.3.2
|
|
45
|
+
|
|
46
|
+
# ScriptCollection
|
|
47
|
+
|
|
48
|
+
## General
|
|
49
|
+
|
|
50
|
+
[](https://pypi.org/project/ScriptCollection/)
|
|
51
|
+

|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
[](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
|
|
55
|
+
[](https://pepy.tech/project/scriptcollection)
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
The ScriptCollection is the place for reusable scripts.
|
|
59
|
+
|
|
60
|
+
## Reference
|
|
61
|
+
|
|
62
|
+
The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
|
|
63
|
+
|
|
64
|
+
## Hints
|
|
65
|
+
|
|
66
|
+
Most of the scripts are written in [python](https://www.python.org) 3.
|
|
67
|
+
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
|
|
71
|
+
|
|
72
|
+
When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
|
|
73
|
+
|
|
74
|
+
## Get ScriptCollection
|
|
75
|
+
|
|
76
|
+
### Installation via pip
|
|
77
|
+
|
|
78
|
+
`pip3 install ScriptCollection`
|
|
79
|
+
|
|
80
|
+
See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
|
|
81
|
+
|
|
82
|
+
### Download sourcecode using git
|
|
83
|
+
|
|
84
|
+
You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
|
|
85
|
+
|
|
86
|
+
`git clone https://github.com/anionDevevlopment/ScriptCollection.git`
|
|
87
|
+
|
|
88
|
+
It may be more easy 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/anionDevevlopment/ScriptCollection) the ScriptCollection to use the scripts in this repository which are not written in python.
|
|
89
|
+
|
|
90
|
+
## Troubleshooting
|
|
91
|
+
|
|
92
|
+
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/anionDevevlopment/ScriptCollection/issues).
|
|
93
|
+
|
|
94
|
+
If you have installed the ScriptCollection as pip-package you can simply check the version using Python with the following commands:
|
|
95
|
+
|
|
96
|
+
```lang-bash
|
|
97
|
+
from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
|
|
98
|
+
ScriptCollectionCore.get_scriptcollection_version()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Or you can simply run `pip3 freeze` folder to get information about (all) currently installed pip-packages.
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
### Branching-system
|
|
106
|
+
|
|
107
|
+
This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
|
|
108
|
+
|
|
109
|
+
### Repository-structure
|
|
110
|
+
|
|
111
|
+
This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md)-branching-system.
|
|
112
|
+
|
|
113
|
+
### Install dependencies
|
|
114
|
+
|
|
115
|
+
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
116
|
+
|
|
117
|
+
To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
|
|
118
|
+
|
|
119
|
+
- `python` (on some systems `python3`)
|
|
120
|
+
- `pip3`
|
|
121
|
+
|
|
122
|
+
The pip-packages which are required for developing on this project are defined in `requirements.txt`.
|
|
123
|
+
|
|
124
|
+
### IDE
|
|
125
|
+
|
|
126
|
+
The recommended IDE for developing ScriptCollection is Visual Studio Code.
|
|
127
|
+
The recommended addons for developing ScriptCollection with Visual Studio Code are:
|
|
128
|
+
|
|
129
|
+
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
130
|
+
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
|
|
131
|
+
- [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
|
|
132
|
+
- [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
|
|
133
|
+
|
|
134
|
+
### Build
|
|
135
|
+
|
|
136
|
+
To create and install an ScriptCollection locally simply do the following commands:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
python ./ScriptCollection/Other/Build/Build.py
|
|
140
|
+
pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/Wheel/ScriptCollection-x.x.x-py3-none-any.whl
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
(Note: `x.x.x` must be replaced by the appropriate version-number.)
|
|
144
|
+
|
|
145
|
+
### Coding style
|
|
146
|
+
|
|
147
|
+
In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
|
|
148
|
+
If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
|
|
149
|
+
|
|
150
|
+
If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
|
|
151
|
+
|
|
152
|
+
## Runtime dependencies
|
|
153
|
+
|
|
154
|
+
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
155
|
+
|
|
156
|
+
The usual Python-dependencies will be installed automagically by `pip`.
|
|
157
|
+
|
|
158
|
+
For functions to to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
|
|
159
|
+
|
|
160
|
+
- chmod
|
|
161
|
+
- chown
|
|
162
|
+
- ls
|
|
163
|
+
|
|
164
|
+
This tools must be available on the system where the functions should be executed. Meanwhile this tools are also available on Windows but may have a slightly limited functionality.
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
See [License.txt](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/License.txt) for license-information.
|
|
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
9
9
|
ScriptCollection/ProgramRunnerPopen.py,sha256=zVD-gZY85o8wiGFcpYAGNDl-tXaKzipl1Bkhqy2ois4,4681
|
|
10
10
|
ScriptCollection/ProgramRunnerSudo.py,sha256=RXsiceQ8W6a8YDk_2BPscVbIAmDIpIxqe9WHBy2r4CM,5233
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=LdzSJy3NnnwYCCefz2h4tiTy4BjT8lOz3IBG_bMOg9E,4821
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=4NmeOKZ51SnWxMMWqfhBSedaKjrDQCuOw4vCLiUYzT4,248737
|
|
13
13
|
ScriptCollection/UnassignedVariablesCheck.py,sha256=v59qLQ5RRvx31ouuCW7NWZj3McWENvGBPkV5ZGBmqJE,4344
|
|
14
14
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=WO2M28c2tUwsXFNa2L9zqMhdlyObWm3qpPE0LdIs7SE,2315
|
|
@@ -36,14 +36,14 @@ ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html,sha256=CX9S1bdOz
|
|
|
36
36
|
ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=rpuwSsQ6YQfZS2LGnvOH5ql8zs_-cHU4LQttS7XNT60,11272
|
|
37
37
|
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=H9FWlS6BPK-UWJXdWN686ePky4Hq-Q13T0Kx8HSJu7s,34990
|
|
38
38
|
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Ll5EOkpVpPiFrM2mLeQXolaF7075IwgtnHXvfdpkH4k,9904
|
|
39
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=
|
|
39
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=W_-sVAxBrpYZen_1YOGICRHmLvkMyfJ5iqk7FVvieUY,36106
|
|
40
40
|
ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=X2NgZgbOkJsdZ6wMHB_RuS_rQCuz5oQCqzYrxyXBN9Q,6680
|
|
41
41
|
ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=5vCFfDiU8bvfcnoKNs2ATS8nsl6mYXcIuX7XfYE0tvg,2116
|
|
42
42
|
ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=zp7n0Li7GTi4tERDMgDcJ-o3m6131m31zvkat0lALEc,7781
|
|
43
43
|
ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=jQ0B3yq45we-8a0KuNFMfXCk9MfzPpTv2QgDWMN34x4,22792
|
|
44
44
|
ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=JYiDqDsfVJQWS9xWMi_UzfXnXsJRnPRxAzFr82bUEvI,2370
|
|
45
45
|
ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=Z8Gw-j5I7VPafHEsVeQJ2gTTKVLAnnhwZhY8IVTi2Qk,11867
|
|
46
|
-
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=
|
|
46
|
+
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=ETrDZQK2tsVd6PTv0pN2xl4nQnbiS11piNiRbMJ-bmk,133508
|
|
47
47
|
ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
48
|
ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=wS2yzYUmJ4m0cf6cBYVTHsiXSXfYhHoLFFy8x6yEQvY,19573
|
|
49
49
|
ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -54,7 +54,7 @@ ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=jPLgGKd0Vz
|
|
|
54
54
|
ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=CwDBogG7Lg3IyywpCGta9gcaqWpgjENNXaupS19ZwTM,8751
|
|
56
56
|
ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
-
ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=
|
|
57
|
+
ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=2AEs28F9_MspXb4QABaSR3KxpU_uuTmrGQnVqF4b2ck,3425
|
|
58
58
|
ScriptCollection/TFCPS/Go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
59
|
ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py,sha256=WcWWtCV3GkAk53RIN_6rjXNvkKZ5i5hBEMCmPQo6j30,1685
|
|
60
60
|
ScriptCollection/TFCPS/Maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -64,8 +64,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb
|
|
|
64
64
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
65
|
ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
66
66
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
|
-
scriptcollection-4.3.
|
|
68
|
-
scriptcollection-4.3.
|
|
69
|
-
scriptcollection-4.3.
|
|
70
|
-
scriptcollection-4.3.
|
|
71
|
-
scriptcollection-4.3.
|
|
67
|
+
scriptcollection-4.3.55.dist-info/METADATA,sha256=bB4sLm2ipWmSeyUZVk-f8exMUcpSWpD0pU7OtPjiA8M,7648
|
|
68
|
+
scriptcollection-4.3.55.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
69
|
+
scriptcollection-4.3.55.dist-info/entry_points.txt,sha256=SCaysPSowWjcCsPpNgVQIKYfo1I5BMiVI39LTWl4qDI,5915
|
|
70
|
+
scriptcollection-4.3.55.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
71
|
+
scriptcollection-4.3.55.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|