Skip to content

Add Duplicate Node Names Validator#54

Open
pedroigorjs wants to merge 2 commits into
mainfrom
f/add-nodes-name-validation
Open

Add Duplicate Node Names Validator#54
pedroigorjs wants to merge 2 commits into
mainfrom
f/add-nodes-name-validation

Conversation

@pedroigorjs

Copy link
Copy Markdown
Contributor

This pull request introduces a new validator to ensure node names are unique within a graph and adds comprehensive test coverage for this validation. The main changes include the implementation of the validator, a new invalid test resource, and an additional test case.

Validation logic:

  • Added UniqueNodeNameValidator in unique_node_name.py to check that all node names (excluding "Input" and "Output") are unique within the graph, returning a detailed error message if duplicates are found.

Testing:

  • Added a new invalid graph resource duplicate-node-names.json containing nodes with duplicate names to test the validator.
  • Extended the test suite in test_executor.py to include a case that expects a duplicate node name error when processing the new resource.

@pedroigorjs pedroigorjs self-assigned this Jan 28, 2026
@pedroigorjs pedroigorjs added the enhancement New feature or request label Jan 28, 2026
@github-actions

Copy link
Copy Markdown

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py65494%46, 144, 151, 154
   executor.py125993%62, 74–75, 144, 211, 255, 271, 275, 287
   request_manager.py67790%17, 36, 55, 70–71, 154, 157
   rule.py50394%87, 109, 116
retrack/nodes
   check.py41393%23, 26, 89
   constants.py92397%122, 125, 170
   math.py43198%75
retrack/nodes/dynamic
   base.py16194%26
   csv_table.py43295%59, 62
   flow.py44198%18
retrack/utils
   component_registry.py1051883%77–78, 81–82, 85–86, 91–92, 101, 112–123
   exceptions.py28582%17–18, 106–127
   graph.py60788%35, 46, 59, 61, 63, 84, 86
   registry.py34682%23–26, 38, 43, 51
   transformers.py123596%15, 35–36, 134, 143
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
   unique_node_name.py24240%1–52
TOTAL157310593% 

Tests Skipped Failures Errors Time
93 0 💤 1 ❌ 0 🔥 5.217s ⏱️

@github-actions

Copy link
Copy Markdown

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py65494%46, 144, 151, 154
   executor.py125993%62, 74–75, 144, 211, 255, 271, 275, 287
   request_manager.py67790%17, 36, 55, 70–71, 154, 157
   rule.py50394%87, 109, 116
retrack/nodes
   check.py41393%23, 26, 89
   constants.py92397%122, 125, 170
   math.py43198%75
retrack/nodes/dynamic
   base.py16194%26
   csv_table.py43295%59, 62
   flow.py44198%18
retrack/utils
   component_registry.py1051883%77–78, 81–82, 85–86, 91–92, 101, 112–123
   exceptions.py28389%106–127
   graph.py60788%35, 46, 59, 61, 63, 84, 86
   registry.py34682%23–26, 38, 43, 51
   transformers.py123596%15, 35–36, 134, 143
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
   unique_node_name.py24240%1–52
TOTAL157310393% 

Tests Skipped Failures Errors Time
93 0 💤 1 ❌ 0 🔥 3.943s ⏱️

@github-actions

Copy link
Copy Markdown

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py65494%46, 144, 151, 154
   executor.py125993%62, 74–75, 144, 211, 255, 271, 275, 287
   request_manager.py67790%17, 36, 55, 70–71, 154, 157
   rule.py50394%87, 109, 116
retrack/nodes
   check.py41393%23, 26, 89
   constants.py92397%122, 125, 170
   math.py43198%75
retrack/nodes/dynamic
   base.py16194%26
   csv_table.py43295%59, 62
   flow.py44198%18
retrack/utils
   component_registry.py1051883%77–78, 81–82, 85–86, 91–92, 101, 112–123
   exceptions.py28582%17–18, 106–127
   graph.py60788%35, 46, 59, 61, 63, 84, 86
   registry.py34682%23–26, 38, 43, 51
   transformers.py123596%15, 35–36, 134, 143
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL15758195% 

Tests Skipped Failures Errors Time
93 0 💤 0 ❌ 0 🔥 5.207s ⏱️

@github-actions

Copy link
Copy Markdown

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py65494%46, 144, 151, 154
   executor.py125993%62, 74–75, 144, 211, 255, 271, 275, 287
   request_manager.py67790%17, 36, 55, 70–71, 154, 157
   rule.py50394%87, 109, 116
retrack/nodes
   check.py41393%23, 26, 89
   constants.py92397%122, 125, 170
   math.py43198%75
retrack/nodes/dynamic
   base.py16194%26
   csv_table.py43295%59, 62
   flow.py44198%18
retrack/utils
   component_registry.py1051883%77–78, 81–82, 85–86, 91–92, 101, 112–123
   exceptions.py28389%106–127
   graph.py60788%35, 46, 59, 61, 63, 84, 86
   registry.py34682%23–26, 38, 43, 51
   transformers.py123596%15, 35–36, 134, 143
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL15757995% 

Tests Skipped Failures Errors Time
93 0 💤 0 ❌ 0 🔥 3.939s ⏱️

Base automatically changed from f/improve-execution-serialization to main January 29, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant