Implemented some enhancement request and fixed some bugs

Fixed #2 : Variables are not recognized when inside a rule token
Fixed #15 : Rule: rete attributes are lost when a new ontology is created
Fixed #14 : ReteNetwork: Format rules must not be added to Rete network
Fixed #16 : DefConcept: Variables are not recognized when they are keyword arguments
Fixed #4 : Comparison are not correctly set when comparison property is a concept
Fixed #14 : Parser: merge FunctionParser.NamesNode and ExpressionParser.NamesNode
Fixed #18 : Parser: Add SourceCodeNode test to UnrecognizedNodeParser
Fixed #20 : At startup Number concept is saved in db a numerous number of time
Fixed #21 : CacheManager: I can remove all elements from a ListIfNeededCache and fill it again
Fixed #22 : CacheManager: I can remove all elements from a SetCache and fill it again
Fixed #23 : HistoryManager: history() no longer works
Fixed #24 : HistoryManager: history() no longer works after creating an exec rule
Fixed #25 : SheerkaMemory: Use MemoryObject instead of sheerka.local
Fixed #26 : Debugger: add the list all available services..
Fixed #27 : CONCEPTS_GRAMMARS_ENTRY does not seems to be in use any more
Fixed #28 : Give order to services
This commit is contained in:
2021-02-12 15:15:31 +01:00
parent 3a12ea58df
commit cac2dad17f
62 changed files with 1182 additions and 480 deletions
+6 -3
View File
@@ -151,7 +151,8 @@ class TestSheerkaExecuteParsers(TestUsingMemoryBasedSheerka):
service = SheerkaExecute(sheerka)
service.reset_registered_parsers()
groups, sorted_priorities = service.get_parsers(context)
parsers_key, groups, sorted_priorities = service.get_parsers(context)
assert parsers_key == "__default"
assert groups == {80: [Enabled80FalseParser()], 90: [Enabled90FalseParser()]}
assert sorted_priorities == [90, 80]
@@ -169,7 +170,8 @@ class TestSheerkaExecuteParsers(TestUsingMemoryBasedSheerka):
parsers_names = ["Enabled50True", "Enabled70False", "Disabled"]
context.preprocess_parsers = parsers_names
groups, sorted_priorities = service.get_parsers(context)
parsers_key, groups, sorted_priorities = service.get_parsers(context)
assert parsers_key == "Enabled50True|Enabled70False|Disabled"
assert groups == {50: [Enabled50TrueParser()], 70: [Enabled70FalseParser()]}
assert sorted_priorities == [70, 50] # Disabled parser does not appear
@@ -195,7 +197,8 @@ class TestSheerkaExecuteParsers(TestUsingMemoryBasedSheerka):
context.add_preprocess(BaseParser.get_name("Enabled90False"), enabled=False)
context.add_preprocess(BaseParser.get_name("Enabled50True"), priority=80)
groups, sorted_priorities = service.get_parsers(context)
parsers_key, groups, sorted_priorities = service.get_parsers(context)
assert parsers_key is None
assert groups == {80: [Enabled50TrueParser()], 70: [Enabled70FalseParser()]}
assert sorted_priorities == [80, 70] # Disabled parsers does not appear