ScriptCollection 4.4.1__py3-none-any.whl → 4.4.2__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.
@@ -39,7 +39,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
39
39
  from .ProgramRunnerPopen import ProgramRunnerPopen
40
40
  from .SCLog import SCLog, LogLevel
41
41
 
42
- version = "4.4.1"
42
+ version = "4.4.2"
43
43
  __version__ = version
44
44
 
45
45
  class VSCodeWorkspaceShellTask:
@@ -109,12 +109,17 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
109
109
  def get_version_of_project(self)->str:
110
110
  return self.tfcps_Tools_General.get_version_of_project(self.get_repository_folder())
111
111
 
112
+ @staticmethod
113
+ @GeneralUtilities.check_arguments
114
+ def get_expected_xsd_address(codeunitspecificationversion:str)->str:
115
+ """Returns the address of the xsd-file against which a codeunit-file which uses the given codeunit-specification-version must be validated."""
116
+ return f"https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/raw/v{codeunitspecificationversion}/Conventions/RepositoryStructure/CommonProjectStructure/codeunit.xsd"
117
+
112
118
  @staticmethod
113
119
  @GeneralUtilities.check_arguments
114
120
  def get_expected_schemalocation(codeunitspecificationversion:str)->str:
115
121
  """Returns the value which the xsi:schemaLocation-attribute of a codeunit-file must have when the codeunit-file uses the given codeunit-specification-version."""
116
- xsd_address = f"https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/raw/v{codeunitspecificationversion}/Conventions/RepositoryStructure/CommonProjectStructure/codeunit.xsd"
117
- return f"{TFCPS_CodeUnitSpecific_Base.codeunit_namespace} {xsd_address}"
122
+ return f"{TFCPS_CodeUnitSpecific_Base.codeunit_namespace} {TFCPS_CodeUnitSpecific_Base.get_expected_xsd_address(codeunitspecificationversion)}"
118
123
 
119
124
  @GeneralUtilities.check_arguments
120
125
  def do_common_tasks_base(self,current_codeunit_version:str):
@@ -155,7 +160,9 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
155
160
  actual_schemalocation = " ".join(str(schemaLocation).split())
156
161
  if actual_schemalocation != expected_schemalocation:
157
162
  raise ValueError(f'The schema-location must be "{expected_schemalocation}" to match the codeunit-specification-version {supported_codeunitspecificationversion} but was "{actual_schemalocation}".')
158
- xmlschema.validate(codeunit_file, schemaLocation)
163
+ # The schema-location consists of the namespace and the address of the xsd-file, but xmlschema expects only the address of the xsd-file
164
+ # as schema-source. Passing the whole schema-location made xmlschema download the namespace-uri (which is a html-page) and fail to parse it.
165
+ xmlschema.validate(codeunit_file, TFCPS_CodeUnitSpecific_Base.get_expected_xsd_address(supported_codeunitspecificationversion))
159
166
  # TODO check if the properties codeunithastestablesourcecode, codeunithasupdatabledependencies, throwexceptionifcodeunitfilecannotbevalidated, developmentState and description exist and the values are valid
160
167
  except Exception as exception:
161
168
  self._protected_sc.log.log_exception(f'Codeunitfile "{codeunit_file}" can not be validated due to the following exception:', exception,LogLevel.Warning)
@@ -307,7 +307,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
307
307
  openspec_configuration_file: str = os.path.join(self.repository, "openspec", "config.yaml")
308
308
  if os.path.isfile(openspec_configuration_file):
309
309
  self.sc.log.log("Update openspec-instruction-files...")
310
- self.sc.run_program_argsasarray("openspec", ["update", "--force"], self.repository)
310
+ self.sc.run_with_epew("openspec", "update --force", self.repository)
311
311
 
312
312
  @GeneralUtilities.check_arguments
313
313
  def build_codeunits_in_container(self,base_mount_folder:str) -> tuple[bool, str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scriptcollection
3
- Version: 4.4.1
3
+ Version: 4.4.2
4
4
  Summary: The ScriptCollection is the place for reusable scripts.
5
5
  Author-email: Marius Göcke <marius.goecke@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
@@ -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=ot9Ib-plQ8wejR9M2XXfnx6GR-va9k8SH1gAC5kjaJ0,5123
11
11
  ScriptCollection/SCLog.py,sha256=EJpb0jmHR0HZUdYPH4uF57OBv18bfhZQ0kSWTjcA9oI,4706
12
- ScriptCollection/ScriptCollectionCore.py,sha256=A4mdeWtPvDq4VgPWAAWQ6dxe40DacyDs_Q4HyMwKpQE,253957
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=NQa1u_MFxCbzcpwK5GK8V688eh26fskfsCI8T3RzW3o,253957
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
@@ -36,9 +36,9 @@ ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html,sha256=CX9S1bdOz
36
36
  ScriptCollection/TFCPS/PackageSource.py,sha256=tQoMbxrIbV3mYHKH2wgOoGzIHY1TvBH8EAFpWGhryrQ,1311
37
37
  ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=rpuwSsQ6YQfZS2LGnvOH5ql8zs_-cHU4LQttS7XNT60,11272
38
38
  ScriptCollection/TFCPS/TFCPS_BuildCodeUnitsHook.py,sha256=67_DQwoH5bhxxSmwtuAeoW1NOCMiLMzOy48OqlJX-KY,1744
39
- ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=-fR3zyTVrgb5AAA2QJ2UAEbFWCpd_PsyngfPsTBWNeg,36111
39
+ ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=ahRpBESHO9CMqjy6jGFTiPluUmt9biHlO6Wa0VEftJw,36835
40
40
  ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Mj9t1SyRpkYZE74cLsGWYv4xB89gXL2ld-RX3xvvGdw,9835
41
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=qIhTSxWLawJdwN-KBMbMR8Y1LWat8ovr-GwpmNXqOWI,46006
41
+ ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=WEWxxWoH3AHfZM1WqaGC6GSPulNpfPxj0evQD2jHXkw,45991
42
42
  ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=kpEmSnfzfgB4OjcCuS_X6jgW_ftcphxEnjjoLoAHTLY,6582
43
43
  ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=mRBcf7XuNWOSXbZYc3NuJow18AMZ30D6Z-BtyNYfNcM,2072
44
44
  ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=Krt5oyGNcRAN3szsgU7LoTh8yVTOdHW-Kq7R9MDDV-Q,7673
@@ -67,8 +67,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=aVVEg_YMZR
67
67
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
68
  ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
69
69
  ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
- scriptcollection-4.4.1.dist-info/METADATA,sha256=rAFiCLV5EmioRQcl_yYNi_4majgzt8aw0gMejLX5Tio,7815
71
- scriptcollection-4.4.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
72
- scriptcollection-4.4.1.dist-info/entry_points.txt,sha256=52v0Kt6uaeQeDFjvc0Xcsd4YqQw2qKcs6GNgPO71pkU,5996
73
- scriptcollection-4.4.1.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
74
- scriptcollection-4.4.1.dist-info/RECORD,,
70
+ scriptcollection-4.4.2.dist-info/METADATA,sha256=eFGR8NKbbq1xpOYWwx-Ab3tx_kuxOeZe-mfzZkoWwy4,7815
71
+ scriptcollection-4.4.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
72
+ scriptcollection-4.4.2.dist-info/entry_points.txt,sha256=52v0Kt6uaeQeDFjvc0Xcsd4YqQw2qKcs6GNgPO71pkU,5996
73
+ scriptcollection-4.4.2.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
74
+ scriptcollection-4.4.2.dist-info/RECORD,,