Skip to content

[ENH] add -dsort option to TProject #2623

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

Merged
merged 3 commits into from
Jun 28, 2018
Merged

[ENH] add -dsort option to TProject #2623

merged 3 commits into from
Jun 28, 2018

Conversation

mattcieslak
Copy link
Contributor

Adds a -dsort option to nipype.interfaces.afni.TProject

@codecov-io
Copy link

codecov-io commented Jun 20, 2018

Codecov Report

Merging #2623 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2623      +/-   ##
==========================================
- Coverage    67.6%   67.56%   -0.04%     
==========================================
  Files         339      339              
  Lines       42820    42821       +1     
  Branches     5290     5290              
==========================================
- Hits        28948    28932      -16     
- Misses      13189    13207      +18     
+ Partials      683      682       -1
Flag Coverage Δ
#smoketests 50.76% <ø> (ø) ⬆️
#unittests 65.05% <100%> (-0.04%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/afni/preprocess.py 81.53% <100%> (+0.02%) ⬆️
nipype/interfaces/io.py 53.15% <0%> (-1.33%) ⬇️

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 704b97d...264f0e4. Read the comment docs.

Copy link
Member

@mgxd mgxd left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I left a comment below - also be sure to run make specs after the changes to update the autotest

desc="""Remove the 3D+time time series in dataset fset.
++ That is, 'fset' contains a different nuisance time
series for each voxel (e.g., from AnatICOR).
++ Multiple -dsort options are allowed.""",
Copy link
Member

Choose a reason for hiding this comment

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

Since multiple -dsort options are allowed, let's allow multiple files.

Here's an example, but you'll want to use InputMultiObject instead of InputMultiPath

series_numbers = InputMultiPath(
traits.Str(),
argstr='-n %s...',

@mattcieslak
Copy link
Contributor Author

Thanks for pointing out that this can take multiple files! I changed it, checked that it produced a correct command line, and ran make specs. It looks like the test failed while trying to download something.

Copy link
Member

@mgxd mgxd left a comment

Choose a reason for hiding this comment

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

LGTM, one last comment - looks like the ci failure is unrelated.

File(
exists=True,
copyfile=False),
argstr="%s",
Copy link
Member

Choose a reason for hiding this comment

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

you can change this to argstr="-dsort %s..." and it'll apply the same behavior you added in _format_arg

Copy link
Member

Choose a reason for hiding this comment

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

@mattcieslak no worries, we love getting new contributions! the only thing missing is changing dsort's argstr (see above) and removing the _format_arg method

@mgxd mgxd added this to the 1.1.0 milestone Jun 25, 2018
@mgxd
Copy link
Member

mgxd commented Jun 27, 2018

@mattcieslak this was very close! mind if I reopen?

@mattcieslak
Copy link
Contributor Author

Should it stay open until 1.1.0? Or should I remove the _format_arg and request another review? Sorry, I'm new to this

@mattcieslak mattcieslak reopened this Jun 27, 2018
@mgxd mgxd merged commit eede943 into nipy:master Jun 28, 2018
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