robert 2.2.0__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.
Files changed (261) hide show
  1. robert/__init__.py +9 -0
  2. robert/__main__.py +20 -0
  3. robert/_version.py +3 -0
  4. robert/api.py +646 -0
  5. robert/aqme.py +280 -0
  6. robert/argument_parser.py +98 -0
  7. robert/checkml.py +433 -0
  8. robert/checkml_score.py +50 -0
  9. robert/curate.py +217 -0
  10. robert/evaluate_bot_retrieval.py +125 -0
  11. robert/evaluate_bot_support.py +102 -0
  12. robert/evaluate_workflow_summaries.py +87 -0
  13. robert/export_bot_docs_knowledge.py +1632 -0
  14. robert/generate.py +249 -0
  15. robert/generate_utils.py +311 -0
  16. robert/gui_easyrob/__init__.py +0 -0
  17. robert/gui_easyrob/assets/gif_easyrob.gif +0 -0
  18. robert/gui_easyrob/bot/__init__.py +47 -0
  19. robert/gui_easyrob/bot/answer_metadata.py +198 -0
  20. robert/gui_easyrob/bot/bot_context.py +679 -0
  21. robert/gui_easyrob/bot/bot_engine.py +1100 -0
  22. robert/gui_easyrob/bot/bot_panel.py +1231 -0
  23. robert/gui_easyrob/bot/bot_rag.py +1178 -0
  24. robert/gui_easyrob/bot/bot_window.py +39 -0
  25. robert/gui_easyrob/bot/bot_worker.py +149 -0
  26. robert/gui_easyrob/bot/credential_store.py +143 -0
  27. robert/gui_easyrob/bot/error_parser.py +105 -0
  28. robert/gui_easyrob/bot/evidence_policy.py +164 -0
  29. robert/gui_easyrob/bot/heuristics.py +859 -0
  30. robert/gui_easyrob/bot/icons.py +56 -0
  31. robert/gui_easyrob/bot/input_csv_audit.py +212 -0
  32. robert/gui_easyrob/bot/knowledge/aqme_context.json +5907 -0
  33. robert/gui_easyrob/bot/knowledge/robert_context.json +4817 -0
  34. robert/gui_easyrob/bot/knowledge/ui_context.json +8293 -0
  35. robert/gui_easyrob/bot/knowledge_schema.py +1252 -0
  36. robert/gui_easyrob/bot/knowledge_sources/aqme_user_guidance.json +442 -0
  37. robert/gui_easyrob/bot/knowledge_sources/coverage_manifest.json +95 -0
  38. robert/gui_easyrob/bot/knowledge_sources/robert_user_guidance.json +471 -0
  39. robert/gui_easyrob/bot/knowledge_sources/ui_user_guidance.json +1312 -0
  40. robert/gui_easyrob/bot/llm_providers.py +1573 -0
  41. robert/gui_easyrob/bot/online_docs.py +105 -0
  42. robert/gui_easyrob/bot/prompt_policy.py +575 -0
  43. robert/gui_easyrob/bot/question_intent.py +562 -0
  44. robert/gui_easyrob/bot/response_quality.py +104 -0
  45. robert/gui_easyrob/bot/result_insights.py +225 -0
  46. robert/gui_easyrob/bot/token_usage.py +75 -0
  47. robert/gui_easyrob/bot/workflow_results.py +1396 -0
  48. robert/gui_easyrob/checkml_launcher.py +15 -0
  49. robert/gui_easyrob/easyrob.py +29 -0
  50. robert/gui_easyrob/easyrob_launcher.py +113 -0
  51. robert/gui_easyrob/main/__init__.py +9 -0
  52. robert/gui_easyrob/main/window.py +5152 -0
  53. robert/gui_easyrob/result_navigation.py +14 -0
  54. robert/gui_easyrob/tabs/__init__.py +23 -0
  55. robert/gui_easyrob/tabs/advanced_options.py +370 -0
  56. robert/gui_easyrob/tabs/aqme.py +1234 -0
  57. robert/gui_easyrob/tabs/checkml.py +898 -0
  58. robert/gui_easyrob/tabs/images.py +427 -0
  59. robert/gui_easyrob/tabs/interactive_predictions.py +555 -0
  60. robert/gui_easyrob/tabs/molssi.py +447 -0
  61. robert/gui_easyrob/tabs/predictions.py +484 -0
  62. robert/gui_easyrob/tabs/result_catalog.py +170 -0
  63. robert/gui_easyrob/tabs/results.py +490 -0
  64. robert/gui_easyrob/tabs/results_workspace.py +120 -0
  65. robert/gui_easyrob/test_bot_input_csv_audit.py +152 -0
  66. robert/gui_easyrob/test_bot_question_routing.py +383 -0
  67. robert/gui_easyrob/test_bot_result_analysis.py +356 -0
  68. robert/gui_easyrob/test_bot_retrieval_evaluation.py +110 -0
  69. robert/gui_easyrob/test_bot_ui_integration.py +278 -0
  70. robert/gui_easyrob/test_checkml_app_mode.py +124 -0
  71. robert/gui_easyrob/test_checkml_completion.py +57 -0
  72. robert/gui_easyrob/test_checkml_defaults.py +37 -0
  73. robert/gui_easyrob/test_checkml_result_summary.py +113 -0
  74. robert/gui_easyrob/test_checkml_web_mode.py +57 -0
  75. robert/gui_easyrob/test_dialog_layout.py +33 -0
  76. robert/gui_easyrob/test_gui_bot_regressions.py +320 -0
  77. robert/gui_easyrob/test_molssi_auto.py +569 -0
  78. robert/gui_easyrob/test_tutorial_view.py +215 -0
  79. robert/gui_easyrob/tutorials/check_model.md +25 -0
  80. robert/gui_easyrob/tutorials/chemdraw.md +49 -0
  81. robert/gui_easyrob/tutorials/csv.md +53 -0
  82. robert/gui_easyrob/tutorials/descriptors.md +21 -0
  83. robert/gui_easyrob/tutorials/overview.md +65 -0
  84. robert/gui_easyrob/tutorials/predictions.md +25 -0
  85. robert/gui_easyrob/tutorials/robbot.md +29 -0
  86. robert/gui_easyrob/tutorials/tutorial_images/check_model/check_model_1.png +0 -0
  87. robert/gui_easyrob/tutorials/tutorial_images/check_model/check_model_2.png +0 -0
  88. robert/gui_easyrob/tutorials/tutorial_images/check_model/check_model_3.png +0 -0
  89. robert/gui_easyrob/tutorials/tutorial_images/check_model/check_model_4.png +0 -0
  90. robert/gui_easyrob/tutorials/tutorial_images/check_model/check_model_5.png +0 -0
  91. robert/gui_easyrob/tutorials/tutorial_images/check_model/check_model_6.png +0 -0
  92. robert/gui_easyrob/tutorials/tutorial_images/check_model/check_model_7.png +0 -0
  93. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_1.png +0 -0
  94. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_10.png +0 -0
  95. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_11.png +0 -0
  96. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_12.png +0 -0
  97. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_13.png +0 -0
  98. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_2.png +0 -0
  99. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_3.png +0 -0
  100. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_4.png +0 -0
  101. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_5.png +0 -0
  102. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_6.png +0 -0
  103. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_7.png +0 -0
  104. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_8.png +0 -0
  105. robert/gui_easyrob/tutorials/tutorial_images/chemdraw/chemdraw_9.png +0 -0
  106. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_1.png +0 -0
  107. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_1_1.png +0 -0
  108. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_1_2.png +0 -0
  109. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_1_3.png +0 -0
  110. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_1_4.png +0 -0
  111. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_1_5.png +0 -0
  112. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_2.png +0 -0
  113. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_3.png +0 -0
  114. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_4.png +0 -0
  115. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_5.png +0 -0
  116. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_6.png +0 -0
  117. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_7.png +0 -0
  118. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_8.png +0 -0
  119. robert/gui_easyrob/tutorials/tutorial_images/csv/csv_9.png +0 -0
  120. robert/gui_easyrob/tutorials/tutorial_images/descriptors/descriptors_1.png +0 -0
  121. robert/gui_easyrob/tutorials/tutorial_images/descriptors/descriptors_2.png +0 -0
  122. robert/gui_easyrob/tutorials/tutorial_images/descriptors/descriptors_3.png +0 -0
  123. robert/gui_easyrob/tutorials/tutorial_images/descriptors/descriptors_4.png +0 -0
  124. robert/gui_easyrob/tutorials/tutorial_images/descriptors/descriptors_5.png +0 -0
  125. robert/gui_easyrob/tutorials/tutorial_images/descriptors/descriptors_6.png +0 -0
  126. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1.png +0 -0
  127. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_1.png +0 -0
  128. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_2.png +0 -0
  129. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_3.png +0 -0
  130. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_4.png +0 -0
  131. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_5.png +0 -0
  132. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_6.png +0 -0
  133. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_7.png +0 -0
  134. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_1_8.png +0 -0
  135. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_2.png +0 -0
  136. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_3.png +0 -0
  137. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_4.png +0 -0
  138. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_5.png +0 -0
  139. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_5_1.png +0 -0
  140. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_5_2.png +0 -0
  141. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_5_3.png +0 -0
  142. robert/gui_easyrob/tutorials/tutorial_images/overview/overview_6.png +0 -0
  143. robert/gui_easyrob/tutorials/tutorial_images/predictions/predictions_1.png +0 -0
  144. robert/gui_easyrob/tutorials/tutorial_images/predictions/predictions_1_1.png +0 -0
  145. robert/gui_easyrob/tutorials/tutorial_images/predictions/predictions_2.png +0 -0
  146. robert/gui_easyrob/tutorials/tutorial_images/predictions/predictions_3.png +0 -0
  147. robert/gui_easyrob/tutorials/tutorial_images/predictions/predictions_4.png +0 -0
  148. robert/gui_easyrob/tutorials/tutorial_images/predictions/predictions_5.png +0 -0
  149. robert/gui_easyrob/tutorials/tutorial_images/predictions/predictions_6.png +0 -0
  150. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_1.png +0 -0
  151. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_2.png +0 -0
  152. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_3.png +0 -0
  153. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_4.png +0 -0
  154. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_5.png +0 -0
  155. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_6.png +0 -0
  156. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_7.png +0 -0
  157. robert/gui_easyrob/tutorials/tutorial_images/robbot/robbot_8.png +0 -0
  158. robert/gui_easyrob/utils/__init__.py +0 -0
  159. robert/gui_easyrob/utils/aqme_utils.py +238 -0
  160. robert/gui_easyrob/utils/molssi_utils.py +584 -0
  161. robert/gui_easyrob/utils/predictions_utils.py +985 -0
  162. robert/gui_easyrob/utils/utils_gui.py +738 -0
  163. robert/gui_easyrob/version.py +68 -0
  164. robert/gui_easyrob/web/app.css +484 -0
  165. robert/gui_easyrob/web/app.html +134 -0
  166. robert/gui_easyrob/web/app.js +764 -0
  167. robert/gui_easyrob/web/checkml_brand.png +0 -0
  168. robert/gui_easyrob/web/easyrob_background.gif +0 -0
  169. robert/gui_easyrob/web/easyrob_background.png +0 -0
  170. robert/gui_easyrob/web/images.css +89 -0
  171. robert/gui_easyrob/web/images.html +39 -0
  172. robert/gui_easyrob/web/images.js +101 -0
  173. robert/gui_easyrob/web/results.js +499 -0
  174. robert/gui_easyrob/web/robert_brand.png +0 -0
  175. robert/gui_easyrob/web_dialogs.py +64 -0
  176. robert/gui_easyrob/web_results.py +253 -0
  177. robert/gui_easyrob/web_shell.py +684 -0
  178. robert/gui_easyrob/workflow_progress.py +89 -0
  179. robert/gui_easyrob/workflow_run_lock.py +27 -0
  180. robert/icons/CheckML_icon.png +0 -0
  181. robert/icons/Robert_icon.png +0 -0
  182. robert/icons/Robert_logo.jpg +0 -0
  183. robert/icons/Robert_logo_transparent.png +0 -0
  184. robert/icons/documentation_icon.png +0 -0
  185. robert/icons/info_icon.png +0 -0
  186. robert/icons/pdf_icon.png +0 -0
  187. robert/icons/play_icon.png +0 -0
  188. robert/icons/stop_icon.png +0 -0
  189. robert/icons/youtube_icon.ico +0 -0
  190. robert/predict.py +193 -0
  191. robert/predict_utils.py +410 -0
  192. robert/report/CheckML_logo.jpg +0 -0
  193. robert/report/GENERATE.png +0 -0
  194. robert/report/Robert_icon.ico +0 -0
  195. robert/report/Robert_logo.jpg +0 -0
  196. robert/report/Robert_logo1.jpg +0 -0
  197. robert/report/abbrev.png +0 -0
  198. robert/report/adv_anal.png +0 -0
  199. robert/report/checkml_pass.svg +3 -0
  200. robert/report/checkml_unclear.svg +3 -0
  201. robert/report/checkml_warning.svg +3 -0
  202. robert/report/features.png +0 -0
  203. robert/report/outliers.png +0 -0
  204. robert/report/pred.png +0 -0
  205. robert/report/repro.png +0 -0
  206. robert/report/robust_x.png +0 -0
  207. robert/report/robust_y_high.png +0 -0
  208. robert/report/robust_y_low.png +0 -0
  209. robert/report/score.png +0 -0
  210. robert/report/score_0.jpg +0 -0
  211. robert/report/score_1.jpg +0 -0
  212. robert/report/score_10.jpg +0 -0
  213. robert/report/score_2.jpg +0 -0
  214. robert/report/score_3.jpg +0 -0
  215. robert/report/score_4.jpg +0 -0
  216. robert/report/score_5.jpg +0 -0
  217. robert/report/score_6.jpg +0 -0
  218. robert/report/score_7.jpg +0 -0
  219. robert/report/score_8.jpg +0 -0
  220. robert/report/score_9.jpg +0 -0
  221. robert/report/score_gray_0.jpg +0 -0
  222. robert/report/score_gray_1.jpg +0 -0
  223. robert/report/score_gray_10.jpg +0 -0
  224. robert/report/score_gray_2.jpg +0 -0
  225. robert/report/score_gray_3.jpg +0 -0
  226. robert/report/score_gray_4.jpg +0 -0
  227. robert/report/score_gray_5.jpg +0 -0
  228. robert/report/score_gray_6.jpg +0 -0
  229. robert/report/score_gray_7.jpg +0 -0
  230. robert/report/score_gray_8.jpg +0 -0
  231. robert/report/score_gray_9.jpg +0 -0
  232. robert/report/score_w_1_0.jpg +0 -0
  233. robert/report/score_w_1_1.jpg +0 -0
  234. robert/report/score_w_2_0.jpg +0 -0
  235. robert/report/score_w_2_1.jpg +0 -0
  236. robert/report/score_w_2_2.jpg +0 -0
  237. robert/report/score_w_2_gray_0.jpg +0 -0
  238. robert/report/score_w_2_gray_1.jpg +0 -0
  239. robert/report/score_w_2_gray_2.jpg +0 -0
  240. robert/report/score_w_3_0.jpg +0 -0
  241. robert/report/score_w_3_1.jpg +0 -0
  242. robert/report/score_w_3_2.jpg +0 -0
  243. robert/report/score_w_3_3.jpg +0 -0
  244. robert/report/score_w_4_0.jpg +0 -0
  245. robert/report/score_w_4_1.JPG +0 -0
  246. robert/report/score_w_4_2.jpg +0 -0
  247. robert/report/score_w_4_3.jpg +0 -0
  248. robert/report/score_w_4_4.jpg +0 -0
  249. robert/report/transpa.png +0 -0
  250. robert/report/y_distrib.png +0 -0
  251. robert/report.py +2880 -0
  252. robert/report_utils.py +2270 -0
  253. robert/robert.py +181 -0
  254. robert/utils.py +4763 -0
  255. robert/verify.py +606 -0
  256. robert-2.2.0.dist-info/METADATA +55 -0
  257. robert-2.2.0.dist-info/RECORD +261 -0
  258. robert-2.2.0.dist-info/WHEEL +5 -0
  259. robert-2.2.0.dist-info/entry_points.txt +3 -0
  260. robert-2.2.0.dist-info/licenses/LICENSE +21 -0
  261. robert-2.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,278 @@
1
+ """Integration checks for bot context across the desktop workspaces."""
2
+
3
+ import os
4
+ from types import SimpleNamespace
5
+
6
+ os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
7
+
8
+ import pytest
9
+ from PySide6.QtWidgets import QApplication
10
+
11
+ from gui_easyrob.bot.bot_context import GuiSnapshot, build_gui_snapshot
12
+ from gui_easyrob.bot.bot_engine import BotEngine
13
+ from gui_easyrob.bot.answer_metadata import EvidenceOrigin, WebSearchMode
14
+ from gui_easyrob.bot.llm_providers import ProviderAnswer, build_llm_prompts
15
+ from gui_easyrob.bot.token_usage import TokenUsage
16
+ from gui_easyrob.bot.workflow_results import (
17
+ WorkflowResultSnapshot,
18
+ WorkflowStageResult,
19
+ render_workflow_answer,
20
+ render_workflow_evidence,
21
+ )
22
+ from gui_easyrob.main.window import EasyROB
23
+
24
+
25
+ class RecordingProvider:
26
+ spec = SimpleNamespace(supports_web_search=True)
27
+
28
+ def __init__(self):
29
+ self.calls = []
30
+
31
+ def generate_answer_with_usage(self, **kwargs):
32
+ self.calls.append(kwargs)
33
+ return ProviderAnswer("The recorded test RMSE is 4.2.", TokenUsage())
34
+
35
+
36
+ @pytest.mark.parametrize(
37
+ ("classic_tab", "stale_web_page", "expected_workflow", "expected_csv"),
38
+ (
39
+ ("ROBERT", "CheckML", "Full Workflow", "C:/runs/robert.csv"),
40
+ ("CheckML", "Workflow", "CHECKML", "C:/runs/checkml.csv"),
41
+ ),
42
+ )
43
+ def test_bot_uses_visible_classic_tab_instead_of_stale_web_page(
44
+ classic_tab, stale_web_page, expected_workflow, expected_csv,
45
+ ):
46
+ app = QApplication.instance() or QApplication([])
47
+ window = EasyROB()
48
+ classic = object()
49
+ web = object()
50
+ store_calls = []
51
+ expected_value = "4.2" if classic_tab == "ROBERT" else "8.7"
52
+
53
+ class RecordingStore:
54
+ def refresh(self, path, test_path, process_running=False):
55
+ store_calls.append(path)
56
+ source = "PREDICT/PREDICT_data.dat"
57
+ return WorkflowResultSnapshot(
58
+ kind="ROBERT", status="completed", root_name="run", summary_available=True,
59
+ stages=(WorkflowStageResult(name="PREDICT", status="completed", source=source),),
60
+ metrics=(("RMSE", expected_value, "Test", source),),
61
+ )
62
+
63
+ try:
64
+ window.file_path = "C:/runs/robert.csv"
65
+ window.checkml_tab.csv_path = "C:/runs/checkml.csv"
66
+ window.tab_widget.setCurrentWidget(
67
+ window.checkml_tab if classic_tab == "CheckML" else window.tab_widget.widget(0)
68
+ )
69
+ window.web_active_page = stale_web_page
70
+ window._ui_stack = SimpleNamespace(currentWidget=lambda: classic)
71
+ window._web_shell = SimpleNamespace(view=web)
72
+ window.workflow_result_store = RecordingStore()
73
+
74
+ window._refresh_workflow_result_snapshot()
75
+ snapshot = build_gui_snapshot(window)
76
+ answer = BotEngine().answer(
77
+ "What was the test RMSE in my run?", snapshot, "Heuristic", "Test", "",
78
+ )
79
+
80
+ assert snapshot.active_tab == classic_tab
81
+ assert snapshot.workflow == expected_workflow
82
+ assert snapshot.main_csv_path == expected_csv
83
+ assert store_calls == [expected_csv]
84
+ assert expected_value in answer
85
+ finally:
86
+ del window._ui_stack
87
+ del window._web_shell
88
+ window.close()
89
+
90
+
91
+ def test_bot_uses_web_page_when_web_surface_is_visible():
92
+ app = QApplication.instance() or QApplication([])
93
+ window = EasyROB()
94
+ classic = object()
95
+ web = object()
96
+ try:
97
+ window.file_path = "C:/runs/robert.csv"
98
+ window.checkml_tab.csv_path = "C:/runs/checkml.csv"
99
+ window.web_active_page = "CheckML"
100
+ window._ui_stack = SimpleNamespace(currentWidget=lambda: web)
101
+ window._web_shell = SimpleNamespace(view=web)
102
+
103
+ snapshot = build_gui_snapshot(window)
104
+
105
+ assert snapshot.active_tab == "CheckML"
106
+ assert snapshot.workflow == "CHECKML"
107
+ assert snapshot.main_csv_path == "C:/runs/checkml.csv"
108
+ finally:
109
+ del window._ui_stack
110
+ del window._web_shell
111
+ window.close()
112
+
113
+
114
+ def test_bot_uses_checkml_run_when_results_view_points_to_checkml():
115
+ app = QApplication.instance() or QApplication([])
116
+ window = EasyROB()
117
+ try:
118
+ window.tab_widget.setTabEnabled(window.tab_widget.indexOf(window.results_workspace), True)
119
+ window.tab_widget.setCurrentWidget(window.results_workspace)
120
+ window.file_path = "C:/runs/robert.csv"
121
+ window.checkml_tab.csv_path = "C:/runs/checkml.csv"
122
+ window._result_view_source_path = "C:/runs/checkml.csv"
123
+ window._result_view_source_kind = "CHECKML"
124
+
125
+ snapshot = build_gui_snapshot(window)
126
+
127
+ assert snapshot.active_tab == "Results"
128
+ assert snapshot.workflow == "CHECKML"
129
+ assert snapshot.main_csv_path == "C:/runs/checkml.csv"
130
+ finally:
131
+ window.close()
132
+
133
+
134
+ @pytest.mark.parametrize(
135
+ ("workflow", "active_tab", "question", "expected_tutorial"),
136
+ (
137
+ ("Full Workflow", "ROBERT", "How do I run this workflow?", "Overview tutorial summary"),
138
+ ("CHECKML", "CheckML", "How do I run this workflow?", "Check ML tutorial summary"),
139
+ ("Full Workflow", "ROBERT", "¿Cómo ejecuto este workflow?", "Overview tutorial summary"),
140
+ ("CHECKML", "CheckML", "¿Cómo ejecuto este workflow?", "Check ML tutorial summary"),
141
+ ),
142
+ )
143
+ def test_contextual_workflow_guidance_follows_selected_workspace(
144
+ workflow, active_tab, question, expected_tutorial,
145
+ ):
146
+ snapshot = GuiSnapshot(
147
+ active_tab, workflow, "", "", "", "regression",
148
+ False, True, False, "", [],
149
+ )
150
+
151
+ answer = BotEngine().answer(
152
+ question, snapshot, "Heuristic", "Test", "",
153
+ )
154
+
155
+ assert expected_tutorial in answer
156
+ assert "Enable AQME Workflow" not in answer
157
+
158
+
159
+ def test_verify_explanation_in_checkml_does_not_invent_model_search():
160
+ snapshot = GuiSnapshot(
161
+ "CheckML", "CHECKML", "", "", "", "regression",
162
+ False, True, False, "", [],
163
+ )
164
+
165
+ answer = BotEngine().answer(
166
+ "What does VERIFY do here?", snapshot, "Heuristic", "Test", "",
167
+ )
168
+ system_prompt, _ = build_llm_prompts(
169
+ "What does VERIFY do here?", snapshot, (), question_intent="module-explanation",
170
+ )
171
+
172
+ assert "CheckML" in answer
173
+ assert "selected model" in answer
174
+ assert "after GENERATE" not in answer
175
+ assert "When the current GUI workflow is CHECKML" in system_prompt
176
+
177
+
178
+ def test_spanish_verify_explanation_in_checkml_uses_checkml_context():
179
+ snapshot = GuiSnapshot(
180
+ "CheckML", "CHECKML", "", "", "", "regression",
181
+ False, True, False, "", [],
182
+ )
183
+
184
+ answer = BotEngine().answer(
185
+ "¿Qué hace VERIFY aquí?", snapshot, "Heuristic", "Test", "",
186
+ )
187
+
188
+ assert "En CheckML" in answer
189
+ assert "modelo seleccionado" in answer
190
+ assert "after GENERATE" not in answer
191
+
192
+
193
+ @pytest.mark.parametrize("workflow", ("Full Workflow", "CHECKML"))
194
+ def test_bot_keeps_generic_explanations_separate_from_recorded_results(workflow):
195
+ source = "PREDICT/PREDICT_data.dat"
196
+ results = WorkflowResultSnapshot(
197
+ kind="ROBERT", status="completed", root_name="sample", summary_available=True,
198
+ stages=(WorkflowStageResult(name="PREDICT", status="completed", source=source),),
199
+ metrics=(("RMSE", "4.2", "Test", source),),
200
+ )
201
+ snapshot = GuiSnapshot(
202
+ "Results", workflow, "sample.csv", "", "target", "regression",
203
+ False, True, False, "", [], workflow_results=results,
204
+ )
205
+ engine = BotEngine()
206
+
207
+ generic = engine.answer("What is RMSE?", snapshot, "Heuristic", "Test", "")
208
+ specific = engine.answer("What was the test RMSE in my run?", snapshot, "Heuristic", "Test", "")
209
+
210
+ assert "4.2" not in generic
211
+ assert "4.2" in specific
212
+ assert source in specific
213
+
214
+
215
+ def test_result_metric_is_available_even_without_a_stage_summary():
216
+ source = "PREDICT/PREDICT_data.dat"
217
+ results = WorkflowResultSnapshot(
218
+ kind="ROBERT", status="completed", root_name="sample", summary_available=True,
219
+ metrics=(("RMSE", "4.2", "Test", source),),
220
+ )
221
+
222
+ answer = render_workflow_answer(results, "What was the test RMSE in my run?")
223
+ evidence = render_workflow_evidence(results, "What was the test RMSE in my run?")
224
+
225
+ assert "Test RMSE: **4.2**" in answer
226
+ assert "Metric Test RMSE=4.2" in evidence
227
+ assert "requested stage is not present" not in answer
228
+
229
+
230
+ @pytest.mark.parametrize(
231
+ ("workflow", "active_tab", "tutorial_label"),
232
+ (
233
+ ("Full Workflow", "ROBERT", "Overview"),
234
+ ("CHECKML", "CheckML", "Check ML"),
235
+ ),
236
+ )
237
+ def test_cloud_bot_receives_the_selected_workflow_tutorial(
238
+ workflow, active_tab, tutorial_label,
239
+ ):
240
+ provider = RecordingProvider()
241
+ engine = BotEngine(provider_registry={"Test": provider})
242
+ snapshot = GuiSnapshot(
243
+ active_tab, workflow, "", "", "", "regression",
244
+ False, True, False, "", [],
245
+ )
246
+
247
+ engine.answer_with_metadata(
248
+ "How do I run this workflow?", snapshot, "Cloud AI", "Test", "test-key",
249
+ )
250
+
251
+ assert len(provider.calls) == 1
252
+ assert provider.calls[0]["gui_context"].workflow == workflow
253
+ assert provider.calls[0]["tutorial_label"] == tutorial_label
254
+ assert provider.calls[0]["web_search_mode"] is WebSearchMode.OFF
255
+
256
+
257
+ def test_cloud_bot_uses_local_result_evidence_for_a_metric_question():
258
+ provider = RecordingProvider()
259
+ engine = BotEngine(provider_registry={"Test": provider})
260
+ source = "PREDICT/PREDICT_data.dat"
261
+ results = WorkflowResultSnapshot(
262
+ kind="ROBERT", status="completed", root_name="sample", summary_available=True,
263
+ stages=(WorkflowStageResult(name="PREDICT", status="completed", source=source),),
264
+ metrics=(("RMSE", "4.2", "Test", source),),
265
+ )
266
+ snapshot = GuiSnapshot(
267
+ "Results", "Full Workflow", "sample.csv", "", "target", "regression",
268
+ False, True, False, "", [], workflow_results=results,
269
+ )
270
+
271
+ answer = engine.answer_with_metadata(
272
+ "What was the test RMSE in my run?", snapshot, "Cloud AI", "Test", "test-key",
273
+ )
274
+
275
+ assert len(provider.calls) == 1
276
+ assert provider.calls[0]["gui_context"].workflow_results.metrics == results.metrics
277
+ assert provider.calls[0]["web_search_mode"] is WebSearchMode.OFF
278
+ assert answer.metadata.evidence_origin is EvidenceOrigin.LOCAL_SYSTEM
@@ -0,0 +1,124 @@
1
+ """Checks for the dedicated CheckML desktop entry point."""
2
+
3
+ import os
4
+ from types import SimpleNamespace
5
+
6
+ os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
7
+
8
+ from PySide6.QtWidgets import QApplication, QDialog, QLabel, QTabWidget
9
+
10
+ from gui_easyrob.main.window import EasyROB
11
+ from gui_easyrob.main.window import SOFTWARE_VERSIONS
12
+ from gui_easyrob.bot.bot_context import build_gui_snapshot
13
+ from gui_easyrob.web_shell import WorkflowBridge
14
+ from gui_easyrob import checkml_launcher
15
+
16
+
17
+ def test_checkml_mode_limits_navigation_and_tutorial():
18
+ app = QApplication.instance() or QApplication([])
19
+ window = EasyROB(mode="checkml")
20
+ try:
21
+ assert window.windowTitle() == "CheckML"
22
+ assert [window.tab_widget.tabText(index) for index in range(window.tab_widget.count())] == [
23
+ "CheckML", "Results",
24
+ ]
25
+ assert window.tab_widget.currentWidget() is window.checkml_tab
26
+ results_index = window.tab_widget.indexOf(window.results_workspace)
27
+ assert not window.tab_widget.isTabEnabled(results_index)
28
+ window.results_workspace.set_available("Report", True)
29
+ assert window.tab_widget.isTabEnabled(results_index)
30
+ assert window.tutorial_topics() == (("check_model", "Check ML"),)
31
+ assert window.bot_panel.suggested_combo.count() == 2
32
+ assert "CheckML" in window.bot_panel.subtitle_label.text()
33
+
34
+ window.web_active_page = "Results"
35
+ assert build_gui_snapshot(window).workflow == "CHECKML"
36
+ window.web_active_page = "CheckML"
37
+
38
+ window.show_tutorial_dialog()
39
+ app.processEvents()
40
+ tutorial_tabs = window.tutorial_dialog.findChildren(QTabWidget)
41
+ assert len(tutorial_tabs) == 1
42
+ assert tutorial_tabs[0].count() == 1
43
+ assert tutorial_tabs[0].tabText(0) == "Check ML"
44
+
45
+ bridge = WorkflowBridge(window)
46
+ try:
47
+ assert bridge.getTutorials().count('"id": "check_model"') == 1
48
+ assert '"id": "overview"' not in bridge.getTutorials()
49
+ finally:
50
+ bridge._timer.stop()
51
+ finally:
52
+ window.close()
53
+
54
+
55
+ def test_easyrob_mode_keeps_existing_navigation():
56
+ topics = EasyROB.tutorial_topics(SimpleNamespace(app_mode="easyrob"))
57
+ assert ("check_model", "Check ML") in topics
58
+ assert len(topics) > 1
59
+
60
+
61
+ def test_checkml_entry_selects_dedicated_mode(monkeypatch):
62
+ modes = []
63
+ monkeypatch.setattr(checkml_launcher, "launch_gui", lambda mode: modes.append(mode))
64
+ checkml_launcher.main()
65
+ assert modes == ["checkml"]
66
+
67
+
68
+ def test_checkml_only_mode_does_not_expose_or_dispatch_bot(monkeypatch):
69
+ app = QApplication.instance() or QApplication([])
70
+ window = EasyROB(mode="checkml")
71
+ calls = []
72
+ monkeypatch.setattr(window, "_start_bot_reply", lambda question, **kwargs: calls.append(question))
73
+ monkeypatch.setattr(window, "_ensure_bot_welcome_message", lambda: calls.append("welcome"))
74
+ bridge = WorkflowBridge(window)
75
+ try:
76
+ assert window.tab_widget.cornerWidget().isHidden()
77
+ assert not window.bot_toggle_btn.isEnabled()
78
+ window.handle_bot_question("How do I run this workflow?")
79
+ bridge.performAction("botOpen", "")
80
+ bridge.performAction("openBot", "")
81
+ bridge.setBotDraft("How do I run this workflow?")
82
+ assert not window.bot_toggle_btn.isChecked()
83
+ assert not window.bot_panel.input_edit.text()
84
+ assert calls == []
85
+ finally:
86
+ bridge._timer.stop()
87
+ window.close()
88
+
89
+
90
+ def test_embedded_checkml_keeps_the_robert_bot():
91
+ app = QApplication.instance() or QApplication([])
92
+ window = EasyROB()
93
+ try:
94
+ window.tab_widget.setCurrentWidget(window.checkml_tab)
95
+ assert window.bot_toggle_btn.isEnabled()
96
+ assert not window.tab_widget.cornerWidget().isHidden()
97
+ finally:
98
+ window.close()
99
+
100
+
101
+ def test_checkml_version_dialog_shows_its_identity_and_relevant_dependencies(monkeypatch):
102
+ app = QApplication.instance() or QApplication([])
103
+ window = EasyROB(mode="checkml")
104
+ captured = {}
105
+
106
+ def inspect_dialog(dialog):
107
+ captured["title"] = dialog.windowTitle()
108
+ captured["labels"] = [label.text() for label in dialog.findChildren(QLabel)]
109
+ return QDialog.Accepted
110
+
111
+ monkeypatch.setattr(QDialog, "exec", inspect_dialog)
112
+ try:
113
+ window.show_version_dialog()
114
+ assert captured["title"] == "About CheckML"
115
+ assert any("CheckML" in text for text in captured["labels"])
116
+ assert f"Version {SOFTWARE_VERSIONS['Dependencies']['ROBERT']}" in captured["labels"]
117
+ dependencies = next(text for text in captured["labels"] if "<table" in text)
118
+ assert "Python" in dependencies
119
+ assert "ROBERT" in dependencies
120
+ assert "AQME" not in dependencies
121
+ assert "xtb" not in dependencies
122
+ assert "OpenBabel" not in dependencies
123
+ finally:
124
+ window.close()
@@ -0,0 +1,57 @@
1
+ """Checks that failed CheckML runs report their outcome to the user."""
2
+
3
+ import os
4
+
5
+ os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
6
+
7
+ from PySide6.QtWidgets import QApplication
8
+
9
+ from gui_easyrob.tabs import checkml
10
+
11
+
12
+ def test_checkml_nonzero_exit_shows_error_notification(tmp_path, monkeypatch):
13
+ app = QApplication.instance() or QApplication([])
14
+ tab = checkml.CheckMLTab()
15
+ tab.csv_path = str(tmp_path / "input.csv")
16
+ notices = []
17
+ monkeypatch.setattr(checkml.QMessageBox, "warning", lambda _parent, title, message: notices.append((title, message)))
18
+ try:
19
+ tab._on_process_finished(2)
20
+ assert notices == [("CHECKML", "CHECKML finished with errors (exit code 2). Check the log above.")]
21
+ assert tab.run_button.isEnabled()
22
+ finally:
23
+ tab.close()
24
+
25
+
26
+ def test_checkml_missing_report_shows_error_notification(tmp_path, monkeypatch):
27
+ app = QApplication.instance() or QApplication([])
28
+ tab = checkml.CheckMLTab()
29
+ tab.csv_path = str(tmp_path / "input.csv")
30
+ notices = []
31
+ monkeypatch.setattr(checkml.QMessageBox, "warning", lambda _parent, title, message: notices.append((title, message)))
32
+ try:
33
+ tab._on_process_finished(0)
34
+ assert notices == [("CHECKML", "CHECKML did not create a new report. Check the log above.")]
35
+ assert tab.run_button.isEnabled()
36
+ finally:
37
+ tab.close()
38
+
39
+
40
+ def test_checkml_unchanged_report_from_previous_run_is_not_success(tmp_path, monkeypatch):
41
+ app = QApplication.instance() or QApplication([])
42
+ tab = checkml.CheckMLTab()
43
+ tab.csv_path = str(tmp_path / "input.csv")
44
+ report = tmp_path / "ROBERT_report_No_PFI.pdf"
45
+ report.write_bytes(b"previous report")
46
+ report_stat = report.stat()
47
+ tab._report_before_run = (report_stat.st_mtime_ns, report_stat.st_size)
48
+ warnings = []
49
+ successes = []
50
+ monkeypatch.setattr(checkml.QMessageBox, "warning", lambda _parent, title, message: warnings.append((title, message)))
51
+ monkeypatch.setattr(checkml.QMessageBox, "information", lambda _parent, title, message: successes.append((title, message)))
52
+ try:
53
+ tab._on_process_finished(0)
54
+ assert warnings == [("CHECKML", "CHECKML did not create a new report. Check the log above.")]
55
+ assert not successes
56
+ finally:
57
+ tab.close()
@@ -0,0 +1,37 @@
1
+ """Regression checks for CheckML's default column selection."""
2
+
3
+ from PySide6.QtWidgets import QApplication
4
+
5
+ from gui_easyrob.tabs.checkml import CheckMLTab
6
+
7
+
8
+ def test_smiles_is_ignored_when_it_is_the_first_csv_column(tmp_path):
9
+ app = QApplication.instance() or QApplication([])
10
+ csv_path = tmp_path / "molecules.csv"
11
+ csv_path.write_text(
12
+ "SMILES,code_name,target,MolWt\nCCO,compound_1,1.2,46.1\nCCC,compound_2,2.3,44.1\n",
13
+ encoding="utf-8",
14
+ )
15
+ tab = CheckMLTab()
16
+ try:
17
+ tab.set_csv_path(str(csv_path))
18
+ assert tab.y_dropdown.currentText() == "target"
19
+ assert "SMILES" in tab.get_ignored_columns()
20
+ finally:
21
+ tab.close()
22
+
23
+
24
+ def test_smiles_is_ignored_even_when_csv_parses_it_as_numeric(tmp_path):
25
+ app = QApplication.instance() or QApplication([])
26
+ csv_path = tmp_path / "numeric_smiles.csv"
27
+ csv_path.write_text(
28
+ "smiles,code_name,activity\n123,compound_1,1.2\n456,compound_2,2.3\n",
29
+ encoding="utf-8",
30
+ )
31
+ tab = CheckMLTab()
32
+ try:
33
+ tab.set_csv_path(str(csv_path))
34
+ assert tab.y_dropdown.currentText() == "activity"
35
+ assert "smiles" in tab.get_ignored_columns()
36
+ finally:
37
+ tab.close()
@@ -0,0 +1,113 @@
1
+ """Regression checks for the CheckML result summary action."""
2
+
3
+ import os
4
+
5
+ os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
6
+
7
+ from PySide6.QtWidgets import QApplication
8
+
9
+ from gui_easyrob.main.window import EasyROB
10
+ from gui_easyrob.bot.workflow_results import (
11
+ WorkflowReportAssessment,
12
+ WorkflowResultSnapshot,
13
+ WorkflowStageResult,
14
+ render_workflow_answer,
15
+ )
16
+ from gui_easyrob.web_shell import WorkflowBridge
17
+
18
+
19
+ def test_checkml_result_snapshot_refreshes_without_enabling_bot(tmp_path):
20
+ app = QApplication.instance() or QApplication([])
21
+ csv_path = tmp_path / "model_data.csv"
22
+ csv_path.write_text("code_name,target,descriptor\nfirst,1.0,2.0\n", encoding="utf-8")
23
+ verify_dir = tmp_path / "VERIFY"
24
+ verify_dir.mkdir()
25
+ (verify_dir / "VERIFY_data.dat").write_text("VERIFY completed\n", encoding="utf-8")
26
+
27
+ window = EasyROB(mode="checkml")
28
+ try:
29
+ window.checkml_tab.set_csv_path(str(csv_path))
30
+ assert not window.bot_panel.workflow_summary_button.isEnabled()
31
+ assert window.workflow_result_snapshot is not None
32
+ assert window.workflow_result_snapshot.summary_available
33
+ bridge = WorkflowBridge(window)
34
+ try:
35
+ assert not bridge._state()["bot"]["canSummarize"]
36
+ finally:
37
+ bridge._timer.stop()
38
+ finally:
39
+ window.close()
40
+
41
+
42
+ def test_checkml_only_summary_cannot_dispatch_bot(tmp_path, monkeypatch):
43
+ app = QApplication.instance() or QApplication([])
44
+ csv_path = tmp_path / "model_data.csv"
45
+ csv_path.write_text("code_name,target,descriptor\nfirst,1.0,2.0\n", encoding="utf-8")
46
+ verify_dir = tmp_path / "VERIFY"
47
+ verify_dir.mkdir()
48
+ (verify_dir / "VERIFY_data.dat").write_text("VERIFY completed\n", encoding="utf-8")
49
+
50
+ window = EasyROB(mode="checkml")
51
+ try:
52
+ window.checkml_tab.set_csv_path(str(csv_path))
53
+ window.bot_panel.mode_combo.setCurrentText("Cloud AI")
54
+ window.bot_panel.api_key_edit.clear()
55
+ calls = []
56
+ monkeypatch.setattr(window, "_start_bot_reply", lambda question, mode_override=None: calls.append(mode_override))
57
+ monkeypatch.setattr(window, "handle_bot_question", lambda question: calls.append("cloud"))
58
+ window._handle_workflow_summary_requested()
59
+ assert calls == []
60
+ window.bot_panel.api_key_edit.setText("configured-key")
61
+ window._handle_workflow_summary_requested()
62
+ assert calls == []
63
+ finally:
64
+ window.close()
65
+
66
+
67
+ def test_checkml_result_snapshot_refreshes_after_run_without_bot(tmp_path):
68
+ app = QApplication.instance() or QApplication([])
69
+ csv_path = tmp_path / "model_data.csv"
70
+ csv_path.write_text("code_name,target,descriptor\nfirst,1.0,2.0\n", encoding="utf-8")
71
+
72
+ window = EasyROB(mode="checkml")
73
+ try:
74
+ window.checkml_tab.set_csv_path(str(csv_path))
75
+ assert not window.bot_panel.workflow_summary_button.isEnabled()
76
+ verify_dir = tmp_path / "VERIFY"
77
+ verify_dir.mkdir()
78
+ (verify_dir / "VERIFY_data.dat").write_text("VERIFY completed\n", encoding="utf-8")
79
+ window.checkml_tab._refresh_sibling_tabs()
80
+ assert window.workflow_result_snapshot is not None
81
+ assert window.workflow_result_snapshot.summary_available
82
+ assert not window.bot_panel.workflow_summary_button.isEnabled()
83
+ finally:
84
+ window.close()
85
+
86
+
87
+ def test_full_summary_includes_workflow_when_prompt_mentions_prediction_quality():
88
+ snapshot = WorkflowResultSnapshot(
89
+ kind="ROBERT",
90
+ status="completed",
91
+ root_name="example",
92
+ summary_available=True,
93
+ stages=(WorkflowStageResult(name="VERIFY", status="completed", source="VERIFY_data.dat"),),
94
+ report_assessments=(
95
+ WorkflowReportAssessment(
96
+ variant="No PFI (MVL)",
97
+ model="MVL",
98
+ prediction_type="regression",
99
+ interpolation_score=0,
100
+ boundary_score=6,
101
+ ),
102
+ ),
103
+ )
104
+
105
+ answer = render_workflow_answer(
106
+ snapshot,
107
+ "Summarize the ROBERT report and do not use universal thresholds to call the model good or bad.",
108
+ full=True,
109
+ )
110
+
111
+ assert "**Workflow result:**" in answer
112
+ assert "**Stage results**" in answer
113
+ assert "**ROBERT report assessment**" in answer
@@ -0,0 +1,57 @@
1
+ """Browser check for the dedicated CheckML navigation."""
2
+
3
+ import os
4
+ import time
5
+ from pathlib import Path
6
+
7
+ os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
8
+ os.environ.setdefault("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu --no-sandbox")
9
+
10
+ from PySide6.QtCore import QUrl, QUrlQuery
11
+ from PySide6.QtWidgets import QApplication
12
+ from PySide6.QtWebEngineWidgets import QWebEngineView
13
+
14
+
15
+ def _wait_for(app, predicate, timeout=15):
16
+ deadline = time.monotonic() + timeout
17
+ while time.monotonic() < deadline:
18
+ app.processEvents()
19
+ if predicate():
20
+ return True
21
+ time.sleep(0.02)
22
+ return False
23
+
24
+
25
+ def test_checkml_web_mode_starts_on_checkml_and_hides_other_workflows():
26
+ app = QApplication.instance() or QApplication([])
27
+ view = QWebEngineView()
28
+ loaded = []
29
+ view.loadFinished.connect(loaded.append)
30
+ url = QUrl.fromLocalFile(str(Path(__file__).resolve().parent / "web" / "app.html"))
31
+ query = QUrlQuery()
32
+ query.addQueryItem("mode", "checkml")
33
+ url.setQuery(query)
34
+ try:
35
+ view.setUrl(url)
36
+ assert _wait_for(app, lambda: bool(loaded))
37
+ assert loaded == [True]
38
+ results = []
39
+ view.page().runJavaScript("""JSON.stringify({
40
+ title: document.title,
41
+ active: document.querySelector('.page.active').id,
42
+ hidden: getComputedStyle(document.querySelector('[data-page="workflow"]')).display,
43
+ checkml: getComputedStyle(document.querySelector('[data-page="checkml"]')).display,
44
+ documentation: document.querySelector('[data-action="openDocs"]').getClientRects().length > 0,
45
+ youtube: document.querySelector('[data-action="openYouTube"]').getClientRects().length > 0,
46
+ contact: document.querySelector('[data-action="openContact"]').getClientRects().length > 0,
47
+ version: document.querySelector('[data-action="openVersion"]').getClientRects().length > 0
48
+ })""", results.append)
49
+ assert _wait_for(app, lambda: bool(results))
50
+ assert '"title":"CheckML"' in results[0]
51
+ assert '"active":"page-checkml"' in results[0]
52
+ assert '"hidden":"none"' in results[0]
53
+ assert '"checkml":"flex"' in results[0]
54
+ for action in ("documentation", "youtube", "contact", "version"):
55
+ assert f'"{action}":true' in results[0]
56
+ finally:
57
+ view.close()