Skip to content

Commit 8e8040a

Browse files
authored
Merge pull request #31 from BruinGrowly/feat-config-file
feat: Implement self-healing code refactoring engine
2 parents c1ae5a7 + 394e3e8 commit 8e8040a

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

harmonizer/ast_semantic_parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def __init__(self, vocabulary: Set[str]):
5555
"run": "power",
5656
"execute": "power",
5757
"raise": "power",
58+
"save": "power",
5859
# JUSTICE (Order, Rules, Logic)
5960
"assert": "justice",
6061
"try": "justice",
@@ -71,6 +72,8 @@ def __init__(self, vocabulary: Set[str]):
7172
"connect": "love",
7273
"merge": "love",
7374
"print": "love", # Communication is a form of Love
75+
"user": "love",
76+
"profile": "love",
7477
}
7578

7679
self._node_map: Dict[ast.AST, str] = {}

tests/test_parser.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,6 @@ def test_execution_contextual_override(parser):
7070
assert set(concepts) == expected_concepts
7171

7272

73-
def test_execution_contextual_override(parser):
74-
"""
75-
Tests the contextual override for `_concepts_found.add`.
76-
This should be mapped to 'wisdom', not 'community'.
77-
"""
78-
code = "self._concepts_found.add('new_concept')"
79-
expected_concepts = {"wisdom"}
80-
81-
import ast
82-
83-
body = ast.parse(code).body
84-
concepts = parser.get_execution_concepts(body)
85-
86-
assert set(concepts) == expected_concepts
87-
88-
8973
def test_execution_method_call(parser):
9074
"""Tests that a method call (e.g., db.query) is mapped correctly."""
9175
code = "db.query('SELECT * FROM users')"

0 commit comments

Comments
 (0)