ScriptCollection 3.5.140__py3-none-any.whl → 3.5.142__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/ScriptCollectionCore.py +1 -1
- ScriptCollection/TasksForCommonProjectStructure.py +23 -20
- {scriptcollection-3.5.140.dist-info → scriptcollection-3.5.142.dist-info}/METADATA +3 -3
- {scriptcollection-3.5.140.dist-info → scriptcollection-3.5.142.dist-info}/RECORD +7 -7
- {scriptcollection-3.5.140.dist-info → scriptcollection-3.5.142.dist-info}/WHEEL +0 -0
- {scriptcollection-3.5.140.dist-info → scriptcollection-3.5.142.dist-info}/entry_points.txt +0 -0
- {scriptcollection-3.5.140.dist-info → scriptcollection-3.5.142.dist-info}/top_level.txt +0 -0
@@ -1513,7 +1513,7 @@ class TasksForCommonProjectStructure:
|
|
1513
1513
|
project_version = self.get_version_of_project(repository_folder)
|
1514
1514
|
codeunit_folder = os.path.join(repository_folder, codeunit_name)
|
1515
1515
|
|
1516
|
-
#
|
1516
|
+
# check codeunit-conformity
|
1517
1517
|
# TODO check if foldername=="<codeunitname>[.codeunit.xml]" == <codeunitname> in file
|
1518
1518
|
supported_codeunitspecificationversion = "2.9.4" # should always be the latest version of the ProjectTemplates-repository
|
1519
1519
|
codeunit_file = os.path.join(codeunit_folder, f"{codeunit_name}.codeunit.xml")
|
@@ -1523,7 +1523,7 @@ class TasksForCommonProjectStructure:
|
|
1523
1523
|
namespaces = {'cps': 'https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure', 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
1524
1524
|
root: etree._ElementTree = etree.parse(codeunit_file)
|
1525
1525
|
|
1526
|
-
#
|
1526
|
+
# check codeunit-spcecification-version
|
1527
1527
|
try:
|
1528
1528
|
codeunit_file_version = root.xpath('//cps:codeunit/@codeunitspecificationversion', namespaces=namespaces)[0]
|
1529
1529
|
if codeunit_file_version != supported_codeunitspecificationversion:
|
@@ -1538,27 +1538,27 @@ class TasksForCommonProjectStructure:
|
|
1538
1538
|
GeneralUtilities.write_message_to_stderr(f'Warning: Codeunitfile "{codeunit_file}" can not be validated due to the following exception:')
|
1539
1539
|
GeneralUtilities.write_exception_to_stderr(exception)
|
1540
1540
|
|
1541
|
-
#
|
1541
|
+
# check codeunit-name
|
1542
1542
|
codeunit_name_in_codeunit_file = root.xpath('//cps:codeunit/cps:name/text()', namespaces=namespaces)[0]
|
1543
1543
|
if codeunit_name != codeunit_name_in_codeunit_file:
|
1544
1544
|
raise ValueError(f"The folder-name ('{codeunit_name}') is not equal to the codeunit-name ('{codeunit_name_in_codeunit_file}').")
|
1545
1545
|
|
1546
|
-
#
|
1546
|
+
# check owner-name
|
1547
1547
|
codeunit_ownername_in_codeunit_file = self. get_codeunit_owner_name(codeunit_file)
|
1548
1548
|
GeneralUtilities.assert_condition(GeneralUtilities.string_has_content(codeunit_ownername_in_codeunit_file), "No valid name for codeunitowner given.")
|
1549
1549
|
|
1550
|
-
#
|
1550
|
+
# check owner-emailaddress
|
1551
1551
|
codeunit_owneremailaddress_in_codeunit_file = self.get_codeunit_owner_emailaddress(codeunit_file)
|
1552
1552
|
GeneralUtilities.assert_condition(GeneralUtilities.string_has_content(codeunit_owneremailaddress_in_codeunit_file), "No valid email-address for codeunitowner given.")
|
1553
1553
|
|
1554
|
-
#
|
1554
|
+
# check development-state
|
1555
1555
|
developmentstate = root.xpath('//cps:properties/@developmentstate', namespaces=namespaces)[0]
|
1556
1556
|
developmentstate_active = "Active development"
|
1557
1557
|
developmentstate_maintenance = "Maintenance-updates only"
|
1558
1558
|
developmentstate_inactive = "Inactive"
|
1559
1559
|
GeneralUtilities.assert_condition(developmentstate in (developmentstate_active, developmentstate_maintenance, developmentstate_inactive), f"Invalid development-state. Must be '{developmentstate_active}' or '{developmentstate_maintenance}' or '{developmentstate_inactive}' but was '{developmentstate}'.")
|
1560
1560
|
|
1561
|
-
#
|
1561
|
+
# check for mandatory files
|
1562
1562
|
files = ["Other/Build/Build.py", "Other/QualityCheck/Linting.py", "Other/Reference/GenerateReference.py"]
|
1563
1563
|
if self.codeunit_has_testable_sourcecode(codeunit_file):
|
1564
1564
|
# TODO check if the testsettings-section appears in the codeunit-file
|
@@ -1574,7 +1574,7 @@ class TasksForCommonProjectStructure:
|
|
1574
1574
|
if os.path.isfile(os.path.join(codeunit_folder, "Other", "requirements.txt")):
|
1575
1575
|
self.install_requirementstxt_for_codeunit(codeunit_folder, verbosity)
|
1576
1576
|
|
1577
|
-
#
|
1577
|
+
# check developer
|
1578
1578
|
if self.validate_developers_of_repository:
|
1579
1579
|
expected_authors: list[tuple[str, str]] = []
|
1580
1580
|
expected_authors_in_xml = root.xpath('//cps:codeunit/cps:developerteam/cps:developer', namespaces=namespaces)
|
@@ -1597,19 +1597,30 @@ class TasksForCommonProjectStructure:
|
|
1597
1597
|
|
1598
1598
|
# TODO implement cycle-check for dependent codeunits
|
1599
1599
|
|
1600
|
-
#
|
1600
|
+
# clear previously builded artifacts if desired:
|
1601
1601
|
if clear_artifacts_folder:
|
1602
1602
|
artifacts_folder = os.path.join(codeunit_folder, "Other", "Artifacts")
|
1603
1603
|
GeneralUtilities.ensure_directory_does_not_exist(artifacts_folder)
|
1604
1604
|
|
1605
|
-
#
|
1605
|
+
# get artifacts from dependent codeunits
|
1606
1606
|
# if assume_dependent_codeunits_are_already_built:
|
1607
1607
|
# self.build_dependent_code_units(repository_folder, codeunit_name, verbosity, target_environmenttype, additional_arguments_file, commandline_arguments)
|
1608
1608
|
self.copy_artifacts_from_dependent_code_units(repository_folder, codeunit_name)
|
1609
1609
|
|
1610
|
-
#
|
1610
|
+
# update codeunit-version
|
1611
1611
|
self.update_version_of_codeunit(common_tasks_scripts_file, codeunit_version)
|
1612
1612
|
|
1613
|
+
# set project version
|
1614
|
+
package_json_file = os.path.join(repository_folder, "package.json") # TDOO move this to a general project-specific (and codeunit-independent-script)
|
1615
|
+
if os.path.isfile(package_json_file):
|
1616
|
+
package_json_data: str = None
|
1617
|
+
with open(package_json_file, "r", encoding="utf-8") as f1:
|
1618
|
+
package_json_data = json.load(f1)
|
1619
|
+
package_json_data["version"] = project_version
|
1620
|
+
with open(package_json_file, "w", encoding="utf-8") as f2:
|
1621
|
+
json.dump(package_json_data, f2, indent=2)
|
1622
|
+
GeneralUtilities.write_text_to_file(package_json_file, GeneralUtilities.read_text_from_file(package_json_file).replace("\r", ""))
|
1623
|
+
|
1613
1624
|
# set default constants
|
1614
1625
|
self.set_default_constants(os.path.join(codeunit_folder))
|
1615
1626
|
|
@@ -2569,14 +2580,6 @@ class TasksForCommonProjectStructure:
|
|
2569
2580
|
from_day = datetime(now.year, now.month, now.day, 0, 0, 0)
|
2570
2581
|
self.mark_current_version_as_supported(repository_folder, project_version, from_day, until_day)
|
2571
2582
|
|
2572
|
-
package_json_file = os.path.join(repository_folder, "package.json")
|
2573
|
-
if os.path.isfile(package_json_file):
|
2574
|
-
with open(package_json_file, "r", encoding="utf-8") as f1:
|
2575
|
-
package_json_data = json.load(f1)
|
2576
|
-
package_json_data["version"] = project_version
|
2577
|
-
with open(package_json_file, "w", encoding="utf-8") as f2:
|
2578
|
-
json.dump(package_json_data, f2, indent=2)
|
2579
|
-
|
2580
2583
|
project_resources_folder = os.path.join(repository_folder, "Other", "Scripts")
|
2581
2584
|
PrepareBuildCodeunits_script_name = "PrepareBuildCodeunits.py"
|
2582
2585
|
prepare_build_codeunits_scripts = os.path.join(project_resources_folder, PrepareBuildCodeunits_script_name)
|
@@ -2665,7 +2668,7 @@ class TasksForCommonProjectStructure:
|
|
2665
2668
|
GeneralUtilities.write_message_to_stdout(message2)
|
2666
2669
|
|
2667
2670
|
@GeneralUtilities.check_arguments
|
2668
|
-
def __do_repository_checks(self, repository_folder: str, project_version: str) -> None:
|
2671
|
+
def __do_repository_checks(self, repository_folder: str, project_version: str) -> None: # TDOO move this to a general project-specific (and codeunit-independent-script)
|
2669
2672
|
self.__sc.assert_is_git_repository(repository_folder)
|
2670
2673
|
self.__check_if_changelog_exists(repository_folder, project_version)
|
2671
2674
|
self.__check_whether_security_txt_exists(repository_folder)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ScriptCollection
|
3
|
-
Version: 3.5.
|
3
|
+
Version: 3.5.142
|
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
|
@@ -33,10 +33,10 @@ Requires-Dist: ntplib>=0.4.0
|
|
33
33
|
Requires-Dist: Pillow>=11.2.1
|
34
34
|
Requires-Dist: psutil>=7.0.0
|
35
35
|
Requires-Dist: pycdlib>=1.14.0
|
36
|
-
Requires-Dist: Pygments>=2.19.
|
36
|
+
Requires-Dist: Pygments>=2.19.2
|
37
37
|
Requires-Dist: pylint>=3.3.7
|
38
38
|
Requires-Dist: pyOpenSSL>=25.1.0
|
39
|
-
Requires-Dist: PyPDF>=5.6.
|
39
|
+
Requires-Dist: PyPDF>=5.6.1
|
40
40
|
Requires-Dist: pytest>=8.4.1
|
41
41
|
Requires-Dist: PyYAML>=6.0.2
|
42
42
|
Requires-Dist: qrcode>=8.2
|
@@ -7,11 +7,11 @@ ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4b
|
|
7
7
|
ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
|
8
8
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
9
9
|
ScriptCollection/SCLog.py,sha256=Dd2P8vH2PA830wAv6bchlMHHdGE_7At-F4WQY5w4XdA,4016
|
10
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
11
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=
|
10
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=RN10QzaK5EYJ7vw2BHlWxc_1GqBM8sPLCdaSMQQiNCA,136482
|
11
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=zBrrzssSXrBptgRaj4R_aA5-t_jEncHcjmR2EoYTqzU,237126
|
12
12
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
|
-
scriptcollection-3.5.
|
14
|
-
scriptcollection-3.5.
|
15
|
-
scriptcollection-3.5.
|
16
|
-
scriptcollection-3.5.
|
17
|
-
scriptcollection-3.5.
|
13
|
+
scriptcollection-3.5.142.dist-info/METADATA,sha256=VXRsnflOOEDstkfXPdrZJtVFVRaSA33zxSboT_AiOEE,7694
|
14
|
+
scriptcollection-3.5.142.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
15
|
+
scriptcollection-3.5.142.dist-info/entry_points.txt,sha256=AvmVO9iyWImExpvzL3YYQ9AOEiUIN9guPRRG_W_VNWY,4116
|
16
|
+
scriptcollection-3.5.142.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
17
|
+
scriptcollection-3.5.142.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|