Skip to content

Refactor nodes into modular package and add new test assertions#2

Open
WASasquatch wants to merge 2 commits intomainfrom
was-refactor-and-test-assertions
Open

Refactor nodes into modular package and add new test assertions#2
WASasquatch wants to merge 2 commits intomainfrom
was-refactor-and-test-assertions

Conversation

@WASasquatch
Copy link

Summary

  • Split monolithic nodes.py into a nodes/ package with separate modules: assertions_general, assertions_image, assertions_mask, assertions_string, generators, test_definition
  • Refactored __init__.py to auto-discover node classes via pkgutil instead of manual imports
  • Added new assertion nodes: Image Similarity, Mask Coverage, Mask Binary, Mask Fuzzy, String Contains, String Match, String Hash
  • Added new generator nodes: Test Mask Generator, Test String Generator
  • Added MaskCheckerboardTest.json test workflow
  • Updated README with new node documentation

All new and existing nodes have been tested and confirmed working.

Split monolithic nodes.py into nodes/ package with separate modules for
general assertions, image assertions, mask assertions, string assertions,
generators, and test definition. Add auto-discovery of node classes via
pkgutil. Add new assertion nodes (image similarity, mask coverage/binary/fuzzy,
string contains/match/hash), new generators (mask, string), and a
MaskCheckerboardTest workflow.
@WASasquatch
Copy link
Author

Claude seems to have taken the liberty to add a test workflow. That hasn't been reviewed, and was not asked for. Intention of using claude was to just do the PR in same style as other projects cloned and follow same formatting without me having to go look at them myself.

@WASasquatch WASasquatch requested a review from guill March 5, 2026 21:56
AssertStringNotContains supports literal, regex, and llm_guard modes for
checking that strings don't contain forbidden patterns. AssertStringLength
validates string length is within min/max bounds, useful for non-deterministic
LLM outputs.
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.

1 participant