ripple-down-rules 0.6.40__py3-none-any.whl → 0.6.42__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 -3
- {ripple_down_rules-0.6.40.dist-info → ripple_down_rules-0.6.42.dist-info}/METADATA +1 -1
- {ripple_down_rules-0.6.40.dist-info → ripple_down_rules-0.6.42.dist-info}/RECORD +7 -7
- {ripple_down_rules-0.6.40.dist-info → ripple_down_rules-0.6.42.dist-info}/WHEEL +0 -0
- {ripple_down_rules-0.6.40.dist-info → ripple_down_rules-0.6.42.dist-info}/licenses/LICENSE +0 -0
- {ripple_down_rules-0.6.40.dist-info → ripple_down_rules-0.6.42.dist-info}/top_level.txt +0 -0
ripple_down_rules/__init__.py
CHANGED
ripple_down_rules/rdr.py
CHANGED
@@ -221,13 +221,13 @@ class RippleDownRules(SubclassJSONSerializer, ABC):
|
|
221
221
|
rdr = cls.from_python(model_dir, parent_package_name=package_name, python_file_path=python_file_path)
|
222
222
|
else:
|
223
223
|
rdr.update_from_python(model_dir, package_name=package_name)
|
224
|
-
rdr.save_dir = load_dir
|
225
|
-
rdr.model_name = model_name
|
226
224
|
rdr.to_json_file(json_file)
|
227
|
-
except (FileNotFoundError, ValueError, SyntaxError) as e:
|
225
|
+
except (FileNotFoundError, ValueError, SyntaxError, ModuleNotFoundError) as e:
|
228
226
|
logger.warning(f"Could not load the python file for the model {model_name} from {model_dir}. "
|
229
227
|
f"Make sure the file exists and is valid.")
|
230
228
|
rdr.save(save_dir=load_dir, model_name=model_name, package_name=package_name)
|
229
|
+
rdr.save_dir = load_dir
|
230
|
+
rdr.model_name = model_name
|
231
231
|
return rdr
|
232
232
|
|
233
233
|
@classmethod
|
@@ -873,9 +873,13 @@ class RDRWithCodeWriter(RippleDownRules, ABC):
|
|
873
873
|
|
874
874
|
if python_file_path is None:
|
875
875
|
main_file_name = get_file_that_ends_with(model_dir, f"_{self.get_acronym().lower()}.py")
|
876
|
+
if not main_file_name:
|
877
|
+
raise FileNotFoundError(f"Could not find the main python file for the model {self.model_name} in {model_dir}.")
|
876
878
|
main_file_path = os.path.join(model_dir, main_file_name)
|
877
879
|
else:
|
878
880
|
main_file_path = python_file_path
|
881
|
+
if not os.path.exists(main_file_path):
|
882
|
+
raise ModuleNotFoundError(main_file_path)
|
879
883
|
self.generated_python_file_name = Path(main_file_path).name.replace(".py", "")
|
880
884
|
|
881
885
|
defs_file_path = main_file_path.replace(".py", "_defs.py")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.42
|
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=Cz1RyE7DY-e05V8keWdWjsykmUF-cCRomJdyuWL81l0,99
|
2
2
|
ripple_down_rules/experts.py,sha256=KXwWCmDrCffu9HW3yNewqWc1e5rnPI5Rnc981w_5M7U,17896
|
3
3
|
ripple_down_rules/helpers.py,sha256=X1psHOqrb4_xYN4ssQNB8S9aRKKsqgihAyWJurN0dqk,5499
|
4
|
-
ripple_down_rules/rdr.py,sha256
|
4
|
+
ripple_down_rules/rdr.py,sha256=8qiuaoJ56j-F0b3Ob0sTMlizyYS1YCkWu0bPr5_0TZo,81490
|
5
5
|
ripple_down_rules/rdr_decorators.py,sha256=xoBGsIJMkJYUdsrsEaPZqoAsGuXkuVZAKCoP-xD2Iv8,11668
|
6
6
|
ripple_down_rules/rules.py,sha256=32apFTxtWXKRQ2MJDnqc1URjRJDnNBe_t5A_gGfKNd0,29349
|
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=RLdPqPxx-a0Sh74U
|
|
17
17
|
ripple_down_rules/user_interface/object_diagram.py,sha256=FEa2HaYR9QmTE6NsOwBvZ0jqmu3DKyg6mig2VE5ZP4Y,4956
|
18
18
|
ripple_down_rules/user_interface/prompt.py,sha256=WPbw_8_-8SpF2ISyRZRuFwPKBEuGC4HaX3lbCPFHhh8,10314
|
19
19
|
ripple_down_rules/user_interface/template_file_creator.py,sha256=uSbosZS15MOR3Nv7M3MrFuoiKXyP4cBId-EK3I6stHM,13660
|
20
|
-
ripple_down_rules-0.6.
|
21
|
-
ripple_down_rules-0.6.
|
22
|
-
ripple_down_rules-0.6.
|
23
|
-
ripple_down_rules-0.6.
|
24
|
-
ripple_down_rules-0.6.
|
20
|
+
ripple_down_rules-0.6.42.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
21
|
+
ripple_down_rules-0.6.42.dist-info/METADATA,sha256=0Cl2r-t_u-UDFbanHIbLnUnJ5vwTghzmZraqDlwxTAA,48294
|
22
|
+
ripple_down_rules-0.6.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
23
|
+
ripple_down_rules-0.6.42.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
|
24
|
+
ripple_down_rules-0.6.42.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|