Skip to content

Fixed output step when it is an empty list#472

Merged
GlassOfWhiskey merged 1 commit intomasterfrom
fix/empty-output-list
Jun 6, 2024
Merged

Fixed output step when it is an empty list#472
GlassOfWhiskey merged 1 commit intomasterfrom
fix/empty-output-list

Conversation

@LanderOtto
Copy link
Copy Markdown
Collaborator

@LanderOtto LanderOtto commented Jun 5, 2024

This commit returns an empty list when no data are generated from a CWL step that expects an array output type. In addition, this commit forces all output processors to be optional when an array output type is specified, as the CWL standard allows falling back to an empty list even for non-optional output parameters.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.24%. Comparing base (5b29572) to head (059e172).
Report is 1 commits behind head on master.

Files Patch % Lines
streamflow/cwl/processor.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #472   +/-   ##
=======================================
  Coverage   70.24%   70.24%           
=======================================
  Files          85       85           
  Lines       10642    10642           
  Branches     2505     2505           
=======================================
  Hits         7475     7475           
- Misses       2703     2709    +6     
+ Partials      464      458    -6     

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

@GlassOfWhiskey GlassOfWhiskey merged commit 1b5a90b into master Jun 6, 2024
@GlassOfWhiskey GlassOfWhiskey deleted the fix/empty-output-list branch June 6, 2024 17:06
LanderOtto added a commit that referenced this pull request Mar 11, 2026
…en an output was mandatory but the glob found no files, an empty token was propagated. Now, if no files match: a list is propagated for mandatory outputs, while an empty token is propagated for optional outputs.

Moreover, this commit streamlines command output processing by removing the manual manipulation of glob results and instead leveraging the single logic already present.

This same issue with empty globs was previously solved in #472; a regression test has now been added to prevent future occurrences.
@LanderOtto LanderOtto mentioned this pull request Mar 11, 2026
GlassOfWhiskey pushed a commit that referenced this pull request Mar 13, 2026
This commit fixes an issue introduced in #959. Before this commit,
when an output was a mandatory list of files but the glob found no
files, an empty token was propagated. Now, if no files match: a list
is propagated for mandatory outputs, while an empty token is
propagated for optional outputs.

Moreover, this commit streamlines command output processing by
removing the manual manipulation of glob results and instead
leveraging the `single` logic already present in the
`CWLCommandOutputProcessor`.

This same issue with empty globs was previously solved in #472; a
regression test has now been added to prevent future occurrences.
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.

2 participants