ScriptCollection 3.5.17__py3-none-any.whl → 3.5.19__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/Executables.py +2 -1
- ScriptCollection/ScriptCollectionCore.py +10 -8
- ScriptCollection/TasksForCommonProjectStructure.py +69 -1
- {ScriptCollection-3.5.17.dist-info → ScriptCollection-3.5.19.dist-info}/METADATA +10 -10
- {ScriptCollection-3.5.17.dist-info → ScriptCollection-3.5.19.dist-info}/RECORD +8 -8
- {ScriptCollection-3.5.17.dist-info → ScriptCollection-3.5.19.dist-info}/WHEEL +0 -0
- {ScriptCollection-3.5.17.dist-info → ScriptCollection-3.5.19.dist-info}/entry_points.txt +0 -0
- {ScriptCollection-3.5.17.dist-info → ScriptCollection-3.5.19.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
|
@@ -362,10 +362,11 @@ def GenerateARC42ReferenceTemplate() -> int:
|
|
|
362
362
|
parser = argparse.ArgumentParser()
|
|
363
363
|
parser.add_argument('-f', '--folder', required=False)
|
|
364
364
|
parser.add_argument('-p', '--productname', required=False)
|
|
365
|
+
parser.add_argument('-s', '--subfolder', required=False)
|
|
365
366
|
args = parser.parse_args()
|
|
366
367
|
|
|
367
368
|
folder = args.folder
|
|
368
369
|
if folder is None:
|
|
369
370
|
folder = os.getcwd()
|
|
370
|
-
ScriptCollectionCore().generate_arc42_reference_template(folder, args.productname)
|
|
371
|
+
ScriptCollectionCore().generate_arc42_reference_template(folder, args.productname, args.subfolder)
|
|
371
372
|
return 0
|
|
@@ -30,7 +30,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
30
30
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
31
31
|
from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
|
|
32
32
|
|
|
33
|
-
version = "3.5.
|
|
33
|
+
version = "3.5.19"
|
|
34
34
|
__version__ = version
|
|
35
35
|
|
|
36
36
|
|
|
@@ -1604,7 +1604,7 @@ DNS = {domain}
|
|
|
1604
1604
|
# Relevant output-lines are something like " > NJsonSchema 10.7.0 10.7.0 10.9.0"
|
|
1605
1605
|
if ">" in line:
|
|
1606
1606
|
package_name = line.replace(">", "").strip().split(" ")[0]
|
|
1607
|
-
if not (
|
|
1607
|
+
if not (package_name in ignored_dependencies):
|
|
1608
1608
|
GeneralUtilities.write_message_to_stderr(f"Update package {package_name}")
|
|
1609
1609
|
self.run_program("dotnet", f"add {csproj_filename} package {package_name}", folder)
|
|
1610
1610
|
|
|
@@ -1757,11 +1757,13 @@ chmod {permission} {link_file}
|
|
|
1757
1757
|
""".replace("XDX", "ODO"))
|
|
1758
1758
|
|
|
1759
1759
|
@GeneralUtilities.check_arguments
|
|
1760
|
-
def generate_arc42_reference_template(self, repository: str, productname: str = None):
|
|
1760
|
+
def generate_arc42_reference_template(self, repository: str, productname: str = None, subfolder: str = None):
|
|
1761
1761
|
productname: str
|
|
1762
1762
|
if productname is None:
|
|
1763
1763
|
productname = os.path.basename(repository)
|
|
1764
|
-
|
|
1764
|
+
if subfolder is None:
|
|
1765
|
+
subfolder = "Other/Resources/Reference"
|
|
1766
|
+
reference_root_folder = f"{repository}/{subfolder}"
|
|
1765
1767
|
reference_content_folder = reference_root_folder + "/Technical"
|
|
1766
1768
|
if os.path.isdir(reference_root_folder):
|
|
1767
1769
|
raise ValueError(f"The folder '{reference_root_folder}' does already exist.")
|
|
@@ -1780,11 +1782,11 @@ TXDX add minimal service-description here.
|
|
|
1780
1782
|
|
|
1781
1783
|
TXDX
|
|
1782
1784
|
|
|
1783
|
-
|
|
1785
|
+
## Quality goals
|
|
1784
1786
|
|
|
1785
|
-
|
|
1787
|
+
TXDX
|
|
1786
1788
|
|
|
1787
|
-
|
|
1789
|
+
## Stakeholder
|
|
1788
1790
|
|
|
1789
1791
|
| Name | How to contact | Reason |
|
|
1790
1792
|
| ---- | -------------- | ------ |""")
|
|
@@ -1803,7 +1805,7 @@ TXDX
|
|
|
1803
1805
|
|
|
1804
1806
|
## Scope
|
|
1805
1807
|
|
|
1806
|
-
|
|
1808
|
+
TXDX""")
|
|
1807
1809
|
self.__add_chapter(main_reference_file, reference_content_folder, 4, 'Solution Strategy', """TXDX""")
|
|
1808
1810
|
self.__add_chapter(main_reference_file, reference_content_folder, 5, 'Building Block View', """TXDX""")
|
|
1809
1811
|
self.__add_chapter(main_reference_file, reference_content_folder, 6, 'Runtime View', """TXDX""")
|
|
@@ -1840,6 +1840,74 @@ class TasksForCommonProjectStructure:
|
|
|
1840
1840
|
self.__sc.run_program("swagger", f"tofile --output {versioned_api_spec_file} BuildResult_DotNet_{runtime}/{codeunitname}.dll {swagger_document_name}", artifacts_folder, verbosity=verbosity)
|
|
1841
1841
|
shutil.copyfile(os.path.join(artifacts_folder, versioned_api_spec_file), os.path.join(artifacts_folder, f"APISpecification/{codeunitname}.latest.api.json"))
|
|
1842
1842
|
|
|
1843
|
+
@GeneralUtilities.check_arguments
|
|
1844
|
+
def ensure_openapigenerator_is_available(self, codeunit_folder: str) -> None:
|
|
1845
|
+
openapigenerator_folder = os.path.join(codeunit_folder, "Other", "Resources", "OpenAPIGenerator")
|
|
1846
|
+
internet_connection_is_available = GeneralUtilities.internet_connection_is_available()
|
|
1847
|
+
filename = "open-api-generator.jar"
|
|
1848
|
+
jar_file = f"{openapigenerator_folder}/{filename}"
|
|
1849
|
+
jar_file_exists = os.path.isfile(jar_file)
|
|
1850
|
+
if internet_connection_is_available: # Load/Update
|
|
1851
|
+
github_api_releases_link = "https://api.github.com/repos/OpenAPITools/openapi-generator/releases"
|
|
1852
|
+
with urllib.request.urlopen(github_api_releases_link) as release_information_url:
|
|
1853
|
+
latest_release_infos = json.load(release_information_url)[0]
|
|
1854
|
+
latest_version = latest_release_infos["tag_name"][1:]
|
|
1855
|
+
download_link = f"https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/{latest_version}/openapi-generator-cli-{latest_version}.jar"
|
|
1856
|
+
GeneralUtilities.ensure_directory_does_not_exist(openapigenerator_folder)
|
|
1857
|
+
GeneralUtilities.ensure_directory_exists(openapigenerator_folder)
|
|
1858
|
+
urllib.request.urlretrieve(download_link, jar_file)
|
|
1859
|
+
else:
|
|
1860
|
+
if jar_file_exists:
|
|
1861
|
+
GeneralUtilities.write_message_to_stdout("Warning: Can not check for updates of OpenAPIGenerator due to missing internet-connection.")
|
|
1862
|
+
else:
|
|
1863
|
+
raise ValueError("Can not download OpenAPIGenerator.")
|
|
1864
|
+
|
|
1865
|
+
def generate_api_client_from_dependent_codeunit_in_dotnet(self, file: str, name_of_api_providing_codeunit: str, base_namespace: str) -> None:
|
|
1866
|
+
codeunit_folder = GeneralUtilities.resolve_relative_path("../..", file)
|
|
1867
|
+
codeunit_name = os.path.basename(codeunit_folder)
|
|
1868
|
+
client_subpath = f"{codeunit_name}/APIClients/{name_of_api_providing_codeunit}"
|
|
1869
|
+
namespace = f"{base_namespace}.APIClients.{name_of_api_providing_codeunit}"
|
|
1870
|
+
self.generate_api_client_from_dependent_codeunit(file, name_of_api_providing_codeunit, client_subpath, "csharp", f"--additional-properties packageName={namespace}")
|
|
1871
|
+
|
|
1872
|
+
def generate_api_client_from_dependent_codeunit(self, file: str, name_of_api_providing_codeunit: str, target_subfolder_in_codeunit: str, language: str, additional_properties: str) -> None:
|
|
1873
|
+
codeunit_folder = GeneralUtilities.resolve_relative_path("../..", file)
|
|
1874
|
+
self.ensure_openapigenerator_is_available(codeunit_folder)
|
|
1875
|
+
openapigenerator_jar_file = os.path.join(codeunit_folder, "Other", "Resources", "OpenAPIGenerator", "open-api-generator.jar")
|
|
1876
|
+
openapi_spec_file = os.path.join(codeunit_folder, "Other", "Resources", "DependentCodeUnits", name_of_api_providing_codeunit, "APISpecification", f"{name_of_api_providing_codeunit}.latest.api.json")
|
|
1877
|
+
target_folder = os.path.join(codeunit_folder, target_subfolder_in_codeunit)
|
|
1878
|
+
GeneralUtilities.ensure_directory_exists(target_folder)
|
|
1879
|
+
ScriptCollectionCore().run_program("java", f'-jar {openapigenerator_jar_file} generate -i {openapi_spec_file} -g {language} -o {target_folder} --global-property supportingFiles --global-property models --global-property apis {additional_properties}', codeunit_folder)
|
|
1880
|
+
|
|
1881
|
+
# move docs to correct folder
|
|
1882
|
+
target_folder_docs = os.path.join(target_folder, "docs")
|
|
1883
|
+
target_folder_docs_correct = os.path.join(codeunit_folder, "Other", "Reference", "ReferenceContent", f"{name_of_api_providing_codeunit}-API")
|
|
1884
|
+
GeneralUtilities.ensure_directory_does_not_exist(target_folder_docs_correct)
|
|
1885
|
+
GeneralUtilities.ensure_directory_exists(target_folder_docs_correct)
|
|
1886
|
+
GeneralUtilities.move_content_of_folder(target_folder_docs, target_folder_docs_correct)
|
|
1887
|
+
GeneralUtilities.ensure_directory_does_not_exist(target_folder_docs)
|
|
1888
|
+
|
|
1889
|
+
code_folders = GeneralUtilities.get_direct_folders_of_folder(os.path.join(target_folder, "src"))
|
|
1890
|
+
|
|
1891
|
+
# remove test-folder
|
|
1892
|
+
tests_folder = [x for x in code_folders if x.endswith(".Test")][0]
|
|
1893
|
+
GeneralUtilities.ensure_directory_does_not_exist(tests_folder)
|
|
1894
|
+
|
|
1895
|
+
# move source to correct folder
|
|
1896
|
+
src_folder = [x for x in code_folders if not x.endswith(".Test")][0]
|
|
1897
|
+
target_folder_src = GeneralUtilities.resolve_relative_path("../..", src_folder)
|
|
1898
|
+
|
|
1899
|
+
for targetfile in GeneralUtilities.get_direct_files_of_folder(target_folder_src):
|
|
1900
|
+
GeneralUtilities.ensure_file_does_not_exist(targetfile)
|
|
1901
|
+
for folder in GeneralUtilities.get_direct_folders_of_folder(target_folder_src):
|
|
1902
|
+
f = folder.replace("\\", "/")
|
|
1903
|
+
if not f.endswith("/.openapi-generator") and not f.endswith("/src"):
|
|
1904
|
+
GeneralUtilities.ensure_directory_does_not_exist(f)
|
|
1905
|
+
GeneralUtilities.ensure_directory_exists(target_folder_src)
|
|
1906
|
+
GeneralUtilities.move_content_of_folder(src_folder, target_folder_src)
|
|
1907
|
+
GeneralUtilities.ensure_directory_does_not_exist(src_folder)
|
|
1908
|
+
for targetfile in GeneralUtilities.get_direct_files_of_folder(target_folder_src):
|
|
1909
|
+
GeneralUtilities.ensure_file_does_not_exist(targetfile)
|
|
1910
|
+
|
|
1843
1911
|
@GeneralUtilities.check_arguments
|
|
1844
1912
|
def replace_version_in_packagejson_file(self, packagejson_file: str, codeunit_version: str) -> None:
|
|
1845
1913
|
encoding = "utf-8"
|
|
@@ -2507,7 +2575,7 @@ class TasksForCommonProjectStructure:
|
|
|
2507
2575
|
else:
|
|
2508
2576
|
GeneralUtilities.write_message_to_stdout(f"There are no dependencies to update in codeunit {codeunit}.")
|
|
2509
2577
|
if updated_dependencies:
|
|
2510
|
-
self.__sc.run_program("scbuildcodeunits", "--targetenvironment QualityCheck", repository_folder) # TODO set
|
|
2578
|
+
self.__sc.run_program("scbuildcodeunits", "--targetenvironment QualityCheck", repository_folder, verbosity=verbosity) # TODO set timeout
|
|
2511
2579
|
self.__sc.git_commit(repository_folder, "Updated dependencies")
|
|
2512
2580
|
|
|
2513
2581
|
class GenericPrepareNewReleaseArguments:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ScriptCollection
|
|
3
|
-
Version: 3.5.
|
|
3
|
+
Version: 3.5.19
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Home-page: https://github.com/anionDev/ScriptCollection
|
|
6
6
|
Author: Marius Göcke
|
|
@@ -22,26 +22,26 @@ Classifier: Topic :: Terminals
|
|
|
22
22
|
Classifier: Topic :: Utilities
|
|
23
23
|
Requires-Python: >=3.10
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
|
-
Requires-Dist: build >=1.2.
|
|
26
|
-
Requires-Dist: coverage >=7.6.
|
|
27
|
-
Requires-Dist: cyclonedx-bom >=4.
|
|
25
|
+
Requires-Dist: build >=1.2.2
|
|
26
|
+
Requires-Dist: coverage >=7.6.1
|
|
27
|
+
Requires-Dist: cyclonedx-bom >=4.6.1
|
|
28
28
|
Requires-Dist: defusedxml >=0.7.1
|
|
29
29
|
Requires-Dist: keyboard >=0.13.5
|
|
30
30
|
Requires-Dist: lcov-cobertura >=2.0.2
|
|
31
|
-
Requires-Dist: lxml >=5.
|
|
31
|
+
Requires-Dist: lxml >=5.3.0
|
|
32
32
|
Requires-Dist: ntplib >=0.4.0
|
|
33
33
|
Requires-Dist: Pillow >=10.4.0
|
|
34
34
|
Requires-Dist: pycdlib >=1.14.0
|
|
35
35
|
Requires-Dist: Pygments >=2.18.0
|
|
36
|
-
Requires-Dist: pylint >=3.
|
|
36
|
+
Requires-Dist: pylint >=3.3.1
|
|
37
37
|
Requires-Dist: pyOpenSSL >=24.2.1
|
|
38
38
|
Requires-Dist: PyPDF2 >=3.0.1
|
|
39
|
-
Requires-Dist: pytest >=8.3.
|
|
40
|
-
Requires-Dist: PyYAML >=6.0.
|
|
41
|
-
Requires-Dist: qrcode >=
|
|
39
|
+
Requires-Dist: pytest >=8.3.3
|
|
40
|
+
Requires-Dist: PyYAML >=6.0.2
|
|
41
|
+
Requires-Dist: qrcode >=8.0
|
|
42
42
|
Requires-Dist: send2trash >=1.8.3
|
|
43
43
|
Requires-Dist: twine >=5.1.1
|
|
44
|
-
Requires-Dist: xmlschema >=3.
|
|
44
|
+
Requires-Dist: xmlschema >=3.4.2
|
|
45
45
|
|
|
46
46
|
# ScriptCollection
|
|
47
47
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
ScriptCollection/Executables.py,sha256=
|
|
1
|
+
ScriptCollection/Executables.py,sha256=rdyVf_rWHIHeAeOngTeyohYYIimb0BqtZxUBDDpQSDQ,20028
|
|
2
2
|
ScriptCollection/GeneralUtilities.py,sha256=AElXv2NO30cTw-Qs3qVmO-YCOQ5FvBQM3RZMywuKQ_Y,35121
|
|
3
3
|
ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
|
|
4
4
|
ScriptCollection/ProgramRunnerBase.py,sha256=7QAjoqOz6XPmJH19F2k-Z1fFQB_uZnPFvn-T54IJcHQ,2324
|
|
5
5
|
ScriptCollection/ProgramRunnerEpew.py,sha256=C2Rs3YWOWWWJct7XmKphp5CF1tf0j4Fp-ljV2drLTfs,6349
|
|
6
6
|
ScriptCollection/ProgramRunnerPopen.py,sha256=G3LgQUVCfaq7XjBsGzalElH31Hbr0etttGR2_H87YzA,3512
|
|
7
7
|
ScriptCollection/RPStream.py,sha256=NRRHL3YSP3D9MuAV2jB_--0KUKCsvJGxeKnxgrRZ9kY,1545
|
|
8
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
9
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=
|
|
8
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=tCOQFVv2vvv_A74wV1MzD16p310oCi_-XZlxcxpsbyE,100126
|
|
9
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=9Nm7btdvikTOCOQaSXRV7sadaIi2aVqTWVCvUcYclK8,190588
|
|
10
10
|
ScriptCollection/UpdateCertificates.py,sha256=Eynbgu7k9jLxApP2D_8Il77B6BFjJap6K7oTeEAZYbk,7790
|
|
11
11
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
ScriptCollection-3.5.
|
|
13
|
-
ScriptCollection-3.5.
|
|
14
|
-
ScriptCollection-3.5.
|
|
15
|
-
ScriptCollection-3.5.
|
|
16
|
-
ScriptCollection-3.5.
|
|
12
|
+
ScriptCollection-3.5.19.dist-info/METADATA,sha256=YRmoRb7oPMLbU4IokGQa_H-l_8iutOWATxZQIcFeIiE,7678
|
|
13
|
+
ScriptCollection-3.5.19.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
14
|
+
ScriptCollection-3.5.19.dist-info/entry_points.txt,sha256=yASwR6hWZ_b5d4W49YeX1htD8ngfWbwgjpfQiJdtUAU,2322
|
|
15
|
+
ScriptCollection-3.5.19.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
16
|
+
ScriptCollection-3.5.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|