ScriptCollection 4.3.38__py3-none-any.whl → 4.3.41__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.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -38,7 +38,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
38
38
  from .ProgramRunnerPopen import ProgramRunnerPopen
39
39
  from .SCLog import SCLog, LogLevel
40
40
 
41
- version = "4.3.38"
41
+ version = "4.3.41"
42
42
  __version__ = version
43
43
 
44
44
  class VSCodeWorkspaceShellTask:
@@ -209,8 +209,6 @@ class ScriptCollectionCore:
209
209
  self.call_program_runner_directly = None
210
210
  self.__mocked_program_calls = list[ScriptCollectionCore.__MockProgramCall]()
211
211
  self.log = SCLog(None, LogLevel.Warning, False)
212
- # in-memory-cache (first level) for the result of __get_next_version_from_gitversion (which performs an expensive clone) keyed by (repository_folder, commit_id, branch_name); a persistent second-level cache-file below the repository is used additionally. the result only depends on the committed state and the branch-name, so this key invalidates itself as soon as a new commit is created or another branch/commit is checked out
213
- self.__next_gitversion_cache = dict[tuple[str, str, str], str]()
214
212
 
215
213
  @staticmethod
216
214
  @GeneralUtilities.check_arguments
@@ -2533,43 +2531,6 @@ class ScriptCollectionCore:
2533
2531
  result = "0.1.0"
2534
2532
  return result
2535
2533
 
2536
- @GeneralUtilities.check_arguments
2537
- def __get_next_version_from_gitversion(self, repository_folder: str, branch_name: str) -> str:
2538
- """
2539
- Computes the version gitversion would assign to the next commit on the given branch.
2540
- This is needed when the current commit is exactly on a tag but the repository has uncommitted changes:
2541
- gitversion treats a tagged commit as a released version and therefore reports the tag-version itself,
2542
- so its result does not reflect that the uncommitted changes will lead to a new (incremented) version.
2543
- Instead of reimplementing gitversion's increment-logic (which is configured per project in GitVersion.yml
2544
- and would inevitably drift from it), a disposable clone is created in which the branch is reproduced and an
2545
- empty commit is added. Gitversion then computes the increment itself - based on the branch-name/-prefix and
2546
- the repository's own GitVersion.yml - while the original working-directory stays untouched.
2547
- Because the result only depends on the committed state and the branch-name, it is memoized per
2548
- (repository_folder, commit_id, branch_name). The in-memory-cache avoids re-cloning within a single process
2549
- (e. g. the many calls during one scbuildcodeunits-run); a persistent cache-file below the repository additionally
2550
- avoids re-cloning across separate process-invocations.
2551
- """
2552
- commit_id = self.git_get_commit_id(repository_folder)
2553
- cache_key = (repository_folder, commit_id, branch_name)
2554
- if cache_key in self.__next_gitversion_cache:#TODO remove __next_gitversion_cache (disk-cache is enough, transient cache here is unnecessary)
2555
- return self.__next_gitversion_cache[cache_key]
2556
- persisted_result = self.__read_next_version_from_disk_cache(repository_folder, commit_id, branch_name)
2557
- if persisted_result is not None:
2558
- self.__next_gitversion_cache[cache_key] = persisted_result
2559
- return persisted_result
2560
- temp_folder = os.path.join(GeneralUtilities.get_temp_folder(), str(uuid.uuid4()))
2561
- try:
2562
- self.git_clone(temp_folder, repository_folder, include_submodules=False)
2563
- # the local clone already checks out the source's current branch on the tagged commit; the explicit checkout only guarantees gitversion sees the correct branch-name (and thus the correct increment-rule)
2564
- self.run_program_argsasarray("git", ["checkout", branch_name], temp_folder, throw_exception_if_exitcode_is_not_zero=True)
2565
- self.run_program("git","-c user.name=\"noname\" -c user.email=\"noname@example.com\" commit -m empty --quiet --allow-empty", temp_folder)
2566
- result = self.get_version_from_gitversion(temp_folder, "MajorMinorPatch")
2567
- self.__next_gitversion_cache[cache_key] = result
2568
- self.__write_next_version_to_disk_cache(repository_folder, commit_id, branch_name, result)
2569
- return result
2570
- finally:
2571
- GeneralUtilities.ensure_directory_does_not_exist(temp_folder)
2572
-
2573
2534
  @GeneralUtilities.check_arguments
2574
2535
  def get_scriptcollection_repository_cache_folder(self, repository_folder: str) -> str:
2575
2536
  return os.path.join(repository_folder, ".ScriptCollection", "Cache")
@@ -2583,37 +2544,6 @@ class ScriptCollectionCore:
2583
2544
  lines = ["/Cache/"]
2584
2545
  GeneralUtilities.write_lines_to_file(gitignore_file, lines)
2585
2546
 
2586
- @GeneralUtilities.check_arguments
2587
- def __get_next_version_disk_cache_file(self, repository_folder: str) -> str:
2588
- return os.path.join(self.get_scriptcollection_repository_cache_folder(repository_folder), "GitVersionNextVersion.txt")
2589
-
2590
- @GeneralUtilities.check_arguments
2591
- def __read_next_version_from_disk_cache(self, repository_folder: str, commit_id: str, branch_name: str) -> str:
2592
- # returns None if there is no cached entry for the given commit and branch. the entries use a tab as separator because git-ref-names can not contain tabs (or any other control-character), so the branch-name can never collide with the separator.
2593
- cache_file = self.__get_next_version_disk_cache_file(repository_folder)
2594
- GeneralUtilities.ensure_directory_exists(os.path.dirname(cache_file))
2595
- GeneralUtilities.ensure_file_exists(cache_file)
2596
- for line in GeneralUtilities.read_nonempty_lines_from_file(cache_file):
2597
- parts = line.split("\t")
2598
- if len(parts) == 3 and parts[0] == commit_id and parts[1] == branch_name:
2599
- return parts[2]
2600
- return None
2601
-
2602
- @GeneralUtilities.check_arguments
2603
- def __write_next_version_to_disk_cache(self, repository_folder: str, commit_id: str, branch_name: str, version_to_cache: str) -> None:
2604
- # the cache-file lives below ".ScriptCollection/Cache"; ensure the .gitignore is set up first so writing the cache never introduces uncommitted changes.
2605
- self.ensure_scriptcollection_gitignore_is_setup(repository_folder)
2606
- cache_file = self.__get_next_version_disk_cache_file(repository_folder)
2607
- GeneralUtilities.ensure_directory_exists(os.path.dirname(cache_file))
2608
- lines = []
2609
- if os.path.isfile(cache_file):
2610
- for line in GeneralUtilities.read_nonempty_lines_from_file(cache_file):
2611
- parts = line.split("\t")
2612
- if not (len(parts) == 3 and parts[0] == commit_id and parts[1] == branch_name):
2613
- lines.append(line)
2614
- lines.append(f"{commit_id}\t{branch_name}\t{version_to_cache}")
2615
- GeneralUtilities.write_lines_to_file(cache_file, lines)
2616
-
2617
2547
  @GeneralUtilities.check_arguments
2618
2548
  def check_python_ast(self, path: str) -> list[tuple[str, int, int, str]]:
2619
2549
  """
@@ -114,7 +114,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
114
114
  self.__collect_metrics()
115
115
  self.__generate_loc_diagram()
116
116
 
117
- except Exception as exception:
117
+ except Exception:
118
118
  error_occurred=True
119
119
  raise
120
120
  finally:
@@ -205,12 +205,18 @@ class TFCPS_CodeUnit_BuildCodeUnits:
205
205
  if test:
206
206
  scbuildcodeunits_arguments=["bash","-c", "pip3 install scriptcollection --upgrade && scshowversion && "+" ".join(scbuildcodeunits_arguments)]
207
207
 
208
+ #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.
209
+ env_arguments: list[str] = []
210
+ for env_variable_name, env_variable_value in self.tfcps_tools_general.get_required_env_variables(self.repository).items():
211
+ env_arguments += ["-e", f"{env_variable_name}={env_variable_value}"]
212
+
208
213
  #run scbuildcodeunits inside the SCBuilder-image. base_mount_folder is mounted into the container (covering the repository and, for submodules, its real gitdir) and the docker-socket is forwarded because codeunit-builds often start containers (for example local test-services).
209
214
  docker_arguments = [
210
215
  "run", "--rm",
211
216
  "-v", f"{base_mount_folder}:{container_base_mount_folder}",
212
217
  "-v", "/var/run/docker.sock:/var/run/docker.sock",
213
218
  "-w", container_repository_folder,
219
+ ] + env_arguments + [
214
220
  image,
215
221
  ] + scbuildcodeunits_arguments
216
222
  self.sc.log.log(f"Build codeunits in container using image \"{image}\"...")
@@ -452,6 +452,41 @@ class TFCPS_Tools_General:
452
452
  root: etree._ElementTree = etree.parse(product_information_file)
453
453
  return str(root.xpath('/cps:productinformation/cps:producttitle/text()', namespaces={'cps': 'https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure'})[0])
454
454
 
455
+ @GeneralUtilities.check_arguments
456
+ def get_required_env_variables_file(self, repository: str) -> str:
457
+ return os.path.join(repository, ".ScriptCollection", "RequiredEnvVariables.csv")
458
+
459
+ @GeneralUtilities.check_arguments
460
+ def get_required_env_variables(self, repository: str) -> dict[str, str]:
461
+ """Reads '<repository>/.ScriptCollection/RequiredEnvVariables.csv' and resolves the value of each environment-variable
462
+ defined in it. The file is optional; if it does not exist an empty dict is returned. Columns: EnvVariableName;Kind;Value.
463
+ 'Kind' is one of 'literal' (Value is used as-is), 'hostenvvariable' (Value is the name of an environment-variable which
464
+ must be set on the host-system) or 'file' (Value is a path - resolved relative to the repository if not absolute - to a
465
+ text-file whose content, without a trailing linebreak, is used). This function centralizes that resolution so every
466
+ caller which needs these environment-variables (for example to pass them into a build-container) obtains identical
467
+ values instead of re-implementing the resolution-logic."""
468
+ result: dict[str, str] = {}
469
+ file = self.get_required_env_variables_file(repository)
470
+ if not os.path.isfile(file):
471
+ return result
472
+ allowed_kinds = ["literal", "hostenvvariable", "file"]
473
+ for entry in GeneralUtilities.read_csv_file(file, True):
474
+ env_variable_name = entry[0]
475
+ kind = entry[1]
476
+ value = entry[2]
477
+ 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)}.")
478
+ if kind == "literal":
479
+ resolved_value = value
480
+ elif kind == "hostenvvariable":
481
+ resolved_value = os.environ.get(value)
482
+ 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.")
483
+ else: # file
484
+ value_file = GeneralUtilities.resolve_relative_path(value, repository)
485
+ 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.")
486
+ resolved_value = GeneralUtilities.read_text_from_file(value_file).strip()
487
+ result[env_variable_name] = resolved_value
488
+ return result
489
+
455
490
  @GeneralUtilities.check_arguments
456
491
  def set_constant(self, codeunit_folder: str, constantname: str, constant_value: str, documentationsummary: str = None, constants_valuefile: str = None) -> None:
457
492
  self.assert_is_codeunit_folder(codeunit_folder)
@@ -1,168 +1,168 @@
1
- Metadata-Version: 2.4
2
- Name: scriptcollection
3
- Version: 4.3.38
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.14.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.13.3
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.1
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.3.41
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.14.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.13.3
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.1
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.
@@ -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=S738N-NiplR71ghq0kP5eVy6LaLVPaLvQdBHRmh08Ts,248155
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=lFYMQk5mIZ-O0tynxIA2XWjo5TOCVyyhRp0qW9_24SQ,242342
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
@@ -35,14 +35,14 @@ ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html,sha256=CX9S1bdOz
35
35
  ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=rpuwSsQ6YQfZS2LGnvOH5ql8zs_-cHU4LQttS7XNT60,11272
36
36
  ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=H9FWlS6BPK-UWJXdWN686ePky4Hq-Q13T0Kx8HSJu7s,34990
37
37
  ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Ll5EOkpVpPiFrM2mLeQXolaF7075IwgtnHXvfdpkH4k,9904
38
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=pfxZC4b2dPOpDC1Zm0upyk9Bv0vhLn4gcV2nbcBdesA,30620
38
+ ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=EQsFmC58CpImT_SOuJ7gm4uNVQ2_2sB81zf9PULfW2M,31101
39
39
  ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=X2NgZgbOkJsdZ6wMHB_RuS_rQCuz5oQCqzYrxyXBN9Q,6680
40
40
  ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=5vCFfDiU8bvfcnoKNs2ATS8nsl6mYXcIuX7XfYE0tvg,2116
41
41
  ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=zp7n0Li7GTi4tERDMgDcJ-o3m6131m31zvkat0lALEc,7781
42
42
  ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=jQ0B3yq45we-8a0KuNFMfXCk9MfzPpTv2QgDWMN34x4,22792
43
43
  ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=JYiDqDsfVJQWS9xWMi_UzfXnXsJRnPRxAzFr82bUEvI,2370
44
44
  ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=Z8Gw-j5I7VPafHEsVeQJ2gTTKVLAnnhwZhY8IVTi2Qk,11867
45
- ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=82RMd3A9kAGT2H3XXLbQNXGwYcGitQnSOBmlsXGDL2g,127618
45
+ ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=QnMIJ0Bsk6Zkjz_kRFhP4guRAT_TlrQwPV6T-o0tD2A,130301
46
46
  ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=wS2yzYUmJ4m0cf6cBYVTHsiXSXfYhHoLFFy8x6yEQvY,19573
48
48
  ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -63,8 +63,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb
63
63
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
65
65
  ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
- scriptcollection-4.3.38.dist-info/METADATA,sha256=NYNwCoir0Ga386JGJOpKVGzx3JpqAurMbcBdjyoLOiQ,7816
67
- scriptcollection-4.3.38.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
68
- scriptcollection-4.3.38.dist-info/entry_points.txt,sha256=Iq9YMSTWNCAJpBzM5L9CQx80tL9-XUu6MzDRAdBrIPg,5875
69
- scriptcollection-4.3.38.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
70
- scriptcollection-4.3.38.dist-info/RECORD,,
66
+ scriptcollection-4.3.41.dist-info/METADATA,sha256=9TT88LOEyiAy-BNnva-K9oZKk60GIRNp7IE_INK9724,7648
67
+ scriptcollection-4.3.41.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
68
+ scriptcollection-4.3.41.dist-info/entry_points.txt,sha256=Iq9YMSTWNCAJpBzM5L9CQx80tL9-XUu6MzDRAdBrIPg,5875
69
+ scriptcollection-4.3.41.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
70
+ scriptcollection-4.3.41.dist-info/RECORD,,