ripple-down-rules 0.5.54__py3-none-any.whl → 0.5.56__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/utils.py +9 -2
- {ripple_down_rules-0.5.54.dist-info → ripple_down_rules-0.5.56.dist-info}/METADATA +1 -1
- {ripple_down_rules-0.5.54.dist-info → ripple_down_rules-0.5.56.dist-info}/RECORD +7 -7
- {ripple_down_rules-0.5.54.dist-info → ripple_down_rules-0.5.56.dist-info}/WHEEL +0 -0
- {ripple_down_rules-0.5.54.dist-info → ripple_down_rules-0.5.56.dist-info}/licenses/LICENSE +0 -0
- {ripple_down_rules-0.5.54.dist-info → ripple_down_rules-0.5.56.dist-info}/top_level.txt +0 -0
ripple_down_rules/__init__.py
CHANGED
ripple_down_rules/utils.py
CHANGED
@@ -18,6 +18,8 @@ from textwrap import dedent
|
|
18
18
|
from types import NoneType
|
19
19
|
from typing import List
|
20
20
|
|
21
|
+
from casadi import conic_n_out
|
22
|
+
|
21
23
|
try:
|
22
24
|
import matplotlib
|
23
25
|
from matplotlib import pyplot as plt
|
@@ -114,7 +116,7 @@ def get_imports_from_scope(scope: Dict[str, Any]) -> List[str]:
|
|
114
116
|
"""
|
115
117
|
imports = []
|
116
118
|
for k, v in scope.items():
|
117
|
-
if not hasattr(v, "__module__") or not hasattr(v, "__name__"):
|
119
|
+
if not hasattr(v, "__module__") or not hasattr(v, "__name__") or v.__module__ is None:
|
118
120
|
continue
|
119
121
|
imports.append(f"from {v.__module__} import {v.__name__}")
|
120
122
|
return imports
|
@@ -499,7 +501,12 @@ def serialize_dataclass(obj: Any, seen=None) -> Any:
|
|
499
501
|
elif isinstance(obj, list):
|
500
502
|
return [serialize_dataclass(v, seen) for v in obj]
|
501
503
|
elif isinstance(obj, dict):
|
502
|
-
|
504
|
+
serialized_dict = {}
|
505
|
+
for k, v in obj.items():
|
506
|
+
if not isinstance(k, (str, int, bool, float, None)):
|
507
|
+
continue
|
508
|
+
serialized_dict[k] = serialize_dataclass(v, seen)
|
509
|
+
return serialized_dict
|
503
510
|
else:
|
504
511
|
try:
|
505
512
|
json.dumps(obj) # Check if the object is JSON serializable
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.56
|
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,11 +1,11 @@
|
|
1
|
-
ripple_down_rules/__init__.py,sha256=
|
1
|
+
ripple_down_rules/__init__.py,sha256=ml9NUYyxu3UupCSsmAqkDDP49Sex5HHA9ZsR10N3iY0,100
|
2
2
|
ripple_down_rules/experts.py,sha256=8p5tFOWuQWgp9gt-6Yr6MFFphOTmpI9IJ3iepUyy3FY,12266
|
3
3
|
ripple_down_rules/helpers.py,sha256=TvTJU0BA3dPcAyzvZFvAu7jZqsp8Lu0HAAwvuizlGjg,2018
|
4
4
|
ripple_down_rules/rdr.py,sha256=FJYuRXgpUYSSK1pYrp2yeXb_ZZ2xjPED31tzxofokL4,48865
|
5
5
|
ripple_down_rules/rdr_decorators.py,sha256=pYCKLgMKgQ6x_252WQtF2t4ZNjWPBxnaWtJ6TpGdcc0,7820
|
6
6
|
ripple_down_rules/rules.py,sha256=TPNVMqW9T-_46BS4WemrspLg5uG8kP6tsPvWWBAzJxg,17515
|
7
7
|
ripple_down_rules/start-code-server.sh,sha256=otClk7VmDgBOX2TS_cjws6K0UwvgAUJhoA0ugkPCLqQ,949
|
8
|
-
ripple_down_rules/utils.py,sha256=
|
8
|
+
ripple_down_rules/utils.py,sha256=6lx3Fh9C1Y35cESKSwnjLaNKz-OGHu5L5bHlYf8pTj4,51355
|
9
9
|
ripple_down_rules/datastructures/__init__.py,sha256=V2aNgf5C96Y5-IGghra3n9uiefpoIm_QdT7cc_C8cxQ,111
|
10
10
|
ripple_down_rules/datastructures/callable_expression.py,sha256=w6Gpo1o-xnFvTaPrzJ2w7VgCjSr1xqp8LQG0jAl-mfc,12718
|
11
11
|
ripple_down_rules/datastructures/case.py,sha256=r8kjL9xP_wk84ThXusspgPMrAoed2bGQmKi54fzhmH8,15258
|
@@ -17,8 +17,8 @@ ripple_down_rules/user_interface/ipython_custom_shell.py,sha256=24MIFwqnAhC6ofOb
|
|
17
17
|
ripple_down_rules/user_interface/object_diagram.py,sha256=tsB6iuLNEbHxp5lR2WjyejjWbnAX_nHF9xS8jNPOQVk,4548
|
18
18
|
ripple_down_rules/user_interface/prompt.py,sha256=AkkltdDIaioN43lkRKDPKSjJcmdSSGZDMYz7AL7X9lE,8082
|
19
19
|
ripple_down_rules/user_interface/template_file_creator.py,sha256=FGtLfYBfr4310c7Dfa9b2qiOWLNzHk1q3kdhD70Ilg4,13804
|
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.56.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
21
|
+
ripple_down_rules-0.5.56.dist-info/METADATA,sha256=ZNlHOp8Nz6aGVk8wk16xcSA3CQwn25KBthsbC1h1GpI,48189
|
22
|
+
ripple_down_rules-0.5.56.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
23
|
+
ripple_down_rules-0.5.56.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
|
24
|
+
ripple_down_rules-0.5.56.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|