ripple-down-rules 0.6.25__py3-none-any.whl → 0.6.26__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 +8 -10
- {ripple_down_rules-0.6.25.dist-info → ripple_down_rules-0.6.26.dist-info}/METADATA +1 -1
- {ripple_down_rules-0.6.25.dist-info → ripple_down_rules-0.6.26.dist-info}/RECORD +7 -7
- {ripple_down_rules-0.6.25.dist-info → ripple_down_rules-0.6.26.dist-info}/WHEEL +0 -0
- {ripple_down_rules-0.6.25.dist-info → ripple_down_rules-0.6.26.dist-info}/licenses/LICENSE +0 -0
- {ripple_down_rules-0.6.25.dist-info → ripple_down_rules-0.6.26.dist-info}/top_level.txt +0 -0
ripple_down_rules/__init__.py
CHANGED
ripple_down_rules/utils.py
CHANGED
@@ -5,7 +5,6 @@ import codecs
|
|
5
5
|
import copyreg
|
6
6
|
import importlib
|
7
7
|
import json
|
8
|
-
import logging
|
9
8
|
import os
|
10
9
|
import re
|
11
10
|
import shutil
|
@@ -25,7 +24,7 @@ from types import NoneType
|
|
25
24
|
|
26
25
|
import six
|
27
26
|
from sqlalchemy.exc import NoInspectionAvailable
|
28
|
-
from
|
27
|
+
from . import logger
|
29
28
|
|
30
29
|
try:
|
31
30
|
import matplotlib
|
@@ -36,13 +35,13 @@ except ImportError as e:
|
|
36
35
|
matplotlib = None
|
37
36
|
plt = None
|
38
37
|
Figure = None
|
39
|
-
|
38
|
+
logger.debug(f"{e}: matplotlib is not installed")
|
40
39
|
|
41
40
|
try:
|
42
41
|
import networkx as nx
|
43
42
|
except ImportError as e:
|
44
43
|
nx = None
|
45
|
-
|
44
|
+
logger.debug(f"{e}: networkx is not installed")
|
46
45
|
|
47
46
|
import requests
|
48
47
|
from anytree import Node, RenderTree, PreOrderIter
|
@@ -51,7 +50,6 @@ from sqlalchemy.orm import Mapped, registry, class_mapper, DeclarativeBase as SQ
|
|
51
50
|
from tabulate import tabulate
|
52
51
|
from typing_extensions import Callable, Set, Any, Type, Dict, TYPE_CHECKING, get_type_hints, \
|
53
52
|
get_origin, get_args, Tuple, Optional, List, Union, Self, ForwardRef, Iterable
|
54
|
-
from . import logger
|
55
53
|
|
56
54
|
if TYPE_CHECKING:
|
57
55
|
from .datastructures.case import Case
|
@@ -140,7 +138,7 @@ def extract_imports(file_path: Optional[str] = None, tree: Optional[ast.AST] = N
|
|
140
138
|
module = importlib.import_module(module_name, package=package_name)
|
141
139
|
scope[asname] = getattr(module, name)
|
142
140
|
except (ImportError, AttributeError) as e:
|
143
|
-
|
141
|
+
logger.warning(f"Could not import {module_name}: {e} while extracting imports from {file_path}")
|
144
142
|
|
145
143
|
return scope
|
146
144
|
|
@@ -182,7 +180,7 @@ def extract_function_source(file_path: str,
|
|
182
180
|
if (len(functions_source) >= len(function_names)) and (not len(function_names) == 0):
|
183
181
|
break
|
184
182
|
if len(functions_source) < len(function_names):
|
185
|
-
|
183
|
+
logger.warning(f"Could not find all functions in {file_path}: {function_names} not found, "
|
186
184
|
f"functions not found: {set(function_names) - set(functions_source.keys())}")
|
187
185
|
if return_line_numbers:
|
188
186
|
return functions_source, line_numbers
|
@@ -1294,7 +1292,7 @@ def copy_orm_instance(instance: SQLTable) -> SQLTable:
|
|
1294
1292
|
try:
|
1295
1293
|
new_instance = deepcopy(instance)
|
1296
1294
|
except Exception as e:
|
1297
|
-
|
1295
|
+
logger.debug(e)
|
1298
1296
|
new_instance = instance
|
1299
1297
|
return new_instance
|
1300
1298
|
|
@@ -1314,7 +1312,7 @@ def copy_orm_instance_with_relationships(instance: SQLTable) -> SQLTable:
|
|
1314
1312
|
try:
|
1315
1313
|
setattr(instance_cp, rel.key, related_obj_cp)
|
1316
1314
|
except Exception as e:
|
1317
|
-
|
1315
|
+
logger.debug(e)
|
1318
1316
|
return instance_cp
|
1319
1317
|
|
1320
1318
|
|
@@ -1915,7 +1913,7 @@ class FilteredDotExporter(object):
|
|
1915
1913
|
os.remove(dotfilename)
|
1916
1914
|
except Exception: # pragma: no cover
|
1917
1915
|
msg = 'Could not remove temporary file %s' % dotfilename
|
1918
|
-
|
1916
|
+
logger.warning(msg)
|
1919
1917
|
|
1920
1918
|
@staticmethod
|
1921
1919
|
def esc(value):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.26
|
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=UvIV78I-uuFu5QUKhHYVuO2NgHSbvr2KQp3foKtpFj8,100
|
2
2
|
ripple_down_rules/experts.py,sha256=MYK1-vuvU1Stp82YZa8TcwOzvriIiYb0WrPFpWUNnXc,13005
|
3
3
|
ripple_down_rules/helpers.py,sha256=X1psHOqrb4_xYN4ssQNB8S9aRKKsqgihAyWJurN0dqk,5499
|
4
4
|
ripple_down_rules/rdr.py,sha256=avufEkijvJQCji1S5O1zaDSS7aIoP7Yjefy_4uK1TII,62125
|
5
5
|
ripple_down_rules/rdr_decorators.py,sha256=TRhbaB_ZIXN0n8Up19NI43_mMjmTm24qo8axAAOzbxM,11728
|
6
6
|
ripple_down_rules/rules.py,sha256=N4dEx-xyqxGZpoEYzRd9P5u97_DcDEVLY_UiNhZ4E7g,28726
|
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=9xW0N2cB7X4taVANtLg-kVTPS-6ajWZylKkTqw2PKw4,73825
|
9
9
|
ripple_down_rules/datastructures/__init__.py,sha256=V2aNgf5C96Y5-IGghra3n9uiefpoIm_QdT7cc_C8cxQ,111
|
10
10
|
ripple_down_rules/datastructures/callable_expression.py,sha256=P3o-z54Jt4rtIczeFWiuHFTNqMzYEOm94OyOP535D6Q,13378
|
11
11
|
ripple_down_rules/datastructures/case.py,sha256=PJ7_-AdxYic6BO5z816piFODj6nU5J6Jt1YzTFH-dds,15510
|
@@ -17,8 +17,8 @@ ripple_down_rules/user_interface/ipython_custom_shell.py,sha256=yp-F8YRWGhj1PLB3
|
|
17
17
|
ripple_down_rules/user_interface/object_diagram.py,sha256=FEa2HaYR9QmTE6NsOwBvZ0jqmu3DKyg6mig2VE5ZP4Y,4956
|
18
18
|
ripple_down_rules/user_interface/prompt.py,sha256=e5FzVfiIagwKTK3WCKsHvWaWZ4kb8FP8X-SgieTln6E,9156
|
19
19
|
ripple_down_rules/user_interface/template_file_creator.py,sha256=kwBbFLyN6Yx2NTIHPSwOoytWgbJDYhgrUOVFw_jkDQ4,13522
|
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.26.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
21
|
+
ripple_down_rules-0.6.26.dist-info/METADATA,sha256=Zdd4-i7CJMMD14CTnBbxr9KBKa25SvBcQRf2XdlQffQ,48294
|
22
|
+
ripple_down_rules-0.6.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
23
|
+
ripple_down_rules-0.6.26.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
|
24
|
+
ripple_down_rules-0.6.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|