ripple-down-rules 0.5.82__tar.gz → 0.5.83__tar.gz
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-0.5.82 → ripple_down_rules-0.5.83}/PKG-INFO +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/__init__.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/rdr_decorators.py +8 -4
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/PKG-INFO +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/conf/world/handles_and_containers.py +3 -4
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/conftest.py +2 -2
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/datasets.py +4 -2
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/factories/world/handles_and_containers.py +2 -2
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_helpers/helpers.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_json_serialization.py +2 -2
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_object_diagram.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_rdr.py +3 -3
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_rdr_alchemy.py +2 -2
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_rdr_decorators.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_rdr_world/conftest.py +2 -2
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_rdr_world/test_rdr_world.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_relational_rdr.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_is_a_robot/physical_object_is_a_robot_output__scrdr_defs.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_is_a_robot/rdr_metadata/datasets_physical_object_is_a_robot.json +4 -4
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_select_objects_that_are_parts_of_robot/physical_object_select_objects_that_are_parts_of_robot_output__mcrdr_defs.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_select_objects_that_are_parts_of_robot/rdr_metadata/datasets_physical_object_select_objects_that_are_parts_of_robot.json +5 -5
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_sql_model.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_template_file_creator.py +3 -3
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/test_prompt.py +1 -1
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/test_qt_gui_inline.py +3 -3
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_utils.py +2 -2
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/.github/workflows/build_and_deploy_doc.yml +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/.github/workflows/ci.yml +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/.github/workflows/publish-to-test-pypi.yml +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/.idea/shelf/Uncommitted_changes_before_Checkout_at_2_4_25,_6_32_PM_[Changes]/shelved.patch +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/.idea/shelf/Uncommitted_changes_before_Checkout_at_2_4_25,_6_32_PM_[Changes]1/shelved.patch +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/LICENSE +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/README.md +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/doc/_config.yml +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/doc/_toc.yml +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/doc/bibliography.md +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/doc/intro.md +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/doc/references.bib +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/doc/requirements.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/animal_species.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/part_containment_rdr/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/part_containment_rdr/rdr_metadata/part_containment_rdr.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/part_containment_rdr/robot_contained_objects_mcrdr.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/part_containment_rdr/robot_contained_objects_mcrdr_defs.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/part_containment_rdr/robot_rdr.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/relational_example.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/images/scrdr.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/images/scrdr.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/images/thinking_pr2.jpg +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/pyproject.toml +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/pytest.ini +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/requirements-dev-ci.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/requirements-dev.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/requirements-gui.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/requirements-viz.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/requirements.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_extra.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_extra.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_stop_only.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_stop_only.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_stop_plus_rule.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_stop_plus_rule.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_scrdr.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_scrdr.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_scrdr_2.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_scrdr_2.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_scrdr_3.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_scrdr_3.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/grdr_Habitat.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/grdr_Habitat.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/grdr_Species.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/grdr_Species.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_extra.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_extra.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_extra_classify.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_extra_classify.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_stop_plus_rule_combined.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_stop_plus_rule_combined.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/partial_mcrdr_extra.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/partial_mcrdr_extra.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/relational_scrdr_classify.dot +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/relational_scrdr_classify.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/setup.cfg +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/datastructures/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/datastructures/callable_expression.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/datastructures/case.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/datastructures/dataclasses.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/datastructures/enums.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/experts.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/helpers.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/rdr.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/rules.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/start-code-server.sh +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/gui.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/ipython_custom_shell.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/object_diagram.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/prompt.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/template_file_creator.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/utils.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/SOURCES.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/dependency_links.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/requires.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/top_level.txt +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/conf/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/conf/world/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/conf/world/base_config.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/factories/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/factories/world/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/correct_drawer_rdr_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/drawer_cabinet_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/grdr_expert_answers_classify.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/grdr_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/grdr_expert_answers_fit_extra.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/grdr_expert_answers_fit_no_targets.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_expert_answers_classify.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_expert_answers_fit_no_targets.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_expert_answers_stop_only_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_extra_expert_answers_classify.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_extra_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_multi_line_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_stop_only_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_stop_plus_rule_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_stop_plus_rule_combined_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mcrdr_stop_plus_rule_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/mutagenic_expert_answers.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/relational_scrdr_expert_answers_classify.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/scrdr_expert_answers_classify.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/scrdr_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/scrdr_expert_answers_fit_no_targets.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/scrdr_multi_line_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_expert_answers/scrdr_world_expert_answers_fit.json +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_generated_rdrs/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_helpers/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_helpers/object_diagram_case_query.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_helpers/object_diagram_person.png +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_on_mutagenic.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_rdr_helpers_rdrs.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_rdr_world/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_relational_rdr_alchemy.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_is_a_robot/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_is_a_robot/physical_object_is_a_robot_output__scrdr.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_is_a_robot/physical_object_is_a_robot_rdr.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_select_objects_that_are_parts_of_robot/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_select_objects_that_are_parts_of_robot/physical_object_select_objects_that_are_parts_of_robot_output__mcrdr.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_results/datasets_physical_object_select_objects_that_are_parts_of_robot/physical_object_select_objects_that_are_parts_of_robot_rdr.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/__init__.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/test_ipython.py +0 -0
- {ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/test_ipython_copilot.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.83
|
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
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/rdr_decorators.py
RENAMED
@@ -31,7 +31,8 @@ class RDRDecorator:
|
|
31
31
|
expert: Optional[Expert] = None,
|
32
32
|
ask_always: bool = False,
|
33
33
|
update_existing_rules: bool = True,
|
34
|
-
viewer: Optional[RDRCaseViewer] = None
|
34
|
+
viewer: Optional[RDRCaseViewer] = None,
|
35
|
+
package_name: Optional[str] = None):
|
35
36
|
"""
|
36
37
|
:param models_dir: The directory to save/load the RDR models.
|
37
38
|
:param output_type: The type of the output. This is used to create the RDR model.
|
@@ -46,6 +47,8 @@ class RDRDecorator:
|
|
46
47
|
:param ask_always: If True, the function will ask the user for a target if it doesn't exist.
|
47
48
|
:param update_existing_rules: If True, the function will update the existing RDR rules
|
48
49
|
even if they gave an output.
|
50
|
+
:param viewer: The viewer to use for the RDR model. If None, no viewer will be used.
|
51
|
+
:param package_name: The package name to use for relative imports in the RDR model.
|
49
52
|
:return: A decorator to use a GeneralRDR as a classifier that monitors and modifies the function's output.
|
50
53
|
"""
|
51
54
|
self.rdr_models_dir = models_dir
|
@@ -59,6 +62,7 @@ class RDRDecorator:
|
|
59
62
|
self.ask_always = ask_always
|
60
63
|
self.update_existing_rules = update_existing_rules
|
61
64
|
self.viewer = viewer
|
65
|
+
self.package_name = package_name
|
62
66
|
self.load()
|
63
67
|
|
64
68
|
def decorator(self, func: Callable) -> Callable:
|
@@ -166,7 +170,7 @@ class RDRDecorator:
|
|
166
170
|
"""
|
167
171
|
Save the RDR model to the specified directory.
|
168
172
|
"""
|
169
|
-
self.rdr.save(self.rdr_models_dir)
|
173
|
+
self.rdr.save(self.rdr_models_dir, package_name=self.package_name)
|
170
174
|
|
171
175
|
def load(self):
|
172
176
|
"""
|
@@ -176,7 +180,7 @@ class RDRDecorator:
|
|
176
180
|
if self.model_name is not None:
|
177
181
|
model_path = os.path.join(self.rdr_models_dir, self.model_name + f"/rdr_metadata/{self.model_name}.json")
|
178
182
|
if os.path.exists(os.path.join(self.rdr_models_dir, model_path)):
|
179
|
-
self.rdr = GeneralRDR.load(self.rdr_models_dir, self.model_name)
|
183
|
+
self.rdr = GeneralRDR.load(self.rdr_models_dir, self.model_name, package_name=self.package_name)
|
180
184
|
self.rdr.set_viewer(self.viewer)
|
181
185
|
if self.rdr is None:
|
182
186
|
self.rdr = GeneralRDR(save_dir=self.rdr_models_dir, model_name=self.model_name,
|
@@ -186,4 +190,4 @@ class RDRDecorator:
|
|
186
190
|
"""
|
187
191
|
Update the RDR model from a python file.
|
188
192
|
"""
|
189
|
-
self.rdr.update_from_python(self.rdr_models_dir, self.model_name)
|
193
|
+
self.rdr.update_from_python(self.rdr_models_dir, self.model_name, package_name=self.package_name)
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ripple_down_rules
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.83
|
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
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/conf/world/handles_and_containers.py
RENAMED
@@ -1,13 +1,12 @@
|
|
1
1
|
# ===================== Possible World Configurations ========================
|
2
2
|
from dataclasses import dataclass, field
|
3
3
|
|
4
|
-
from
|
5
|
-
from typing_extensions import List
|
4
|
+
from typing_extensions import List, Callable
|
6
5
|
|
7
|
-
from
|
6
|
+
from .base_config import WorldConf, BodyConf, Connection, FixedConnectionConf, PrismaticConnectionConf, \
|
8
7
|
ContainerConf, HandleConf
|
9
8
|
|
10
|
-
from factories.world.handles_and_containers import create_world_with_handles_and_containers
|
9
|
+
from ...factories.world.handles_and_containers import create_world_with_handles_and_containers
|
11
10
|
|
12
11
|
|
13
12
|
@dataclass
|
@@ -11,8 +11,8 @@ except ImportError as e:
|
|
11
11
|
QApplication = None
|
12
12
|
RDRCaseViewer = None
|
13
13
|
|
14
|
-
from conf.world.handles_and_containers import HandlesAndContainersWorld
|
15
|
-
from datasets import *
|
14
|
+
from .conf.world.handles_and_containers import HandlesAndContainersWorld
|
15
|
+
from .datasets import *
|
16
16
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
17
17
|
from ripple_down_rules.experts import Human
|
18
18
|
from ripple_down_rules.helpers import is_matching
|
@@ -132,11 +132,13 @@ class PhysicalObject:
|
|
132
132
|
"""
|
133
133
|
The directory where the RDR serialized JSON files are stored.
|
134
134
|
"""
|
135
|
-
_is_a_robot_rdr: RDRDecorator = RDRDecorator(_rdr_json_dir, (bool,), True
|
135
|
+
_is_a_robot_rdr: RDRDecorator = RDRDecorator(_rdr_json_dir, (bool,), True,
|
136
|
+
package_name="test")
|
136
137
|
"""
|
137
138
|
The RDR decorator that is used to determine if the object is a robot or not.
|
138
139
|
"""
|
139
|
-
_select_parts_rdr: RDRDecorator = RDRDecorator(_rdr_json_dir, (Self,), False
|
140
|
+
_select_parts_rdr: RDRDecorator = RDRDecorator(_rdr_json_dir, (Self,), False,
|
141
|
+
package_name="test")
|
140
142
|
"""
|
141
143
|
The RDR decorator that is used to determine if the object is a robot or not.
|
142
144
|
"""
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/factories/world/handles_and_containers.py
RENAMED
@@ -1,5 +1,5 @@
|
|
1
|
-
from datasets import World, Handle, Container, FixedConnection, PrismaticConnection
|
2
|
-
from conf.world.base_config import WorldConf, HandleConf, ContainerConf, FixedConnectionConf, PrismaticConnectionConf
|
1
|
+
from ...datasets import World, Handle, Container, FixedConnection, PrismaticConnection
|
2
|
+
from ...conf.world.base_config import WorldConf, HandleConf, ContainerConf, FixedConnectionConf, PrismaticConnectionConf
|
3
3
|
|
4
4
|
|
5
5
|
def create_world_with_handles_and_containers(world_conf: WorldConf) -> World:
|
@@ -3,7 +3,7 @@ import os
|
|
3
3
|
|
4
4
|
from typing_extensions import List, Any, Tuple, Type, Callable, Optional
|
5
5
|
|
6
|
-
from datasets import Species, Habitat, load_zoo_cases
|
6
|
+
from ..datasets import Species, Habitat, load_zoo_cases
|
7
7
|
from ripple_down_rules.datastructures.case import Case
|
8
8
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
9
9
|
from ripple_down_rules.datastructures.enums import Category
|
@@ -3,11 +3,11 @@ from unittest import TestCase
|
|
3
3
|
|
4
4
|
from typing_extensions import List
|
5
5
|
|
6
|
-
from datasets import load_zoo_dataset
|
6
|
+
from .datasets import load_zoo_dataset
|
7
7
|
from ripple_down_rules.datastructures.dataclasses import Case
|
8
8
|
from ripple_down_rules.rdr import SingleClassRDR, MultiClassRDR, GeneralRDR
|
9
9
|
from ripple_down_rules.utils import make_set, flatten_list, serialize_dataclass, deserialize_dataclass
|
10
|
-
from test_helpers.helpers import get_fit_mcrdr, get_fit_scrdr, get_fit_grdr
|
10
|
+
from .test_helpers.helpers import get_fit_mcrdr, get_fit_scrdr, get_fit_grdr
|
11
11
|
|
12
12
|
|
13
13
|
@dataclass
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
import unittest
|
3
3
|
|
4
|
-
from datasets import load_zoo_dataset, Species
|
4
|
+
from .datasets import load_zoo_dataset, Species
|
5
5
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
6
6
|
from ripple_down_rules.user_interface.object_diagram import generate_object_graph
|
7
7
|
|
@@ -4,15 +4,15 @@ from unittest import TestCase
|
|
4
4
|
|
5
5
|
from typing_extensions import List, Optional
|
6
6
|
|
7
|
-
from datasets import Habitat, Species, load_zoo_cases
|
8
|
-
from datasets import load_zoo_dataset
|
7
|
+
from .datasets import Habitat, Species, load_zoo_cases
|
8
|
+
from .datasets import load_zoo_dataset
|
9
9
|
from ripple_down_rules.datastructures.case import Case
|
10
10
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
11
11
|
from ripple_down_rules.datastructures.enums import MCRDRMode
|
12
12
|
from ripple_down_rules.experts import Human
|
13
13
|
from ripple_down_rules.rdr import SingleClassRDR, MultiClassRDR, GeneralRDR, RDRWithCodeWriter
|
14
14
|
from ripple_down_rules.utils import render_tree, make_set, extract_function_source
|
15
|
-
from test_helpers.helpers import get_fit_scrdr, get_fit_mcrdr, get_fit_grdr
|
15
|
+
from .test_helpers.helpers import get_fit_scrdr, get_fit_mcrdr, get_fit_grdr
|
16
16
|
|
17
17
|
try:
|
18
18
|
from PyQt6.QtWidgets import QApplication
|
@@ -7,12 +7,12 @@ from sqlalchemy.orm import MappedColumn as Column
|
|
7
7
|
from typing_extensions import List, Sequence
|
8
8
|
import pandas as pd
|
9
9
|
|
10
|
-
from datasets import Base, MappedAnimal, Species, get_dataset, Habitat, HabitatTable
|
10
|
+
from .datasets import Base, MappedAnimal, Species, get_dataset, Habitat, HabitatTable
|
11
11
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
12
12
|
from ripple_down_rules.experts import Human
|
13
13
|
from ripple_down_rules.rdr import SingleClassRDR, MultiClassRDR, GeneralRDR
|
14
14
|
from ripple_down_rules.utils import make_set
|
15
|
-
from test_helpers.helpers import get_fit_scrdr
|
15
|
+
from .test_helpers.helpers import get_fit_scrdr
|
16
16
|
|
17
17
|
|
18
18
|
class TestAlchemyRDR(TestCase):
|
@@ -12,8 +12,8 @@ except ImportError as e:
|
|
12
12
|
QApplication = None
|
13
13
|
RDRCaseViewer = None
|
14
14
|
|
15
|
-
from conf.world.handles_and_containers import HandlesAndContainersWorld
|
16
|
-
from datasets import *
|
15
|
+
from ..conf.world.handles_and_containers import HandlesAndContainersWorld
|
16
|
+
from ..datasets import *
|
17
17
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
18
18
|
from ripple_down_rules.experts import Human
|
19
19
|
from ripple_down_rules.helpers import is_matching
|
@@ -5,7 +5,7 @@ from unittest import TestCase
|
|
5
5
|
|
6
6
|
from typing_extensions import List, Any
|
7
7
|
|
8
|
-
from datasets import Robot, Part, PhysicalObject
|
8
|
+
from .datasets import Robot, Part, PhysicalObject
|
9
9
|
from ripple_down_rules.datastructures.case import CaseAttribute
|
10
10
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery, CallableExpression
|
11
11
|
from ripple_down_rules.experts import Human
|
@@ -12,8 +12,8 @@
|
|
12
12
|
"builtins.bool"
|
13
13
|
],
|
14
14
|
"scope": {
|
15
|
-
"PhysicalObject": "datasets.PhysicalObject",
|
16
|
-
"Robot": "datasets.Robot",
|
15
|
+
"PhysicalObject": "test.datasets.PhysicalObject",
|
16
|
+
"Robot": "test.datasets.Robot",
|
17
17
|
"Dict": "typing.Dict"
|
18
18
|
},
|
19
19
|
"conclusion": {
|
@@ -29,8 +29,8 @@
|
|
29
29
|
"builtins.bool"
|
30
30
|
],
|
31
31
|
"scope": {
|
32
|
-
"PhysicalObject": "datasets.PhysicalObject",
|
33
|
-
"Robot": "datasets.Robot",
|
32
|
+
"PhysicalObject": "test.datasets.PhysicalObject",
|
33
|
+
"Robot": "test.datasets.Robot",
|
34
34
|
"Dict": "typing.Dict"
|
35
35
|
},
|
36
36
|
"conclusion": {
|
@@ -12,8 +12,8 @@
|
|
12
12
|
"builtins.bool"
|
13
13
|
],
|
14
14
|
"scope": {
|
15
|
-
"PhysicalObject": "datasets.PhysicalObject",
|
16
|
-
"Robot": "datasets.Robot",
|
15
|
+
"PhysicalObject": "test.datasets.PhysicalObject",
|
16
|
+
"Robot": "test.datasets.Robot",
|
17
17
|
"Dict": "typing.Dict",
|
18
18
|
"List": "typing.List",
|
19
19
|
"Union": "typing.Union"
|
@@ -28,13 +28,13 @@
|
|
28
28
|
"_type": "ripple_down_rules.datastructures.callable_expression.CallableExpression",
|
29
29
|
"user_input": "def _get_value(case):\n def physical_object_select_objects_that_are_parts_of_robot(self_: PhysicalObject, objects: List[PhysicalObject], robot: Robot, output_: PhysicalObject) -> List[PhysicalObject]:\n \"\"\"Get possible value(s) for PhysicalObject_select_objects_that_are_parts_of_robot.output_ of type PhysicalObject.\"\"\"\n robot_parts = [obj for obj in objects if obj in robot.parts]\n return robot_parts\n return physical_object_select_objects_that_are_parts_of_robot(**case)\n ",
|
30
30
|
"conclusion_type": [
|
31
|
-
"datasets.PhysicalObject",
|
31
|
+
"test.datasets.PhysicalObject",
|
32
32
|
"builtins.set",
|
33
33
|
"builtins.list"
|
34
34
|
],
|
35
35
|
"scope": {
|
36
|
-
"PhysicalObject": "datasets.PhysicalObject",
|
37
|
-
"Robot": "datasets.Robot",
|
36
|
+
"PhysicalObject": "test.datasets.PhysicalObject",
|
37
|
+
"Robot": "test.datasets.Robot",
|
38
38
|
"Dict": "typing.Dict",
|
39
39
|
"List": "typing.List",
|
40
40
|
"Union": "typing.Union"
|
@@ -8,8 +8,8 @@ from ripple_down_rules.datastructures.enums import PromptFor
|
|
8
8
|
from ripple_down_rules.rdr_decorators import RDRDecorator
|
9
9
|
from ripple_down_rules.user_interface.template_file_creator import TemplateFileCreator
|
10
10
|
from ripple_down_rules.utils import make_set
|
11
|
-
from datasets import World, Handle, Container
|
12
|
-
from datasets import Part, PhysicalObject, Robot
|
11
|
+
from .datasets import World, Handle, Container
|
12
|
+
from .datasets import Part, PhysicalObject, Robot
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -73,7 +73,7 @@ def test_rdr_decorator_func_name():
|
|
73
73
|
def test_load():
|
74
74
|
# Test the load function
|
75
75
|
world = World()
|
76
|
-
imports = "from datasets import World\n\n\n"
|
76
|
+
imports = "from test.datasets import World\n\n\n"
|
77
77
|
func_code = "def test_func(case):\n return case"
|
78
78
|
source_code = f"{imports}{func_code}\n"
|
79
79
|
source_code = dedent(source_code)
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/test_prompt.py
RENAMED
@@ -3,7 +3,7 @@ from unittest import TestCase, skip
|
|
3
3
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
4
4
|
from ripple_down_rules.datastructures.enums import PromptFor
|
5
5
|
from ripple_down_rules.user_interface.prompt import UserPrompt
|
6
|
-
from datasets import World, Handle, Container, FixedConnection, PrismaticConnection
|
6
|
+
from ..datasets import World, Handle, Container, FixedConnection, PrismaticConnection
|
7
7
|
|
8
8
|
|
9
9
|
class TestPrompt(TestCase):
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/test_qt_gui_inline.py
RENAMED
@@ -11,11 +11,11 @@ except ImportError as e:
|
|
11
11
|
style = None
|
12
12
|
from typing_extensions import List
|
13
13
|
|
14
|
-
from datasets import load_zoo_dataset, Species
|
14
|
+
from ..datasets import load_zoo_dataset, Species
|
15
15
|
from ripple_down_rules.datastructures.case import Case
|
16
16
|
from ripple_down_rules.datastructures.dataclasses import CaseQuery
|
17
|
-
from test_helpers.helpers import get_fit_grdr
|
18
|
-
from test_object_diagram import Person, Address
|
17
|
+
from ..test_helpers.helpers import get_fit_grdr
|
18
|
+
from ..test_object_diagram import Person, Address
|
19
19
|
|
20
20
|
|
21
21
|
@unittest.skipIf(QApplication is None, "GUI tests need PyQt6,"
|
@@ -64,11 +64,11 @@ class UtilsTestCase(TestCase):
|
|
64
64
|
assert rel_import == expected_import
|
65
65
|
|
66
66
|
def test_get_imports_from_types(self):
|
67
|
-
from datasets import World, Species
|
67
|
+
from .datasets import World, Species
|
68
68
|
|
69
69
|
imports = get_imports_from_types([World, Species])
|
70
70
|
|
71
|
-
assert imports == ["from datasets import Species, World"]
|
71
|
+
assert imports == ["from test.datasets import Species, World"]
|
72
72
|
|
73
73
|
from ripple_down_rules.rdr import GeneralRDR
|
74
74
|
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/.github/workflows/build_and_deploy_doc.yml
RENAMED
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/.github/workflows/publish-to-test-pypi.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/part_containment_rdr/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/examples/part_containment_rdr/robot_rdr.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_stop_plus_rule.dot
RENAMED
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/complete_mcrdr_stop_plus_rule.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_stop_plus_rule_combined.dot
RENAMED
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/results/mcrdr_stop_plus_rule_combined.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/datastructures/case.py
RENAMED
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/datastructures/enums.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/start-code-server.sh
RENAMED
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/gui.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules/user_interface/prompt.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/requires.txt
RENAMED
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/src/ripple_down_rules.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_helpers/object_diagram_person.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ripple_down_rules-0.5.82 → ripple_down_rules-0.5.83}/test/test_user_interface/test_ipython.py
RENAMED
File without changes
|
File without changes
|