ripple-down-rules 0.5.80__py3-none-any.whl → 0.5.81__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/rdr.py +7 -9
- {ripple_down_rules-0.5.80.dist-info → ripple_down_rules-0.5.81.dist-info}/METADATA +1 -1
- {ripple_down_rules-0.5.80.dist-info → ripple_down_rules-0.5.81.dist-info}/RECORD +7 -7
- {ripple_down_rules-0.5.80.dist-info → ripple_down_rules-0.5.81.dist-info}/WHEEL +0 -0
- {ripple_down_rules-0.5.80.dist-info → ripple_down_rules-0.5.81.dist-info}/licenses/LICENSE +0 -0
- {ripple_down_rules-0.5.80.dist-info → ripple_down_rules-0.5.81.dist-info}/top_level.txt +0 -0
ripple_down_rules/__init__.py
CHANGED
ripple_down_rules/rdr.py
CHANGED
@@ -537,7 +537,9 @@ class RDRWithCodeWriter(RippleDownRules, ABC):
|
|
537
537
|
if scope is None:
|
538
538
|
continue
|
539
539
|
defs_types.update(make_set(scope.values()))
|
540
|
-
|
540
|
+
corner_case_types = rule.get_corner_case_types_to_import()
|
541
|
+
if corner_case_types is not None:
|
542
|
+
cases_types.update(corner_case_types)
|
541
543
|
defs_types.add(self.case_type)
|
542
544
|
main_types = set()
|
543
545
|
main_types.add(self.case_type)
|
@@ -1145,16 +1147,12 @@ class GeneralRDR(RippleDownRules):
|
|
1145
1147
|
is required in case of relative imports in the generated python file.
|
1146
1148
|
:return: The imports needed for the generated python file.
|
1147
1149
|
"""
|
1148
|
-
all_types = set()
|
1149
|
-
# add type hints
|
1150
|
-
all_types.update({Dict, Any})
|
1151
|
-
# import rdr type
|
1152
|
-
all_types.add(general_rdr_classify)
|
1153
|
-
# add case type
|
1154
|
-
all_types.update({Case, create_case, self.case_type})
|
1155
1150
|
# get the imports from the types
|
1156
|
-
imports = get_imports_from_types(
|
1151
|
+
imports = get_imports_from_types([self.case_type], target_file_path=file_path, package_name=package_name)
|
1157
1152
|
# add rdr python generated functions.
|
1153
|
+
imports.append("from typing import Dict, Any")
|
1154
|
+
imports.append("from ripple_down_rules.datastructures.case import Case, create_case")
|
1155
|
+
imports.append("from ripple_down_rules.helpers import general_rdr_classify")
|
1158
1156
|
for rdr_key, rdr in self.start_rules_dict.items():
|
1159
1157
|
imports.append(
|
1160
1158
|
f"from . import {rdr.generated_python_file_name} as {self.rdr_key_to_function_name(rdr_key)}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.81
|
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,7 +1,7 @@
|
|
1
|
-
ripple_down_rules/__init__.py,sha256=
|
1
|
+
ripple_down_rules/__init__.py,sha256=Hf2qy117DtlfEhbMoyreqc3k02Y_tLUwlxP1IJySXWA,100
|
2
2
|
ripple_down_rules/experts.py,sha256=bwozulI1rv0uyaMZQqEgapDO-s8wvW0D6Jqxmvu5fik,12610
|
3
3
|
ripple_down_rules/helpers.py,sha256=v4oE7C5PfQUVJfSUs1FfLHEwrJXEHJLn4vJhJMvyCR8,4453
|
4
|
-
ripple_down_rules/rdr.py,sha256=
|
4
|
+
ripple_down_rules/rdr.py,sha256=2gh_kRmsR58pLqY4OvhjOgHSIYIcST7tI7jjVQ8yhD4,55214
|
5
5
|
ripple_down_rules/rdr_decorators.py,sha256=0sk7izDB53lTKSB9fm33vQahmY_05FyCOWljyQOMB0U,9072
|
6
6
|
ripple_down_rules/rules.py,sha256=iVevv6iZ-6L2IPI0ZYbBjxBymXEQMmJGRFhiKUS-NmA,20352
|
7
7
|
ripple_down_rules/start-code-server.sh,sha256=otClk7VmDgBOX2TS_cjws6K0UwvgAUJhoA0ugkPCLqQ,949
|
@@ -17,8 +17,8 @@ ripple_down_rules/user_interface/ipython_custom_shell.py,sha256=Jrf7NxOdlrwGXH0X
|
|
17
17
|
ripple_down_rules/user_interface/object_diagram.py,sha256=FEa2HaYR9QmTE6NsOwBvZ0jqmu3DKyg6mig2VE5ZP4Y,4956
|
18
18
|
ripple_down_rules/user_interface/prompt.py,sha256=AkkltdDIaioN43lkRKDPKSjJcmdSSGZDMYz7AL7X9lE,8082
|
19
19
|
ripple_down_rules/user_interface/template_file_creator.py,sha256=xWUt-RHRqrvoMo74o-bMLo8xNxil68wgbOZAMADZp2A,13570
|
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.81.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
21
|
+
ripple_down_rules-0.5.81.dist-info/METADATA,sha256=P3JwR4h_dcxZ9w-S7DSflG8BS9NZvW-IrCNF1-H3-dA,48214
|
22
|
+
ripple_down_rules-0.5.81.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
23
|
+
ripple_down_rules-0.5.81.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
|
24
|
+
ripple_down_rules-0.5.81.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|