Skip to content

Cleaning#53

Merged
AbdelrhmanBassiouny merged 17 commits intocram2:mainfrom
AbdelrhmanBassiouny:main
Dec 8, 2025
Merged

Cleaning#53
AbdelrhmanBassiouny merged 17 commits intocram2:mainfrom
AbdelrhmanBassiouny:main

Conversation

@AbdelrhmanBassiouny
Copy link
Copy Markdown
Contributor

@AbdelrhmanBassiouny AbdelrhmanBassiouny commented Dec 6, 2025

  • Removed HashedValue completely.
  • Refactored HashedIterable, renamed it to ReEnterableLazyIterable, and moved it to cache_data.py.
  • Removed unused methods (_is_duplicate_output_, _projection_)
  • Removed unused classes (Infer, From)
  • Reduced ReEnterableLazyIterable implementation to the bare minimum and confined its use to _domain_ of Variable.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a substantial cleanup of the entity query language (EQL) codebase by removing wrapper classes and unused methods to simplify the type system and reduce indirection. The refactoring streamlines value handling throughout the system by eliminating the HashedValue wrapper in most places while confining HashedIterable usage to Variable domains only.

Key changes:

  • Removed HashedValue wrapper from operation bindings, changing type signatures from Dict[int, HashedValue] to Dict[int, Any] throughout
  • Eliminated the From class wrapper, using domain values directly as DomainType (Union[Iterable, None])
  • Removed unused classes (Infer), methods (_projection_, _is_duplicate_output_), and HashedIterable helper methods

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/krrood_test/test_eql/test_indexing.py Removed unused From import
test/krrood_test/test_eql/test_core/test_queries.py Updated test to use a() instead of an() and removed .value access from sources assertion
krrood/src/krrood/entity_query_language/utils.py Updated comments to reflect removal of HashedValue wrapper
krrood/src/krrood/entity_query_language/symbolic.py Core refactoring: removed HashedValue wrappers from bindings, removed From class, removed unused methods, updated type signatures, moved DomainType definition here, simplified _unique_variables_ to return Set[Variable]
krrood/src/krrood/entity_query_language/match.py Updated imports to get DomainType from symbolic module, updated type signatures
krrood/src/krrood/entity_query_language/hashed_data.py Removed most HashedIterable helper methods (get, add, update, map, filter, union, intersection, etc.) leaving only minimal iterator functionality
krrood/src/krrood/entity_query_language/entity.py Removed From class and DomainType definition, updated to import from symbolic module
krrood/src/krrood/entity_query_language/conclusion_selector.py Removed _projection_ method, simplified variable filtering using set comprehensions instead of HashedIterable.filter()
krrood/src/krrood/entity_query_language/conclusion.py Removed Infer class, updated type signatures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread krrood/src/krrood/entity_query_language/symbolic.py Outdated
Comment thread krrood/src/krrood/entity_query_language/cache_data.py
Comment thread krrood/src/krrood/entity_query_language/cache_data.py Outdated
Comment thread krrood/src/krrood/entity_query_language/match.py Outdated
@AbdelrhmanBassiouny AbdelrhmanBassiouny merged commit f2ea3e0 into cram2:main Dec 8, 2025
6 checks passed
Julislz referenced this pull request in SUTURO/cognitive_robot_abstract_machine Dec 8, 2025
Fixed inheritance of generated tables.
sunava pushed a commit to sunava/cognitive_robot_abstract_machine that referenced this pull request Apr 7, 2026
…merged

PR: M3 sprint8 - pickup place marc merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants