Skip to content

Handle-none-outputs #790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Handle-none-outputs #790

wants to merge 9 commits into from

Conversation

tclose
Copy link
Contributor

@tclose tclose commented Apr 9, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Summary

Handles the case of tasks and workflows without any outputs (i.e. return type is set to None). In this case the outputs are empty.

Checklist

  • I have added tests to cover my changes (if necessary)
  • I have updated documentation (if necessary)

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 86.44068% with 8 lines in your changes missing coverage. Please review.

Project coverage is 88.67%. Comparing base (3aad031) to head (aa35926).

Files with missing lines Patch % Lines
pydra/compose/base/helpers.py 82.75% 2 Missing and 3 partials ⚠️
pydra/compose/tests/test_python_fields.py 89.28% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #790      +/-   ##
==========================================
+ Coverage   88.51%   88.67%   +0.15%     
==========================================
  Files          83       83              
  Lines       17719    17751      +32     
  Branches     3441     3451      +10     
==========================================
+ Hits        15684    15740      +56     
+ Misses       1665     1642      -23     
+ Partials      370      369       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tclose tclose requested a review from effigies April 10, 2025 08:48
@tclose tclose added the patch Increment the patch version when merged (label from auto) label Apr 10, 2025
@tclose tclose force-pushed the handle-none-outputs branch from 4e5d4ab to 7aaa539 Compare April 14, 2025 02:13
@tclose tclose force-pushed the handle-none-outputs branch from 7aaa539 to aa35926 Compare April 17, 2025 01:56
Copy link
Contributor

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Makes sense to me, good tests. One small thing I noticed that could be addressed here or later.

Comment on lines +186 to 189
if inputs is not None:
if not isinstance(inputs, dict):
raise ValueError(
f"Input names ({inputs}) should not be provided when "
Copy link
Contributor

Choose a reason for hiding this comment

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

Just looking at this, it seems like inputs could be a list[str | Arg], but it isn't turned into a dict before this. This means we'll now error on an empty list as well as a populated list, but maybe we should just remove the list annotation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged (label from auto)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants