ripple-down-rules 0.5.88__py3-none-any.whl → 0.5.89__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.
- ripple_down_rules/__init__.py +1 -1
- ripple_down_rules/user_interface/prompt.py +21 -21
- {ripple_down_rules-0.5.88.dist-info → ripple_down_rules-0.5.89.dist-info}/METADATA +1 -1
- {ripple_down_rules-0.5.88.dist-info → ripple_down_rules-0.5.89.dist-info}/RECORD +7 -7
- {ripple_down_rules-0.5.88.dist-info → ripple_down_rules-0.5.89.dist-info}/WHEEL +0 -0
- {ripple_down_rules-0.5.88.dist-info → ripple_down_rules-0.5.89.dist-info}/licenses/LICENSE +0 -0
- {ripple_down_rules-0.5.88.dist-info → ripple_down_rules-0.5.89.dist-info}/top_level.txt +0 -0
ripple_down_rules/__init__.py
CHANGED
@@ -102,15 +102,16 @@ class UserPrompt:
|
|
102
102
|
prompt_str = f"Give conditions on when can the rule be evaluated for:"
|
103
103
|
case_query.scope.update({'case': case_query.case})
|
104
104
|
shell = None
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
105
|
+
with self.shell_lock:
|
106
|
+
if self.viewer is None:
|
107
|
+
prompt_str = self.construct_prompt_str_for_shell(case_query, prompt_for, prompt_str)
|
108
|
+
shell = IPythonShell(header=prompt_str, prompt_for=prompt_for, case_query=case_query,
|
109
|
+
code_to_modify=code_to_modify)
|
110
|
+
else:
|
110
111
|
|
111
|
-
|
112
|
-
|
113
|
-
|
112
|
+
self.viewer.update_for_case_query(case_query, prompt_str,
|
113
|
+
prompt_for=prompt_for, code_to_modify=code_to_modify)
|
114
|
+
return self.prompt_user_input_and_parse_to_expression(shell=shell)
|
114
115
|
|
115
116
|
|
116
117
|
def construct_prompt_str_for_shell(self, case_query: CaseQuery, prompt_for: PromptFor,
|
@@ -167,16 +168,15 @@ class UserPrompt:
|
|
167
168
|
:param shell: The Ipython shell to use for prompting the user.
|
168
169
|
:return: The user input.
|
169
170
|
"""
|
170
|
-
|
171
|
-
if
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
return user_input
|
171
|
+
if self.viewer is None:
|
172
|
+
shell = IPythonShell() if shell is None else shell
|
173
|
+
shell.run()
|
174
|
+
user_input = shell.user_input
|
175
|
+
else:
|
176
|
+
app = QApplication.instance()
|
177
|
+
if app is None:
|
178
|
+
raise RuntimeError("QApplication instance is None. Please run the application first.")
|
179
|
+
self.viewer.show()
|
180
|
+
app.exec()
|
181
|
+
user_input = self.viewer.user_input
|
182
|
+
return user_input
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.89
|
4
4
|
Summary: Implements the various versions of Ripple Down Rules (RDR) for knowledge representation and reasoning.
|
5
5
|
Author-email: Abdelrhman Bassiouny <abassiou@uni-bremen.de>
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
@@ -1,4 +1,4 @@
|
|
1
|
-
ripple_down_rules/__init__.py,sha256=
|
1
|
+
ripple_down_rules/__init__.py,sha256=oOJbyOSBUiEhjmjcUnRZFxEukTio6qEyFU0r-oVaMgg,100
|
2
2
|
ripple_down_rules/experts.py,sha256=J4VaYPKrAMNcoP0JRenZpx9IHLLoeFdl0QZKZzjFFkM,12768
|
3
3
|
ripple_down_rules/helpers.py,sha256=v4oE7C5PfQUVJfSUs1FfLHEwrJXEHJLn4vJhJMvyCR8,4453
|
4
4
|
ripple_down_rules/rdr.py,sha256=C6bvlq6MsKa2Mym1wW6JUMj705aCaoihTP279TM6eT0,55218
|
@@ -15,10 +15,10 @@ ripple_down_rules/user_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
15
15
|
ripple_down_rules/user_interface/gui.py,sha256=_lgZAUXxxaBUFQJAHjA5TBPp6XEvJ62t-kSN8sPsocE,27379
|
16
16
|
ripple_down_rules/user_interface/ipython_custom_shell.py,sha256=6v99tlNcfRyZpnPxq3FfqgFgxbJ5zkA2jVAXamTH1C0,6575
|
17
17
|
ripple_down_rules/user_interface/object_diagram.py,sha256=FEa2HaYR9QmTE6NsOwBvZ0jqmu3DKyg6mig2VE5ZP4Y,4956
|
18
|
-
ripple_down_rules/user_interface/prompt.py,sha256=
|
18
|
+
ripple_down_rules/user_interface/prompt.py,sha256=udD4SUe4Agm7mWqB9X-b4g2AGQg-Ow3OtZdw9nY-TsY,8759
|
19
19
|
ripple_down_rules/user_interface/template_file_creator.py,sha256=ELHYhZEjHsMdG5ebbOghfZtPBpPtuJDWQRAkLpfcSFM,13553
|
20
|
-
ripple_down_rules-0.5.
|
21
|
-
ripple_down_rules-0.5.
|
22
|
-
ripple_down_rules-0.5.
|
23
|
-
ripple_down_rules-0.5.
|
24
|
-
ripple_down_rules-0.5.
|
20
|
+
ripple_down_rules-0.5.89.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
21
|
+
ripple_down_rules-0.5.89.dist-info/METADATA,sha256=z3Ed4CzU7Dt3SlwuWoMc7wKHqr66NuN1K3Xwpe0Z2po,48214
|
22
|
+
ripple_down_rules-0.5.89.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
23
|
+
ripple_down_rules-0.5.89.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
|
24
|
+
ripple_down_rules-0.5.89.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|