Skip to content

Conversation

@marip8
Copy link
Contributor

@marip8 marip8 commented Apr 16, 2025

This PR provides a means to override the return value of a task. This can be useful for debugging (e.g., forcing a task composer graph to take a specific path) and potentially for unit testing (for the same reason).

@marip8 marip8 changed the title Task composer task return value override Add task composer task return value override Apr 16, 2025
@codecov
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.79%. Comparing base (06ab01c) to head (8c70c44).
Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
...ract_task_composer/core/src/task_composer_node.cpp 62.50% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #612      +/-   ##
==========================================
- Coverage   76.80%   76.79%   -0.01%     
==========================================
  Files         233      233              
  Lines       13982    13989       +7     
==========================================
+ Hits        10739    10743       +4     
- Misses       3243     3246       +3     
Files with missing lines Coverage Δ
.../tesseract_task_composer/core/task_composer_node.h 100.00% <ø> (ø)
...ract_task_composer/core/src/task_composer_node.cpp 82.09% <62.50%> (-0.46%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@Levi-Armstrong Levi-Armstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only request is to add unit tests to cover the new functionality.

{
results.return_value = return_value_override_;
results.status_message += " (Return value overridden to " + std::to_string(return_value_override_) + ")";
results.color = "yellow";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I would vote for a color other than yellow as that is already used elsewhere. Maybe a blue or cyan? I was going to say gray, but that appears to already be used to represent "abort"

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