ripple-down-rules 0.6.25__py3-none-any.whl → 0.6.27__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.
@@ -1,4 +1,4 @@
1
- __version__ = "0.6.25"
1
+ __version__ = "0.6.27"
2
2
 
3
3
  import logging
4
4
  logger = logging.Logger("rdr")
ripple_down_rules/rdr.py CHANGED
@@ -534,7 +534,6 @@ class RDRWithCodeWriter(RippleDownRules, ABC):
534
534
  rule.conclusion.scope = scope
535
535
  for rule in rules_not_found:
536
536
  if isinstance(rule, MultiClassTopRule):
537
- import pdb; pdb.set_trace()
538
537
  rule.parent.set_immediate_alternative(rule.alternative)
539
538
  if rule.refinement is not None:
540
539
  ref_rules = [ref_rule for ref_rule in [rule.refinement] + list(rule.refinement.descendants)]
@@ -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 src.pycram.ros import logwarn
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
- logging.debug(f"{e}: matplotlib is not installed")
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
- logging.debug(f"{e}: networkx is not installed")
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
- logging.warning(f"Could not import {module_name}: {e} while extracting imports from {file_path}")
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
- logwarn(f"Could not find all functions in {file_path}: {function_names} not found, "
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
- logging.debug(e)
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
- logging.debug(e)
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
- logging.getLogger(__name__).warn(msg)
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.25
3
+ Version: 0.6.27
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=hhuChAaI4pksG6FgW6-mLaJhifqkw_2Dy21ccjHfIFs,100
1
+ ripple_down_rules/__init__.py,sha256=TaxvqRWwXyeD_ETYnf_G3Z5VlbdhClbNpLIff72WwGg,100
2
2
  ripple_down_rules/experts.py,sha256=MYK1-vuvU1Stp82YZa8TcwOzvriIiYb0WrPFpWUNnXc,13005
3
3
  ripple_down_rules/helpers.py,sha256=X1psHOqrb4_xYN4ssQNB8S9aRKKsqgihAyWJurN0dqk,5499
4
- ripple_down_rules/rdr.py,sha256=avufEkijvJQCji1S5O1zaDSS7aIoP7Yjefy_4uK1TII,62125
4
+ ripple_down_rules/rdr.py,sha256=PaoNwbrwnZBjXXkIVO3_sz_MsNUBjfooxBs9RT3bb64,62081
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=CD-J33gKHUSGU-hZdVvlGtCvsuID7b1pirv5ejpkEP0,73891
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.25.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
21
- ripple_down_rules-0.6.25.dist-info/METADATA,sha256=OCHGDEQ_jkpOq8iUIZONmvsMGXHPdsfzfuTSZOJUb_k,48294
22
- ripple_down_rules-0.6.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- ripple_down_rules-0.6.25.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
24
- ripple_down_rules-0.6.25.dist-info/RECORD,,
20
+ ripple_down_rules-0.6.27.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
21
+ ripple_down_rules-0.6.27.dist-info/METADATA,sha256=L_eYP6eqnQnZaLw-7FHIV774Yj_Q1IcJ9HAkkwP9um4,48294
22
+ ripple_down_rules-0.6.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ ripple_down_rules-0.6.27.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
24
+ ripple_down_rules-0.6.27.dist-info/RECORD,,