Skip to content

Conversation

@gabrielguarisa
Copy link
Collaborator

@gabrielguarisa gabrielguarisa commented Jan 2, 2026

Handle case where differences are empty by returning an empty Series.

This is necessary because, without this treatment, when using node DifferenceBetweenDates after a node of type If, the following error occurs:

AttributeError: Can only use .dt accessor with datetimelike values

This error occurs when an empty pd.Series() is sent to the DifferenceBetweenDates input. Note that pd.Series() != pd.Series([np.nan]). The second case was already handled in the run method.

A test was implemented to demonstrate the behavior. Without the error handler in the class, the test fails (reproducing the error). By implementing the handler, the test passes.

Handle case where differences are empty by returning an empty Series.
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
   datetime.py78199%92
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067695% 

Tests Skipped Failures Errors Time
90 0 💤 0 ❌ 0 🔥 4.069s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
   datetime.py78199%92
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067894% 

Tests Skipped Failures Errors Time
90 0 💤 0 ❌ 0 🔥 4.895s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14047595% 

Tests Skipped Failures Errors Time
91 0 💤 1 ❌ 0 🔥 4.419s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14047795% 

Tests Skipped Failures Errors Time
91 0 💤 1 ❌ 0 🔥 5.344s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067795% 

Tests Skipped Failures Errors Time
91 0 💤 0 ❌ 0 🔥 5.184s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067595% 

Tests Skipped Failures Errors Time
91 0 💤 0 ❌ 0 🔥 3.795s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067595% 

Tests Skipped Failures Errors Time
91 0 💤 0 ❌ 0 🔥 3.856s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067795% 

Tests Skipped Failures Errors Time
91 0 💤 0 ❌ 0 🔥 4.922s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067595% 

Tests Skipped Failures Errors Time
91 0 💤 0 ❌ 0 🔥 3.461s ⏱️

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

coverage

Coverage Report
FileStmtsMissCoverMissing
retrack/engine
   base.py50492%35, 97, 104, 107
   executor.py1221092%62, 74–75, 144, 208, 252, 267, 271, 283, 291
   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
retrack/validators
   base.py4175%14
   node_exists.py15287%36, 38
   node_validator.py33391%31, 56–57
TOTAL14067795% 

Tests Skipped Failures Errors Time
91 0 💤 0 ❌ 0 🔥 4.474s ⏱️

@gabrielguarisa gabrielguarisa merged commit 9cea84e into main Jan 5, 2026
3 checks passed
@gabrielguarisa gabrielguarisa deleted the b/fix-empty-differences-1 branch January 5, 2026 14:57
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