ripple-down-rules 0.5.2__py3-none-any.whl → 0.5.4__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.2"
1
+ __version__ = "0.5.4"
2
2
 
3
3
  import logging
4
4
  logger = logging.Logger("rdr")
@@ -282,41 +282,3 @@ class Human(Expert):
282
282
  self.save_answers()
283
283
  case_query.target = expression
284
284
  return expression
285
-
286
-
287
- class File(Expert):
288
- """
289
- The File Expert class, an expert that reads the answers from a file.
290
- This is used for testing purposes.
291
- """
292
-
293
- def __init__(self, filename: str, **kwargs):
294
- """
295
- Initialize the File expert.
296
-
297
- :param filename: The path to the file containing the expert answers.
298
- """
299
- super().__init__(**kwargs)
300
- self.filename = filename
301
- self.load_answers(filename)
302
-
303
- def ask_for_conditions(self, case_query: CaseQuery,
304
- last_evaluated_rule: Optional[Rule] = None) -> CallableExpression:
305
- loaded_scope, user_input = self.all_expert_answers.pop(0)
306
- if user_input:
307
- condition = CallableExpression(user_input, bool, scope=case_query.scope)
308
- else:
309
- raise ValueError("No user input found in the expert answers file.")
310
- case_query.conditions = condition
311
- return condition
312
-
313
- def ask_for_conclusion(self, case_query: CaseQuery) -> Optional[CallableExpression]:
314
- loaded_scope, expert_input = self.all_expert_answers.pop(0)
315
- if expert_input is not None:
316
- expression = CallableExpression(expert_input, case_query.attribute_type,
317
- scope=case_query.scope,
318
- mutually_exclusive=case_query.mutually_exclusive)
319
- else:
320
- raise ValueError("No expert input found in the expert answers file.")
321
- case_query.target = expression
322
- return expression
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ripple_down_rules
3
- Version: 0.5.2
3
+ Version: 0.5.4
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
@@ -725,6 +725,10 @@ For GUI support, also install:
725
725
  sudo apt-get install libxcb-cursor-dev
726
726
  ```
727
727
 
728
+ ## Documentation
729
+
730
+ Read the documentation [here](https://abdelrhmanbassiouny.github.io/ripple_down_rules/).
731
+
728
732
  ## Example Usage
729
733
 
730
734
  ### Propositional Example
@@ -887,6 +891,6 @@ try that yourself and see if it works!
887
891
  author = {Bassiouny, Abdelrhman},
888
892
  title = {Ripple-Down-Rules},
889
893
  url = {https://github.com/AbdelrhmanBassiouny/ripple_down_rules},
890
- version = {0.5.2},
894
+ version = {0.5.4},
891
895
  }
892
896
  ```
@@ -1,6 +1,5 @@
1
- ripple_down_rules/__init__.py,sha256=K8GayszN_Ydn9s_OsfTRq83trUr2_x64cQwQX9gwF-E,99
2
- ripple_down_rules/experts.py,sha256=tjCq_T_d2qc_DhyBlxfqoT3oHk6-HmKFZFqGZAdXUb0,13660
3
- ripple_down_rules/failures.py,sha256=E6ajDUsw3Blom8eVLbA7d_Qnov2conhtZ0UmpQ9ZtSE,302
1
+ ripple_down_rules/__init__.py,sha256=8e_vgenmdqtVY41f0q59EP97pFvgSGxtQgPyO9fnp64,99
2
+ ripple_down_rules/experts.py,sha256=rPRJU2py5wCopZADVWOP3Vzp077KL6ArDlkxUQ0Mh6w,12130
4
3
  ripple_down_rules/helpers.py,sha256=TvTJU0BA3dPcAyzvZFvAu7jZqsp8Lu0HAAwvuizlGjg,2018
5
4
  ripple_down_rules/rdr.py,sha256=FJYuRXgpUYSSK1pYrp2yeXb_ZZ2xjPED31tzxofokL4,48865
6
5
  ripple_down_rules/rdr_decorators.py,sha256=pYCKLgMKgQ6x_252WQtF2t4ZNjWPBxnaWtJ6TpGdcc0,7820
@@ -18,8 +17,8 @@ ripple_down_rules/user_interface/ipython_custom_shell.py,sha256=24MIFwqnAhC6ofOb
18
17
  ripple_down_rules/user_interface/object_diagram.py,sha256=tsB6iuLNEbHxp5lR2WjyejjWbnAX_nHF9xS8jNPOQVk,4548
19
18
  ripple_down_rules/user_interface/prompt.py,sha256=AkkltdDIaioN43lkRKDPKSjJcmdSSGZDMYz7AL7X9lE,8082
20
19
  ripple_down_rules/user_interface/template_file_creator.py,sha256=ycCbddy_BJP8d0Q2Sj21UzamhGtqGZuK_e73VTJqznY,13766
21
- ripple_down_rules-0.5.2.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
22
- ripple_down_rules-0.5.2.dist-info/METADATA,sha256=O3NmfxnYkTpT9dNAkJ3nOEsG-oau7PMotx37fFSwnqQ,47688
23
- ripple_down_rules-0.5.2.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
24
- ripple_down_rules-0.5.2.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
25
- ripple_down_rules-0.5.2.dist-info/RECORD,,
20
+ ripple_down_rules-0.5.4.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
21
+ ripple_down_rules-0.5.4.dist-info/METADATA,sha256=2t5F_Z7AqI7lb2zZxTREAGEUyipcISlZ00Dk-0BAEx4,47796
22
+ ripple_down_rules-0.5.4.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
23
+ ripple_down_rules-0.5.4.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
24
+ ripple_down_rules-0.5.4.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
-
2
-
3
- class InvalidOperator(Exception):
4
- def __init__(self, rule_str: str, valid_operators: list):
5
- self.rule_str = rule_str
6
- self.valid_operators = valid_operators
7
-
8
- def __str__(self):
9
- return f"Invalid operator in {self.rule_str}, valid operators are: {self.valid_operators}"
10
-