Skip to content

Evaluator improvements#3003

Merged
slaff merged 5 commits intoSmingHub:developfrom
mikee47:feature/evaluator-improvements
Feb 9, 2026
Merged

Evaluator improvements#3003
slaff merged 5 commits intoSmingHub:developfrom
mikee47:feature/evaluator-improvements

Conversation

@mikee47
Copy link
Contributor

@mikee47 mikee47 commented Feb 8, 2026

  • Fix handling expressions such as "!value". Substitution converts this to " not value" and space at beginning needs stripping
  • Support lists and sets
  • Pull evaluator README into main documentation tree and reference directly

Substitution converts this to " not value" and space at beginning
needs stripping. Add test case.
@mikee47 mikee47 marked this pull request as draft February 8, 2026 10:28
@what-the-diff
Copy link

what-the-diff bot commented Feb 8, 2026

PR Summary

  • Enhanced List and Set Type Handling
    We've improved the functionality of our program by now allowing it to process both list and set literals. The change influences the _eval method, ultimately increasing the efficiency of handling these particular data types.

  • Refined Expression Parsing
    We've simplified the way we parse instructions or 'expressions' within our run method. This update includes removing any unnecessary whitespace found at the beginning or end of our process instructions.

  • Expanded Test Coverage
    In order to ensure the quality of our system, we have widened our range of test cases. Our updates cover the following areas:

    • Test cases for reversing the logical value of a numerical variable, testing both single (!NUMERIC_VAR) and double (!!NUMERIC_VAR) reversals.
    • Additional checks for elements belonging to a list under different conditions.
    • Tests for set literals - this helps us to ensure that collections of unique items are evaluated correctly.
  • Improved Checks for Equivalence in Tests
    To cover scenarios where data types might differ yet represent the same value, we've updated our equality checks in tests to compare string representations of values. The change with success = (str(actual) == str(expected)) checks for matched content instead of matched types, making our tests more reliable in diverse situations.

@mikee47 mikee47 force-pushed the feature/evaluator-improvements branch from 9d2c807 to bc6a6cc Compare February 8, 2026 10:31
@mikee47
Copy link
Contributor Author

mikee47 commented Feb 8, 2026

@pljakobs Anything else you'd find useful in the evaluator?

@mikee47 mikee47 force-pushed the feature/evaluator-improvements branch from 93b755c to 2740395 Compare February 8, 2026 11:25
@mikee47 mikee47 marked this pull request as ready for review February 8, 2026 11:25
@pljakobs
Copy link
Contributor

pljakobs commented Feb 8, 2026

not at this time, it does anything I need in ConfigDB.
If it will be enabled in .hw files, hex/dec conversion would probably be useful but beyond that, I currently lack the imagination what else could be useful.

@mikee47
Copy link
Contributor Author

mikee47 commented Feb 8, 2026

If it will be enabled in .hw files, hex/dec conversion would probably be useful...

I'll take a look at that separately

@slaff slaff added this to the 6.3.0 milestone Feb 9, 2026
@slaff slaff merged commit 0d620bc into SmingHub:develop Feb 9, 2026
31 checks passed
@mikee47 mikee47 deleted the feature/evaluator-improvements branch February 13, 2026 14:44
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.

3 participants