ripple-down-rules 0.5.80__py3-none-any.whl → 0.5.82__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.5.80"
1
+ __version__ = "0.5.82"
2
2
 
3
3
  import logging
4
4
  logger = logging.Logger("rdr")
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
- cases_types.update(rule.get_corner_case_types_to_import())
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)
@@ -798,10 +798,11 @@ def get_import_path_from_path(path: str) -> Optional[str]:
798
798
  :return: The Python import path.
799
799
  """
800
800
  package_name = os.path.abspath(path)
801
- formated_package_name = package_name.strip('./').replace('/', '.')
801
+ packages = package_name.split(os.path.sep)
802
+ # formated_package_name = package_name.replace('/', '.')
802
803
  parent_package_idx = 0
803
- packages = formated_package_name.split('.')
804
- for i, possible_pacakge in enumerate(reversed(packages)):
804
+ # packages = formated_package_name.split('.')
805
+ for i in range(len(packages)):
805
806
  if i == 0:
806
807
  current_path = package_name
807
808
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ripple_down_rules
3
- Version: 0.5.80
3
+ Version: 0.5.82
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=OCXYavUU_yIcymr1OaTIQ9uNk3ZwDNlg1bX6wK7sZLQ,100
1
+ ripple_down_rules/__init__.py,sha256=EvcK7up0E4DGl8ECDklEZACHVsRITZkFbTU1K4XIpKg,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=2t04Qj931dh6UypLBy4RxJ5hFIui0ejFgvm7D5P8b-E,55118
4
+ ripple_down_rules/rdr.py,sha256=C6bvlq6MsKa2Mym1wW6JUMj705aCaoihTP279TM6eT0,55218
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
8
- ripple_down_rules/utils.py,sha256=mObBszTruGrRvD4MgD8tS1AnMtoyKrPl4RCciinhzY4,60132
8
+ ripple_down_rules/utils.py,sha256=ikzlXjgBWM95dgL-idzeWcYyZs2IAwgA5BXMNRoKE2w,60144
9
9
  ripple_down_rules/datastructures/__init__.py,sha256=V2aNgf5C96Y5-IGghra3n9uiefpoIm_QdT7cc_C8cxQ,111
10
10
  ripple_down_rules/datastructures/callable_expression.py,sha256=f3wUPTrLa1INO-1qfgVz87ryrCABronfyq0_JKWoZCs,12800
11
11
  ripple_down_rules/datastructures/case.py,sha256=1zSaXUljaH6z3SgMGzYPoDyjotNam791KpYgvxuMh90,15463
@@ -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.80.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
21
- ripple_down_rules-0.5.80.dist-info/METADATA,sha256=slyVN82WJd9yd4efs415WgtiiCM__5BJeKneQhWl5zY,48214
22
- ripple_down_rules-0.5.80.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- ripple_down_rules-0.5.80.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
24
- ripple_down_rules-0.5.80.dist-info/RECORD,,
20
+ ripple_down_rules-0.5.82.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
21
+ ripple_down_rules-0.5.82.dist-info/METADATA,sha256=tfAM6oWHtT8rHwL7tkPaZV4r_L4EOObvAzu68H9DAc4,48214
22
+ ripple_down_rules-0.5.82.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ ripple_down_rules-0.5.82.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
24
+ ripple_down_rules-0.5.82.dist-info/RECORD,,