ScriptCollection 3.5.34__py3-none-any.whl → 3.5.35__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 +3 -3
- ScriptCollection/GeneralUtilities.py +1 -1
- ScriptCollection/ScriptCollectionCore.py +28 -5
- ScriptCollection/TasksForCommonProjectStructure.py +41 -3
- {ScriptCollection-3.5.34.dist-info → ScriptCollection-3.5.35.dist-info}/METADATA +1 -1
- {ScriptCollection-3.5.34.dist-info → ScriptCollection-3.5.35.dist-info}/RECORD +9 -9
- {ScriptCollection-3.5.34.dist-info → ScriptCollection-3.5.35.dist-info}/WHEEL +0 -0
- {ScriptCollection-3.5.34.dist-info → ScriptCollection-3.5.35.dist-info}/entry_points.txt +0 -0
- {ScriptCollection-3.5.34.dist-info → ScriptCollection-3.5.35.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
|
@@ -256,7 +256,7 @@ def HealthCheck() -> int:
|
|
|
256
256
|
def BuildCodeUnit() -> int:
|
|
257
257
|
parser = argparse.ArgumentParser()
|
|
258
258
|
parser.add_argument('--codeunitfolder', required=False, default=".")
|
|
259
|
-
parser.add_argument('--verbosity', required=False, default=1)
|
|
259
|
+
parser.add_argument('-v', '--verbosity', required=False, default=1)
|
|
260
260
|
parser.add_argument('--targetenvironment', required=False, default="QualityCheck")
|
|
261
261
|
parser.add_argument('--additionalargumentsfile', required=False, default=None)
|
|
262
262
|
parser.add_argument('--assume_dependent_codeunits_are_already_built', type=GeneralUtilities.string_to_boolean, const=True, default=False, nargs='?')
|
|
@@ -268,7 +268,7 @@ def BuildCodeUnit() -> int:
|
|
|
268
268
|
def BuildCodeUnits() -> int:
|
|
269
269
|
parser = argparse.ArgumentParser()
|
|
270
270
|
parser.add_argument('--repositoryfolder', required=False, default=".")
|
|
271
|
-
parser.add_argument('--verbosity', required=False, default=1)
|
|
271
|
+
parser.add_argument('-v', '--verbosity', required=False, default=1)
|
|
272
272
|
parser.add_argument('--targetenvironment', required=False, default="QualityCheck")
|
|
273
273
|
parser.add_argument('--additionalargumentsfile', required=False, default=None)
|
|
274
274
|
parser.add_argument('--removeuncommittedfiles', required=False, default=False, action='store_true')
|
|
@@ -280,7 +280,7 @@ def BuildCodeUnits() -> int:
|
|
|
280
280
|
def BuildCodeUnitsC() -> int:
|
|
281
281
|
parser = argparse.ArgumentParser()
|
|
282
282
|
parser.add_argument('--repositoryfolder', required=False, default=".")
|
|
283
|
-
parser.add_argument('--verbosity', required=False, default=1)
|
|
283
|
+
parser.add_argument('-v', '--verbosity', required=False, default=1)
|
|
284
284
|
parser.add_argument('--targetenvironment', required=False, default="QualityCheck")
|
|
285
285
|
parser.add_argument('--additionalargumentsfile', required=False, default=None)
|
|
286
286
|
parser.add_argument('--image', required=False, default="scbuilder:latest")
|
|
@@ -392,7 +392,7 @@ class GeneralUtilities:
|
|
|
392
392
|
@staticmethod
|
|
393
393
|
@check_arguments
|
|
394
394
|
def __rmtree(directory: str) -> None:
|
|
395
|
-
shutil.rmtree(directory, onerror=GeneralUtilities.__remove_readonly)
|
|
395
|
+
shutil.rmtree(directory, onerror=GeneralUtilities.__remove_readonly) # pylint: disable=deprecated-argument
|
|
396
396
|
|
|
397
397
|
@staticmethod
|
|
398
398
|
@check_arguments
|
|
@@ -31,7 +31,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
31
31
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
32
32
|
from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
|
|
33
33
|
|
|
34
|
-
version = "3.5.
|
|
34
|
+
version = "3.5.35"
|
|
35
35
|
__version__ = version
|
|
36
36
|
|
|
37
37
|
|
|
@@ -1206,26 +1206,49 @@ class ScriptCollectionCore:
|
|
|
1206
1206
|
queue.put(line)
|
|
1207
1207
|
file.close()
|
|
1208
1208
|
|
|
1209
|
+
@staticmethod
|
|
1210
|
+
def __continue_process_reading(pid: int, p: Popen, q_stdout: Queue, q_stderr: Queue, reading_stdout_last_time_resulted_in_exception: bool, reading_stderr_last_time_resulted_in_exception: bool):
|
|
1211
|
+
if p.poll() is None:
|
|
1212
|
+
return True
|
|
1213
|
+
|
|
1214
|
+
# if reading_stdout_last_time_resulted_in_exception and reading_stderr_last_time_resulted_in_exception:
|
|
1215
|
+
# return False
|
|
1216
|
+
|
|
1217
|
+
if not q_stdout.empty():
|
|
1218
|
+
return True
|
|
1219
|
+
|
|
1220
|
+
if not q_stderr.empty():
|
|
1221
|
+
return True
|
|
1222
|
+
|
|
1223
|
+
return False
|
|
1224
|
+
|
|
1209
1225
|
@staticmethod
|
|
1210
1226
|
def __read_popen_pipes(p: Popen):
|
|
1227
|
+
p_id = p.pid
|
|
1211
1228
|
with ThreadPoolExecutor(2) as pool:
|
|
1212
1229
|
q_stdout = Queue()
|
|
1213
1230
|
q_stderr = Queue()
|
|
1214
1231
|
|
|
1215
1232
|
pool.submit(ScriptCollectionCore.__enqueue_output, p.stdout, q_stdout)
|
|
1216
1233
|
pool.submit(ScriptCollectionCore.__enqueue_output, p.stderr, q_stderr)
|
|
1217
|
-
|
|
1218
|
-
|
|
1234
|
+
reading_stdout_last_time_resulted_in_exception: bool = False
|
|
1235
|
+
reading_stderr_last_time_resulted_in_exception: bool = False
|
|
1236
|
+
while (ScriptCollectionCore.__continue_process_reading(p_id, p, q_stdout, q_stderr, reading_stdout_last_time_resulted_in_exception, reading_stderr_last_time_resulted_in_exception)):
|
|
1219
1237
|
out_line = None
|
|
1220
1238
|
err_line = None
|
|
1221
1239
|
try:
|
|
1222
1240
|
out_line = q_stdout.get_nowait()
|
|
1241
|
+
reading_stdout_last_time_resulted_in_exception = False
|
|
1223
1242
|
except Empty:
|
|
1224
|
-
|
|
1243
|
+
reading_stdout_last_time_resulted_in_exception = True
|
|
1244
|
+
|
|
1225
1245
|
try:
|
|
1226
1246
|
err_line = q_stderr.get_nowait()
|
|
1247
|
+
reading_stderr_last_time_resulted_in_exception = False
|
|
1227
1248
|
except Empty:
|
|
1228
|
-
|
|
1249
|
+
reading_stderr_last_time_resulted_in_exception = True
|
|
1250
|
+
|
|
1251
|
+
time.sleep(0.01)
|
|
1229
1252
|
|
|
1230
1253
|
yield (out_line, err_line)
|
|
1231
1254
|
|
|
@@ -12,6 +12,7 @@ import json
|
|
|
12
12
|
import configparser
|
|
13
13
|
import tempfile
|
|
14
14
|
import uuid
|
|
15
|
+
import yaml
|
|
15
16
|
import requests
|
|
16
17
|
from packaging import version
|
|
17
18
|
import xmlschema
|
|
@@ -230,8 +231,14 @@ class TasksForCommonProjectStructure:
|
|
|
230
231
|
src_folder = GeneralUtilities.resolve_relative_path(package_name, codeunit_folder) # TODO replace packagename
|
|
231
232
|
artifacts_folder = os.path.join(codeunit_folder, "Other", "Artifacts")
|
|
232
233
|
verbosity = self.get_verbosity_from_commandline_arguments(args, verbosity)
|
|
234
|
+
target_names: dict[str, str] = {
|
|
235
|
+
"web": "WebApplication",
|
|
236
|
+
"windows": "Windows",
|
|
237
|
+
"ios": "IOS",
|
|
238
|
+
"appbundle": "Android",
|
|
239
|
+
}
|
|
233
240
|
for target in targets:
|
|
234
|
-
GeneralUtilities.write_message_to_stdout(f"Build package {package_name} for target {target}...")
|
|
241
|
+
GeneralUtilities.write_message_to_stdout(f"Build package {package_name} for target {target_names[target]}...")
|
|
235
242
|
sc = ScriptCollectionCore()
|
|
236
243
|
self.run_with_epew("flutter", f"build {target}", src_folder, verbosity)
|
|
237
244
|
if target == "web":
|
|
@@ -996,6 +1003,8 @@ class TasksForCommonProjectStructure:
|
|
|
996
1003
|
|
|
997
1004
|
for codeunitname in self.get_codeunits(information.repository):
|
|
998
1005
|
# Push artifacts to registry
|
|
1006
|
+
if information.verbosity > 2:
|
|
1007
|
+
GeneralUtilities.write_message_to_stdout(f"Push artifacts of {codeunitname}...")
|
|
999
1008
|
scriptfilename = f"PushArtifacts.{codeunitname}.py"
|
|
1000
1009
|
push_artifact_to_registry_script = os.path.join(information.push_artifacts_scripts_folder, scriptfilename)
|
|
1001
1010
|
if os.path.isfile(push_artifact_to_registry_script):
|
|
@@ -1895,9 +1904,36 @@ class TasksForCommonProjectStructure:
|
|
|
1895
1904
|
GeneralUtilities.ensure_directory_exists(os.path.join(artifacts_folder, "APISpecification"))
|
|
1896
1905
|
verbosity = self.get_verbosity_from_commandline_arguments(commandline_arguments, verbosity)
|
|
1897
1906
|
codeunit_version = self.get_version_of_codeunit_folder(codeunit_folder)
|
|
1907
|
+
|
|
1898
1908
|
versioned_api_spec_file = f"APISpecification/{codeunitname}.v{codeunit_version}.api.json"
|
|
1899
1909
|
self.__sc.run_program("swagger", f"tofile --output {versioned_api_spec_file} BuildResult_DotNet_{runtime}/{codeunitname}.dll {swagger_document_name}", artifacts_folder, verbosity=verbosity)
|
|
1900
|
-
|
|
1910
|
+
api_file: str = os.path.join(artifacts_folder, versioned_api_spec_file)
|
|
1911
|
+
shutil.copyfile(api_file, os.path.join(artifacts_folder, f"APISpecification/{codeunitname}.latest.api.json"))
|
|
1912
|
+
|
|
1913
|
+
resources_folder = os.path.join(codeunit_folder, "Other", "Resources")
|
|
1914
|
+
GeneralUtilities.ensure_directory_exists(resources_folder)
|
|
1915
|
+
resources_apispec_folder = os.path.join(resources_folder, "APISpecification")
|
|
1916
|
+
GeneralUtilities.ensure_directory_exists(resources_apispec_folder)
|
|
1917
|
+
resource_target_file = os.path.join(resources_apispec_folder, f"{codeunitname}.api.json")
|
|
1918
|
+
GeneralUtilities.ensure_file_does_not_exist(resource_target_file)
|
|
1919
|
+
shutil.copyfile(api_file, resource_target_file)
|
|
1920
|
+
|
|
1921
|
+
with open(api_file, encoding="utf-8") as api_file_content:
|
|
1922
|
+
reloaded_json = json.load(api_file_content)
|
|
1923
|
+
|
|
1924
|
+
yamlfile1: str = str(os.path.join(artifacts_folder, f"APISpecification/{codeunitname}.v{codeunit_version}.api.yaml"))
|
|
1925
|
+
GeneralUtilities.ensure_file_does_not_exist(yamlfile1)
|
|
1926
|
+
GeneralUtilities.ensure_file_exists(yamlfile1)
|
|
1927
|
+
with open(yamlfile1, "w+", encoding="utf-8") as yamlfile:
|
|
1928
|
+
yaml.dump(reloaded_json, yamlfile, allow_unicode=True)
|
|
1929
|
+
|
|
1930
|
+
yamlfile2: str = str(os.path.join(artifacts_folder, f"APISpecification/{codeunitname}.latest.api.yaml"))
|
|
1931
|
+
GeneralUtilities.ensure_file_does_not_exist(yamlfile2)
|
|
1932
|
+
shutil.copyfile(yamlfile1, yamlfile2)
|
|
1933
|
+
|
|
1934
|
+
yamlfile3: str = str(os.path.join(resources_apispec_folder, f"{codeunitname}.api.yaml"))
|
|
1935
|
+
GeneralUtilities.ensure_file_does_not_exist(yamlfile3)
|
|
1936
|
+
shutil.copyfile(yamlfile1, yamlfile3)
|
|
1901
1937
|
|
|
1902
1938
|
@GeneralUtilities.check_arguments
|
|
1903
1939
|
def ensure_openapigenerator_is_available(self, codeunit_folder: str) -> None:
|
|
@@ -1930,7 +1966,7 @@ class TasksForCommonProjectStructure:
|
|
|
1930
1966
|
openapigenerator_jar_file = os.path.join(codeunit_folder, "Other", "Resources", "OpenAPIGenerator", "open-api-generator.jar")
|
|
1931
1967
|
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")
|
|
1932
1968
|
target_folder = os.path.join(codeunit_folder, target_subfolder_in_codeunit)
|
|
1933
|
-
GeneralUtilities.
|
|
1969
|
+
GeneralUtilities.ensure_folder_exists_and_is_empty(target_folder)
|
|
1934
1970
|
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', codeunit_folder)
|
|
1935
1971
|
|
|
1936
1972
|
@GeneralUtilities.check_arguments
|
|
@@ -2580,6 +2616,8 @@ class TasksForCommonProjectStructure:
|
|
|
2580
2616
|
now = datetime.now()
|
|
2581
2617
|
codeunit_folder = GeneralUtilities.resolve_relative_path_from_current_working_directory(codeunit_folder)
|
|
2582
2618
|
codeunit_name: str = os.path.basename(codeunit_folder)
|
|
2619
|
+
if verbosity > 2:
|
|
2620
|
+
GeneralUtilities.write_message_to_stdout(f"Start building codeunit {codeunit_name}")
|
|
2583
2621
|
codeunit_file = os.path.join(codeunit_folder, f"{codeunit_name}.codeunit.xml")
|
|
2584
2622
|
|
|
2585
2623
|
if (not os.path.isfile(codeunit_file)):
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
ScriptCollection/Executables.py,sha256=
|
|
2
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
|
1
|
+
ScriptCollection/Executables.py,sha256=ls3wGZpt48YwwtO0QGWWyIImSE87SyzbL-WxhpwQJug,20837
|
|
2
|
+
ScriptCollection/GeneralUtilities.py,sha256=d_K9pI4hHF8Ha7gnt8N9CQnElrUhHpqyXL7p_6lQ4Nc,36386
|
|
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=1UD_9PhlJEKPdv0Xi1nAbey-8sKdS4S8J4opXPM1hvU,102878
|
|
9
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=JCk-itC1ScDot4yxKPvV6yYEwXhSCJIv838pIB-LgjY,203571
|
|
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.35.dist-info/METADATA,sha256=Wfy5SAnlPTelhTzWYOZuJPMASpjHNwiVaFHUVCKQagQ,7664
|
|
13
|
+
ScriptCollection-3.5.35.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
14
|
+
ScriptCollection-3.5.35.dist-info/entry_points.txt,sha256=_O7BmQ81LdDfrj5uOhjshg9Xc-tABHQJIxDOyOGRzzI,2397
|
|
15
|
+
ScriptCollection-3.5.35.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
16
|
+
ScriptCollection-3.5.35.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|