ScriptCollection 3.5.112__py3-none-any.whl → 3.5.114__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.
@@ -33,7 +33,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
33
33
  from .ProgramRunnerPopen import ProgramRunnerPopen
34
34
  from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
35
35
 
36
- version = "3.5.112"
36
+ version = "3.5.114"
37
37
  __version__ = version
38
38
 
39
39
 
@@ -862,7 +862,7 @@ class TasksForCommonProjectStructure:
862
862
  if os.path.isfile(os.path.join(codeunit_folder, runsettings_file)):
863
863
  arg = f"{arg} --settings {runsettings_file}"
864
864
  arg = f"{arg} /p:CollectCoverage=true /p:CoverletOutput=../Other/Artifacts/TestCoverage/Testcoverage /p:CoverletOutputFormat=cobertura"
865
- self.__sc.run_program("dotnet", arg, codeunit_folder, verbosity=verbosity,print_live_output=True)
865
+ self.__sc.run_program("dotnet", arg, codeunit_folder, verbosity=verbosity, print_live_output=True)
866
866
  target_file = os.path.join(coverage_file_folder, "TestCoverage.xml")
867
867
  GeneralUtilities.ensure_file_does_not_exist(target_file)
868
868
  os.rename(os.path.join(coverage_file_folder, "Testcoverage.cobertura.xml"), target_file)
@@ -2422,7 +2422,7 @@ class TasksForCommonProjectStructure:
2422
2422
  GeneralUtilities.write_text_to_file(docker_compose_file, replaced)
2423
2423
 
2424
2424
  @GeneralUtilities.check_arguments
2425
- def start_dockerfile_example(self, current_file: str, verbosity: int, remove_old_container: bool, remove_volumes_folder: bool, commandline_arguments: list[str],env_file:str) -> None:
2425
+ def start_dockerfile_example(self, current_file: str, verbosity: int, remove_old_container: bool, remove_volumes_folder: bool, commandline_arguments: list[str], env_file: str) -> None:
2426
2426
  verbosity = TasksForCommonProjectStructure.get_verbosity_from_commandline_arguments(commandline_arguments, verbosity)
2427
2427
  folder = os.path.dirname(current_file)
2428
2428
  example_name = os.path.basename(folder)
@@ -2449,21 +2449,21 @@ class TasksForCommonProjectStructure:
2449
2449
  self.__sc.run_program("docker", f"load -i {image_filename}", oci_image_artifacts_folder, verbosity=verbosity)
2450
2450
  docker_project_name = f"{codeunit_name}_{example_name}".lower()
2451
2451
  GeneralUtilities.write_message_to_stdout("Start docker-container...")
2452
- argument=f"compose --project-name {docker_project_name}"
2452
+ argument = f"compose --project-name {docker_project_name}"
2453
2453
  if env_file is not None:
2454
- argument=f"{argument} --env-file {env_file}"
2455
- argument=f"{argument} up --detach"
2454
+ argument = f"{argument} --env-file {env_file}"
2455
+ argument = f"{argument} up --detach"
2456
2456
  self.__sc.run_program("docker", argument, folder, verbosity=verbosity)
2457
2457
 
2458
2458
  @GeneralUtilities.check_arguments
2459
- def ensure_env_file_is_generated(self,current_file:str,env_file_name:str, env_values:dict[str,str]):
2459
+ def ensure_env_file_is_generated(self, current_file: str, env_file_name: str, env_values: dict[str, str]):
2460
2460
  folder = os.path.dirname(current_file)
2461
- env_file=os.path.join(folder,env_file_name)
2461
+ env_file = os.path.join(folder, env_file_name)
2462
2462
  if not os.path.isfile(env_file):
2463
- lines=[]
2464
- for key,value in env_values.items():
2463
+ lines = []
2464
+ for key, value in env_values.items():
2465
2465
  lines.append(f"{key}={value}")
2466
- GeneralUtilities.write_lines_to_file(env_file,lines)
2466
+ GeneralUtilities.write_lines_to_file(env_file, lines)
2467
2467
 
2468
2468
  @GeneralUtilities.check_arguments
2469
2469
  def stop_dockerfile_example(self, current_file: str, verbosity: int, remove_old_container: bool, remove_volumes_folder: bool, commandline_arguments: list[str]) -> None:
@@ -2548,7 +2548,8 @@ class TasksForCommonProjectStructure:
2548
2548
  support_time = timedelta(days=365*2+30*3+1) # TODO make this configurable
2549
2549
  until = now + support_time
2550
2550
  until_day = datetime(until.year, until.month, until.day, 0, 0, 0)
2551
- self.mark_current_version_as_supported(repository_folder, project_version, now, until_day)
2551
+ from_day = datetime(now.year, now.month, now.day, 0, 0, 0)
2552
+ self.mark_current_version_as_supported(repository_folder, project_version, from_day, until_day)
2552
2553
 
2553
2554
  project_resources_folder = os.path.join(repository_folder, "Other", "Scripts")
2554
2555
  PrepareBuildCodeunits_script_name = "PrepareBuildCodeunits.py"
@@ -2567,7 +2568,7 @@ class TasksForCommonProjectStructure:
2567
2568
 
2568
2569
  @GeneralUtilities.check_arguments
2569
2570
  def build_specific_codeunits(self, repository_folder: str, codeunits: list[str], verbosity: int = 1, target_environmenttype: str = "QualityCheck", additional_arguments_file: str = None, is_pre_merge: bool = False, export_target_directory: str = None, assume_dependent_codeunits_are_already_built: bool = True, commandline_arguments: list[str] = [], do_git_clean_when_no_changes: bool = False, note: str = None, check_for_new_files: bool = True) -> None:
2570
- codeunits_list = "{"+", ".join(["a","b"])+"}"
2571
+ codeunits_list = "{"+", ".join(["a", "b"])+"}"
2571
2572
  if verbosity > 2:
2572
2573
  GeneralUtilities.write_message_to_stdout(f"Start building codeunits ({codeunits_list}) in repository '{repository_folder}'...")
2573
2574
  self.__sc.assert_is_git_repository(repository_folder)
@@ -3113,37 +3114,42 @@ class TasksForCommonProjectStructure:
3113
3114
  codeunits = self.get_codeunits(repository_folder)
3114
3115
  update_dependencies_script_filename = "UpdateDependencies.py"
3115
3116
  target_environmenttype = "QualityCheck"
3116
- self.build_codeunits(repository_folder, target_environmenttype=target_environmenttype, do_git_clean_when_no_changes=True, note="Prepare dependency-update") # Required because update dependencies is not always possible for not-buildet codeunits (depends on the programming language or package manager)
3117
3117
 
3118
3118
  # update dependencies of resources
3119
3119
  global_scripts_folder = os.path.join(repository_folder, "Other", "Scripts")
3120
3120
  if os.path.isfile(os.path.join(global_scripts_folder, update_dependencies_script_filename)):
3121
+ self.build_codeunits(repository_folder, target_environmenttype=target_environmenttype, do_git_clean_when_no_changes=True, note="Prepare dependency-update") # Required because update dependencies is not always possible for not-buildet codeunits (depends on the programming language or package manager)
3122
+ GeneralUtilities.assert_condition(not self.__sc.git_repository_has_uncommitted_changes(repository_folder), "There are uncommitted changes in the repository.")
3121
3123
  self.__sc.run_program("python", update_dependencies_script_filename, global_scripts_folder, print_live_output=True)
3122
3124
 
3123
- # update dependencies of codeunits
3124
- for codeunit in codeunits:
3125
- codeunit_file = os.path.join(repository_folder, codeunit, f"{codeunit}.codeunit.xml")
3126
- codeunit_has_updatable_dependencies = self.codeunit_has_updatable_dependencies(codeunit_file)
3127
- if codeunit_has_updatable_dependencies:
3128
- codeunit_folder = os.path.join(repository_folder, codeunit)
3129
- update_dependencies_script_folder = os.path.join(codeunit_folder, "Other")
3130
- GeneralUtilities.ensure_directory_exists(os.path.join(update_dependencies_script_folder, "Resources", "CodeAnalysisResult"))
3131
- self.__sc.run_program("python", update_dependencies_script_filename, update_dependencies_script_folder, verbosity, print_live_output=True)
3132
- if self.__sc.git_repository_has_uncommitted_changes(repository_folder):
3133
- version_of_project = self.get_version_of_project(repository_folder)
3134
- changelog_file = os.path.join(repository_folder, "Other", "Resources", "Changelog", f"v{version_of_project}.md")
3135
- if not os.path.isfile(changelog_file):
3136
- GeneralUtilities.write_text_to_file(changelog_file, """# Release notes
3137
-
3138
- ## Changes
3139
-
3140
- - Updated dependencies.
3141
- """)
3142
- GeneralUtilities.write_message_to_stdout(f"Updated dependencies in codeunit {codeunit}.")
3143
- else:
3144
- GeneralUtilities.write_message_to_stdout(f"There are no dependencies to update in codeunit {codeunit}.")
3145
- self.build_specific_codeunits(repository_folder, [codeunit], 0, target_environmenttype, None, False, None, True, [], False, f"Build codeunit {codeunit} due to updated dependencies", False)
3146
- self.__sc.git_commit(repository_folder, "Updated dependencies")
3125
+ # update dependencies of codeunits
3126
+ something_was_updated = False
3127
+ for codeunit in codeunits:
3128
+ codeunit_file = os.path.join(repository_folder, codeunit, f"{codeunit}.codeunit.xml")
3129
+ codeunit_has_updatable_dependencies = self.codeunit_has_updatable_dependencies(codeunit_file)
3130
+ if codeunit_has_updatable_dependencies:
3131
+ codeunit_folder = os.path.join(repository_folder, codeunit)
3132
+ update_dependencies_script_folder = os.path.join(codeunit_folder, "Other")
3133
+ GeneralUtilities.ensure_directory_exists(os.path.join(update_dependencies_script_folder, "Resources", "CodeAnalysisResult"))
3134
+ self.__sc.run_program("python", update_dependencies_script_filename, update_dependencies_script_folder, verbosity, print_live_output=True)
3135
+ if self.__sc.git_repository_has_uncommitted_changes(repository_folder):
3136
+ something_was_updated = True
3137
+ version_of_project = self.get_version_of_project(repository_folder)
3138
+ changelog_file = os.path.join(repository_folder, "Other", "Resources", "Changelog", f"v{version_of_project}.md")
3139
+ if not os.path.isfile(changelog_file):
3140
+ GeneralUtilities.write_text_to_file(changelog_file, """# Release notes
3141
+
3142
+ ## Changes
3143
+
3144
+ - Updated dependencies.
3145
+ """)
3146
+ GeneralUtilities.write_message_to_stdout(f"Updated dependencies in codeunit {codeunit}.")
3147
+ else:
3148
+ GeneralUtilities.write_message_to_stdout(f"There are no dependencies to update in codeunit {codeunit}.")
3149
+
3150
+ if something_was_updated:
3151
+ self.build_codeunits(repository_folder, verbosity, "QualityCheck", None, False, None, [], False, f"Build codeunits due to updated dependencies")
3152
+ self.__sc.git_commit(repository_folder, "Updated dependencies")
3147
3153
 
3148
3154
  class GenericPrepareNewReleaseArguments:
3149
3155
  current_file: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 3.5.112
3
+ Version: 3.5.114
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
@@ -6,11 +6,11 @@ ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4b
6
6
  ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
7
7
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
8
8
  ScriptCollection/SCLog.py,sha256=5qjOBYiliyHV57GY8Y5dgUek512EVI8AzBF288R4fn4,2377
9
- ScriptCollection/ScriptCollectionCore.py,sha256=oBMRbX28iOdhNEkbj9f3RMwJ7dlpCfwjGWyHtyEGM0w,130404
10
- ScriptCollection/TasksForCommonProjectStructure.py,sha256=eHEv6NWXSHSX_D7HS6_hWLCGfdz4Phwxdh7WUwuiX8I,233536
9
+ ScriptCollection/ScriptCollectionCore.py,sha256=21z_31w4QQOJWxU7o_ByGoQ7ZDX8i1t-h2YXjDEYMPQ,130404
10
+ ScriptCollection/TasksForCommonProjectStructure.py,sha256=d-fbnVk6DvsOIppn-rDslBHhMOsuPFAMRIacvu-F5eo,233988
11
11
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- scriptcollection-3.5.112.dist-info/METADATA,sha256=XnZ0e80brcBylLdXrl7ekyZglqnCn5GRV7VE-l5JtaM,7694
13
- scriptcollection-3.5.112.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
14
- scriptcollection-3.5.112.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
15
- scriptcollection-3.5.112.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
- scriptcollection-3.5.112.dist-info/RECORD,,
12
+ scriptcollection-3.5.114.dist-info/METADATA,sha256=Zm0Jk650RKLdLRpBa584_HYg8n14MCno5lSJ5ils1b4,7694
13
+ scriptcollection-3.5.114.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
14
+ scriptcollection-3.5.114.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
15
+ scriptcollection-3.5.114.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
+ scriptcollection-3.5.114.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5