Skip to content

Commit 04fd99e

Browse files
committed
sync: update from internal GitLab repository
Content updated: Files: - module.xml Directories: - scripts/ - objectscript/ Synced at: 2025-08-03 16:51:07
1 parent e1168fe commit 04fd99e

File tree

9 files changed

+34
-30
lines changed

9 files changed

+34
-30
lines changed

module.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313
<!-- Dependencies -->
1414
<Dependencies>
1515
</Dependencies>
16-
17-
<!-- Installation Lifecycle -->
18-
<Lifecycle>
19-
<Setup>RAG.IPMInstaller.Setup</Setup>
20-
<Configure>RAG.IPMInstaller.Configure</Configure>
21-
<Activate>RAG.IPMInstaller.Activate</Activate>
22-
<Test>RAG.IPMInstaller.Test</Test>
23-
</Lifecycle>
2416
</Module>
2517
</Document>
2618
</Export>

objectscript/RAG/IFindSetup.CLS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ ClassMethod Setup() As %Status
7777
Return $$$OK
7878
}
7979

80-
}
80+
}

objectscript/RAG/IPMInstaller.CLS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,4 +973,4 @@ ClassMethod DisplayInfo()
973973
Write "============================================", !
974974
}
975975

976-
}
976+
}

objectscript/RAG/PythonBridge.CLS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,4 @@ ClassMethod DemoRAGFunctionality() As %Status
288288
Quit tSC
289289
}
290290

291-
}
291+
}

objectscript/RAG/SourceDocumentsFixed.CLS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ Storage Default
8484
<Type>%Storage.Persistent</Type>
8585
}
8686

87-
}
87+
}

objectscript/RAG/SourceDocumentsWithIFind.CLS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ Storage Default
6767
<Type>%Storage.Persistent</Type>
6868
}
6969

70-
}
70+
}

objectscript/RAG/VectorMigration.CLS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,4 @@ ClassMethod GetVectorUsingIRISFunctions(vectorValue As %String) As %String [ Sql
207207
Return ""
208208
}
209209

210-
}
210+
}

scripts/test_zpm_compilation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ def test_module_xml():
2222
tree = ET.parse(module_xml)
2323
root = tree.getroot()
2424

25-
# Check required elements
25+
# Check required elements (minimal ZPM structure)
2626
required_elements = [
2727
".//Name",
2828
".//Version",
2929
".//Description",
3030
".//Dependencies",
31-
".//Packaging",
32-
".//Lifecycle"
31+
".//Packaging"
3332
]
3433

3534
for element_path in required_elements:

scripts/utilities/validate_ipm_module.py

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,21 @@ def validate_module_xml(self) -> None:
8181
tree = ET.parse(module_xml_path)
8282
root = tree.getroot()
8383

84-
# Check required elements
84+
# Check required elements (minimal ZPM structure)
8585
required_elements = [
8686
".//Name",
8787
".//Version",
8888
".//Description",
8989
".//Dependencies",
90-
".//Packaging",
91-
".//Lifecycle"
90+
".//Packaging"
9291
]
9392

9493
missing_elements = []
9594
for element_path in required_elements:
9695
if root.find(element_path) is None:
9796
missing_elements.append(element_path)
9897

99-
# Check lifecycle methods
98+
# Optional lifecycle methods (not required for minimal ZPM structure)
10099
lifecycle_methods = [
101100
".//Setup",
102101
".//Configure",
@@ -105,9 +104,12 @@ def validate_module_xml(self) -> None:
105104
]
106105

107106
missing_lifecycle = []
108-
for method_path in lifecycle_methods:
109-
if root.find(method_path) is None:
110-
missing_lifecycle.append(method_path)
107+
lifecycle_element = root.find(".//Lifecycle")
108+
if lifecycle_element is not None:
109+
# Only check for lifecycle methods if Lifecycle element exists
110+
for method_path in lifecycle_methods:
111+
if root.find(method_path) is None:
112+
missing_lifecycle.append(method_path)
111113

112114
# Check parameters
113115
parameters = root.findall(".//Parameter")
@@ -127,17 +129,22 @@ def validate_module_xml(self) -> None:
127129
"valid_xml": True,
128130
"has_required_elements": len(missing_elements) == 0,
129131
"missing_elements": missing_elements,
130-
"has_lifecycle_methods": len(missing_lifecycle) == 0,
132+
"has_lifecycle_section": lifecycle_element is not None,
133+
"has_lifecycle_methods": len(missing_lifecycle) == 0 if lifecycle_element is not None else True,
131134
"missing_lifecycle": missing_lifecycle,
132135
"has_parameters": len(missing_parameters) == 0,
133136
"missing_parameters": missing_parameters,
134137
"parameter_count": len(parameters)
135138
}
136139

137-
if len(missing_elements) == 0 and len(missing_lifecycle) == 0:
138-
print("✅ module.xml structure is valid")
140+
# Only require core elements, lifecycle is optional
141+
if len(missing_elements) == 0:
142+
if lifecycle_element is not None and len(missing_lifecycle) > 0:
143+
print(f"⚠️ module.xml lifecycle has issues: {missing_lifecycle}")
144+
else:
145+
print("✅ module.xml structure is valid")
139146
else:
140-
print(f"⚠️ module.xml has issues: {missing_elements + missing_lifecycle}")
147+
print(f"⚠️ module.xml missing required elements: {missing_elements}")
141148

142149
except ET.ParseError as e:
143150
self.results["module_xml"] = {
@@ -420,9 +427,15 @@ def validate_installation_workflow(self) -> None:
420427

421428
def calculate_overall_status(self) -> None:
422429
"""Calculate overall validation status."""
423-
checks = [
430+
# Module XML check - only require core elements, lifecycle is optional
431+
module_xml_valid = (
424432
self.results["module_xml"].get("valid_xml", False) and
425-
self.results["module_xml"].get("has_required_elements", False),
433+
self.results["module_xml"].get("has_required_elements", False) and
434+
self.results["module_xml"].get("has_lifecycle_methods", True) # True if no lifecycle or all methods present
435+
)
436+
437+
checks = [
438+
module_xml_valid,
426439

427440
self.results["objectscript_classes"].get("all_classes_exist", False),
428441

0 commit comments

Comments
 (0)