ScriptCollection 4.4.1__py3-none-any.whl → 4.4.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. ScriptCollection/Executables.py +1 -1
  2. ScriptCollection/GeneralUtilities.py +13 -1
  3. ScriptCollection/Resources/CultureChooser/CultureChooser.js +0 -0
  4. ScriptCollection/Resources/CultureChooser/index.html +0 -0
  5. ScriptCollection/Resources/Dependencies/JRE/Version.txt +0 -0
  6. ScriptCollection/Resources/Dependencies/OpenAPIGenerator/Version.txt +0 -0
  7. ScriptCollection/Resources/Dependencies/PlantUML/Version.txt +0 -0
  8. ScriptCollection/Resources/Fonts/DejaVuSans-Bold.ttf +0 -0
  9. ScriptCollection/Resources/Fonts/DejaVuSans-BoldOblique.ttf +0 -0
  10. ScriptCollection/Resources/Fonts/DejaVuSans-Oblique.ttf +0 -0
  11. ScriptCollection/Resources/Fonts/DejaVuSans.ttf +0 -0
  12. ScriptCollection/Resources/Fonts/LICENSE.txt +0 -0
  13. ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html +0 -0
  14. ScriptCollection/SCLog.py +1 -1
  15. ScriptCollection/ScriptCollectionCore.py +117 -11
  16. ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py +1 -1
  17. ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py +1 -1
  18. ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py +128 -47
  19. ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py +139 -7
  20. ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py +8 -2
  21. ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py +169 -7
  22. ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py +10 -3
  23. ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +3 -3
  24. ScriptCollection/TFCPS/TFCPS_Tools_General.py +126 -9
  25. ScriptCollection/TFCPS/TFCPS_VisualRegressionTests.py +446 -0
  26. ScriptCollection/TFCPS/TypeScript/TFCPS_CodeUnitSpecific_TypeScript.py +188 -0
  27. ScriptCollection/TFCPS/TypeScript/__init__.py +0 -0
  28. ScriptCollection/TestKind.py +41 -0
  29. {scriptcollection-4.4.1.dist-info → scriptcollection-4.4.4.dist-info}/METADATA +168 -168
  30. {scriptcollection-4.4.1.dist-info → scriptcollection-4.4.4.dist-info}/RECORD +22 -18
  31. {scriptcollection-4.4.1.dist-info → scriptcollection-4.4.4.dist-info}/WHEEL +0 -0
  32. {scriptcollection-4.4.1.dist-info → scriptcollection-4.4.4.dist-info}/entry_points.txt +0 -0
  33. {scriptcollection-4.4.1.dist-info → scriptcollection-4.4.4.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,188 @@
1
+ import os
2
+ import re
3
+ import json
4
+ import shutil
5
+ import requests
6
+ from lxml import etree
7
+ from ...GeneralUtilities import GeneralUtilities, Dependency
8
+ from ...SCLog import LogLevel
9
+ from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base, TFCPS_CodeUnitSpecific_Base_CLI
10
+
11
+ class TFCPS_CodeUnitSpecific_TypeScript_Functions(TFCPS_CodeUnitSpecific_Base):
12
+ """Implements the tasks of a codeunit which contains a plain typescript-project.
13
+
14
+ The typescript-project is expected in "<codeunit>/<codeunit>" and it contains its testcases in the same
15
+ project, because a testcase of a typescript-project belongs next to the file it tests and because the
16
+ compiler has to see the testcases and the sourcecode as one program to be able to check the types of both.
17
+
18
+ This implementation exists next to TFCPS_CodeUnitSpecific_NodeJS: the nodejs-implementation delegates
19
+ every task to a script of the package-file, which means every codeunit has to define the same set of
20
+ scripts itself. This implementation calls the tools directly instead, so a codeunit only has to declare
21
+ the dependencies and the configuration of those tools."""
22
+
23
+ def __init__(self, current_file: str, verbosity: LogLevel, targetenvironmenttype: str, use_cache: bool, is_pre_merge: bool):
24
+ super().__init__(current_file, verbosity, targetenvironmenttype, use_cache, is_pre_merge)
25
+
26
+ @GeneralUtilities.check_arguments
27
+ def get_typescript_project_folder(self) -> str:
28
+ """Returns the folder which contains the package-file of this codeunit."""
29
+ return os.path.join(self.get_codeunit_folder(), self.get_codeunit_name())
30
+
31
+ @GeneralUtilities.check_arguments
32
+ def get_package_json_file(self) -> str:
33
+ return os.path.join(self.get_typescript_project_folder(), "package.json")
34
+
35
+ @GeneralUtilities.check_arguments
36
+ def build(self) -> None:
37
+ # The sourcecode-artifact of a previous run is removed before the build, because it is a copy of the
38
+ # codeunit inside the codeunit. The compiler would otherwise see the copied sourcecode as part of the
39
+ # program and would report every declaration of it as a duplicate.
40
+ GeneralUtilities.ensure_directory_does_not_exist(os.path.join(self.get_artifacts_folder(), "SourceCode"))
41
+ build_output_folder = os.path.join(self.get_typescript_project_folder(), "dist")
42
+ GeneralUtilities.ensure_directory_does_not_exist(build_output_folder)
43
+ self.__run_npx("tsc --project tsconfig.json")
44
+ GeneralUtilities.assert_condition(os.path.isdir(build_output_folder), f'The compilation did not produce an output in "{build_output_folder}".')
45
+ target_folder = os.path.join(self.get_artifacts_folder(), "BuildResult_TypeScript")
46
+ GeneralUtilities.ensure_directory_does_not_exist(target_folder)
47
+ shutil.copytree(build_output_folder, target_folder)
48
+ self.__generate_bom_for_typescript_project()
49
+ self.copy_source_files_to_output_directory()
50
+
51
+ @GeneralUtilities.check_arguments
52
+ def __generate_bom_for_typescript_project(self) -> None:
53
+ codeunit_version = self.tfcps_Tools_General.get_version_of_codeunit(self.get_codeunit_file())
54
+ bom_folder = os.path.join(self.get_artifacts_folder(), "BOM")
55
+ GeneralUtilities.ensure_directory_exists(bom_folder)
56
+ target_bom_file = os.path.join(bom_folder, f"{self.get_codeunit_name()}.{codeunit_version}.bom.xml")
57
+ # The output-file is passed as a path which is relative to the project-folder, because cyclonedx-npm
58
+ # resolves it against its working-directory.
59
+ relative_target_bom_file = os.path.relpath(target_bom_file, self.get_typescript_project_folder()).replace("\\", "/")
60
+ self.__run_npx(f"@cyclonedx/cyclonedx-npm --output-format xml --output-file {relative_target_bom_file}")
61
+ GeneralUtilities.assert_file_exists(target_bom_file)
62
+ self._protected_sc.format_xml_file(target_bom_file)
63
+
64
+ @GeneralUtilities.check_arguments
65
+ def linting(self) -> None:
66
+ codeunit_folder = self.get_codeunit_folder()
67
+ self._protected_sc.normalize_invisible_characters_of_files_in_folder(codeunit_folder, ["ts", "js", "json"])
68
+ # "--max-warnings 0" makes a warning fail the linting as well, because a warning is a linting-issue too.
69
+ self.__run_npx("eslint . --max-warnings 0")
70
+
71
+ @GeneralUtilities.check_arguments
72
+ def do_common_tasks(self, current_codeunit_version: str) -> None:
73
+ self.do_common_tasks_base(current_codeunit_version)
74
+ self.tfcps_Tools_General.replace_version_in_packagejson_file(self.get_package_json_file(), current_codeunit_version)
75
+ self.tfcps_Tools_General.do_npm_install(self.get_typescript_project_folder(), True, self.use_cache())
76
+
77
+ @GeneralUtilities.check_arguments
78
+ def generate_reference(self) -> None:
79
+ # docfx can not extract a class-reference from typescript-sourcecode, so only the articles of the
80
+ # reference-content are generated.
81
+ self.generate_reference_using_docfx()
82
+
83
+ @GeneralUtilities.check_arguments
84
+ def run_testcases(self) -> None:
85
+ codeunit_name = self.get_codeunit_name()
86
+ coverage_folder = os.path.join(self.get_artifacts_folder(), "TestCoverage")
87
+ GeneralUtilities.ensure_directory_exists(coverage_folder)
88
+ coverage_file = os.path.join(coverage_folder, "TestCoverage.xml")
89
+ GeneralUtilities.ensure_file_does_not_exist(coverage_file)
90
+ generated_coverage_file = os.path.join(self.get_typescript_project_folder(), "coverage", "cobertura-coverage.xml")
91
+ GeneralUtilities.ensure_file_does_not_exist(generated_coverage_file)
92
+ self.__run_npx("jest --coverage --coverageReporters=cobertura")
93
+ GeneralUtilities.assert_file_exists(generated_coverage_file)
94
+ shutil.move(generated_coverage_file, coverage_file)
95
+ self.__normalize_coverage_file(coverage_file)
96
+ self.run_testcases_common_post_task(self.get_repository_folder(), codeunit_name, True, self.get_target_environment_type())
97
+
98
+ @GeneralUtilities.check_arguments
99
+ def __normalize_coverage_file(self, coverage_file: str) -> None:
100
+ """Makes the coverage-report which jest wrote match the expectations of the further processing: it must
101
+ contain exactly one package which is named like the codeunit, and the filename of a class must be
102
+ relative to the codeunit-folder, while jest writes it relative to the project-folder."""
103
+ codeunit_name = self.get_codeunit_name()
104
+ tree = etree.parse(coverage_file)
105
+ root = tree.getroot()
106
+ for package in root.findall(".//package"):
107
+ package.set("name", codeunit_name)
108
+ for class_element in root.findall(".//class"):
109
+ filename = class_element.get("filename")
110
+ if filename is not None:
111
+ filename_with_slashes = filename.replace("\\", "/")
112
+ class_element.set("filename", f"{codeunit_name}/{filename_with_slashes}")
113
+ class_element.set("name", os.path.basename(filename_with_slashes))
114
+ tree.write(coverage_file, pretty_print=True, xml_declaration=True, encoding="UTF-8")
115
+ self.tfcps_Tools_General.merge_packages(coverage_file, codeunit_name)
116
+
117
+ @GeneralUtilities.check_arguments
118
+ def __run_npx(self, arguments: str) -> None:
119
+ # The tools are run through npx instead of through a script of the package-file, so that a codeunit does
120
+ # not have to define a script for every task. "--no-install" makes npx fail instead of downloading a tool
121
+ # which the package-file does not declare, because a build must not depend on what npx finds online.
122
+ self._protected_sc.run_with_epew("npx", f"--no-install {arguments}", self.get_typescript_project_folder(), print_live_output=self.get_verbosity() == LogLevel.Debug, encode_argument_in_base64=True)
123
+
124
+ @GeneralUtilities.check_arguments
125
+ def get_dependencies(self) -> dict[str, set[str]]:
126
+ return GeneralUtilities.merge_dependency_lists([self.__get_dependencies_from_package_json_file()])
127
+
128
+ @GeneralUtilities.check_arguments
129
+ def __get_dependencies_from_package_json_file(self) -> list[Dependency]:
130
+ result: list[Dependency] = []
131
+ for name, dependency_version in self.__enumerate_dependency_entries():
132
+ result.append(Dependency(name, dependency_version))
133
+ return result
134
+
135
+ @GeneralUtilities.check_arguments
136
+ def __enumerate_dependency_entries(self) -> list[tuple[str, str]]:
137
+ """Returns the dependencies of the package-file as tuples of their name and their version. Only a
138
+ dependency whose version is a plain version-number is returned, because a dependency which points to a
139
+ file, a repository or a tag has no version which could be updated."""
140
+ content = json.loads(GeneralUtilities.read_text_from_file(self.get_package_json_file()))
141
+ result: list[tuple[str, str]] = []
142
+ for section in ("dependencies", "devDependencies"):
143
+ for name, declared_version in content.get(section, {}).items():
144
+ # A declared version usually carries a range-prefix ("^1.2.3" or "~1.2.3"), which is not part of
145
+ # the version itself.
146
+ version_without_prefix = declared_version.lstrip("^~")
147
+ if re.match(r"^\d+\.\d+\.\d+$", version_without_prefix) is not None:
148
+ result.append((name, version_without_prefix))
149
+ return result
150
+
151
+ @GeneralUtilities.check_arguments
152
+ def get_available_versions(self, dependencyname: str) -> list[str]:
153
+ # The registry of npm answers with all published versions of a package.
154
+ response = requests.get(f"https://registry.npmjs.org/{dependencyname}", headers={"Accept": "application/vnd.npm.install-v1+json"}, timeout=60)
155
+ response.raise_for_status()
156
+ result: list[str] = []
157
+ for version_string in response.json().get("versions", {}).keys():
158
+ if re.match(r"^\d+\.\d+\.\d+$", version_string) is not None:
159
+ result.append(version_string)
160
+ return result
161
+
162
+ @GeneralUtilities.check_arguments
163
+ def set_dependency_version(self, name: str, new_version: str) -> None:
164
+ package_json_file = self.get_package_json_file()
165
+ content = json.loads(GeneralUtilities.read_text_from_file(package_json_file))
166
+ dependency_was_set: bool = False
167
+ for section in ("dependencies", "devDependencies"):
168
+ if name in content.get(section, {}):
169
+ # The range-prefix of the former declaration is kept, because it states how the project wants to
170
+ # accept updates and that is not a decision of this function.
171
+ former_declaration = content[section][name]
172
+ prefix = former_declaration[0] if former_declaration[0] in ("^", "~") else GeneralUtilities.empty_string
173
+ content[section][name] = f"{prefix}{new_version}"
174
+ dependency_was_set = True
175
+ GeneralUtilities.assert_condition(dependency_was_set, f'The package-file "{package_json_file}" does not contain a dependency which is named "{name}".')
176
+ GeneralUtilities.write_text_to_file(package_json_file, json.dumps(content, indent=2, ensure_ascii=False) + "\n")
177
+ self._protected_sc.format_json_file(package_json_file)
178
+
179
+ class TFCPS_CodeUnitSpecific_TypeScript_CLI:
180
+
181
+ @staticmethod
182
+ @GeneralUtilities.check_arguments
183
+ def parse(file: str) -> TFCPS_CodeUnitSpecific_TypeScript_Functions:
184
+ parser = TFCPS_CodeUnitSpecific_Base_CLI.get_base_parser()
185
+ #add custom parameter if desired
186
+ args = parser.parse_args()
187
+ result: TFCPS_CodeUnitSpecific_TypeScript_Functions = TFCPS_CodeUnitSpecific_TypeScript_Functions(file, LogLevel(int(args.verbosity)), args.targetenvironmenttype, not args.nocache, args.ispremerge)
188
+ return result
File without changes
@@ -0,0 +1,41 @@
1
+ # This file is generated by "UpdateDependencies.py" based on "https://raw.githubusercontent.com/anionDevelopment/GRYLibrary/refs/heads/main/GRYLibrary/GRYLibrary/Misc/TestKind.cs". Do not edit it manually.
2
+
3
+ from enum import Enum
4
+
5
+
6
+ class TestKind(Enum):
7
+ # Tests that a component work like defined.
8
+ UnitTest = 0
9
+
10
+ # Tests that 2 (or more) components work together like defined.
11
+ IntegrationTest = 1
12
+
13
+ # Tests that are always skipped when committing but can be useful to do or debug a certain task/function.
14
+ DebugHelperTest = 2
15
+
16
+ # Tests that a specific bug does not happen anymore.
17
+ RegressionTest = 3
18
+
19
+ # Tests that other required systems/services used by the function under test are still available and work like specified so that the function under test is able to be working correctly.
20
+ SystemTest = 4
21
+
22
+ # Tests that will be done by reflection to assert a certain property for all types or all methods or all attributes in a certain scope.
23
+ ReflectionTest = 5
24
+
25
+ # Tests that are always skipped when committing but can be useful to demonstrate a certain thing/function.
26
+ DemonstrationTest = 6
27
+
28
+ # Tests that verifies a certain performance for a certain operation. Testcases of this kind often require appropriate hardware.
29
+ PerformanceTest = 7
30
+
31
+ # Tests that verifies that the entire communication between 2 systems is working correctly including serialization, transport and deserialization.
32
+ EndToEndTest = 8
33
+
34
+ # Test that only generates build-artifacts.
35
+ GenerationTest = 9
36
+
37
+ # Smoke testing refers to various classes of tests of systems, usually intended to determine whether they are ready for more robust testing.
38
+ SmokeTest = 10
39
+
40
+ def __int__(self):
41
+ return self.value
@@ -1,168 +1,168 @@
1
- Metadata-Version: 2.4
2
- Name: scriptcollection
3
- Version: 4.4.1
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
- [![Supported Python versions](https://img.shields.io/pypi/pyversions/ScriptCollection.svg)](https://pypi.org/project/ScriptCollection/)
51
- ![PyPI](https://img.shields.io/pypi/v/ScriptCollection)
52
- ![Dependencies](https://img.shields.io/librariesio/github/anionDevevlopment/ScriptCollection)
53
-
54
- [![CodeFactor](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/badge/main)](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
55
- [![Downloads](https://pepy.tech/badge/scriptcollection)](https://pepy.tech/project/scriptcollection)
56
- ![Coverage](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/ScriptCollection/Other/Resources/TestCoverageBadges/badge_shieldsio_linecoverage_blue.svg)
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.4.4
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
+ [![Supported Python versions](https://img.shields.io/pypi/pyversions/ScriptCollection.svg)](https://pypi.org/project/ScriptCollection/)
51
+ ![PyPI](https://img.shields.io/pypi/v/ScriptCollection)
52
+ ![Dependencies](https://img.shields.io/librariesio/github/anionDevevlopment/ScriptCollection)
53
+
54
+ [![CodeFactor](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/badge/main)](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
55
+ [![Downloads](https://pepy.tech/badge/scriptcollection)](https://pepy.tech/project/scriptcollection)
56
+ ![Coverage](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/ScriptCollection/Other/Resources/TestCoverageBadges/badge_shieldsio_linecoverage_blue.svg)
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.