Skip to content
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

[FIX] Changes the type of ConvertScalarImageToRGBInputSpec.mask_file from File to traits.Str #3364

Merged
merged 5 commits into from
Apr 3, 2022
Merged

[FIX] Changes the type of ConvertScalarImageToRGBInputSpec.mask_file from File to traits.Str #3364

merged 5 commits into from
Apr 3, 2022

Conversation

ChristianHinge
Copy link
Contributor

@ChristianHinge ChristianHinge commented Aug 6, 2021

I am very new at making PR's so please let me know if I missed something formal about the process. I read the contributors guideline and have run the make check-before-commit and pre-commit.

Summary

The problem is described in depth in the linked issue.
The mask_file of ConvertScalarImageToRGBInputSpec is an optional argument of type File with a default value of "none" and exists=True.
In some cases, this causes workflows to crash, as the nipype file validation sees that no file name "none" exists.

#3363

Fixes

I propose changing the type to traits.Str, since the mask_file input to the commandline tool is either a string referencing an existing file, or the string "none". Looking at the inputspec, it seems a similar thing was done to another optional input: custom_color_map_file.

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

@codecov
Copy link

codecov bot commented Aug 6, 2021

Codecov Report

Merging #3364 (921f792) into master (201a13f) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3364   +/-   ##
=======================================
  Coverage   65.22%   65.22%           
=======================================
  Files         308      308           
  Lines       40536    40536           
  Branches     5355     5355           
=======================================
  Hits        26439    26439           
  Misses      13022    13022           
  Partials     1075     1075           
Flag Coverage Δ
unittests 64.94% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nipype/interfaces/ants/visualization.py 87.75% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 201a13f...921f792. Read the comment docs.

Copy link
Member

@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.

Apologies this took so long to get to. Would you mind having a look at the suggested change?

@effigies effigies mentioned this pull request Oct 15, 2021
15 tasks
@effigies effigies added this to the 1.7.1 milestone Apr 3, 2022
@effigies effigies merged commit 1342d62 into nipy:master Apr 3, 2022
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