Skip to content

[MAINT] Offload interfaces with help formatting #2797

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 9 commits into from
Dec 14, 2018

Conversation

oesteban
Copy link
Contributor

@oesteban oesteban commented Nov 24, 2018

This is the first on a series of PRs to clean up Nipype interfaces.

EDIT: also removed load_template from nipype.interfaces.base.support because it was deprecated since 1.0.0 and scheduled for removal in 1.1.0

This is the first on a series of PRs to clean up Nipype interfaces.
@satra
Copy link
Member

satra commented Nov 24, 2018

thanks for this - we can re-use this in the pydra refactor.

@codecov-io
Copy link

codecov-io commented Nov 24, 2018

Codecov Report

Merging #2797 into master will decrease coverage by 3.46%.
The diff coverage is 86.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2797      +/-   ##
==========================================
- Coverage   67.51%   64.05%   -3.47%     
==========================================
  Files         341      339       -2     
  Lines       43297    43296       -1     
  Branches     5369     5374       +5     
==========================================
- Hits        29234    27732    -1502     
- Misses      13363    14495    +1132     
- Partials      700     1069     +369
Flag Coverage Δ
#smoketests ?
#unittests 64.05% <86.73%> (-0.89%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/base/__init__.py 100% <100%> (ø) ⬆️
nipype/scripts/utils.py 27.16% <50%> (+0.91%) ⬆️
nipype/utils/nipype_cmd.py 42.62% <50%> (+0.95%) ⬆️
nipype/interfaces/base/support.py 79.65% <88.15%> (+8.65%) ⬆️
nipype/interfaces/base/core.py 84.25% <88.23%> (-2.85%) ⬇️
nipype/interfaces/nilearn.py 40% <0%> (-56.67%) ⬇️
nipype/utils/spm_docs.py 25.92% <0%> (-44.45%) ⬇️
nipype/interfaces/freesurfer/base.py 50% <0%> (-30.51%) ⬇️
nipype/utils/logger.py 59.7% <0%> (-29.86%) ⬇️
nipype/algorithms/rapidart.py 35% <0%> (-29.61%) ⬇️
... and 57 more

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 fc85fef...7861a4a. Read the comment docs.

@oesteban
Copy link
Contributor Author

Anyone is currently/planning to reviewing this or is it good to go?

@effigies
Copy link
Member

I haven't had a chance to look at any of these refactors. If they're inert, that's fine, but I'll admit I'm a little wary of a huge battery of refactors immediately before a release.

@oesteban
Copy link
Contributor Author

Oh sure, let's hold on to after the release.

@effigies effigies added this to the 1.1.7 milestone Nov 26, 2018
@oesteban oesteban modified the milestone: 1.1.7 Nov 26, 2018
@effigies
Copy link
Member

@oesteban Is this good to go? Realizing that 1.1.7 is just about here, and trying to decide what to push off to next month. (It's going to be most things, but if this is just a quick review, I can do it tomorrow.)

If the docs are produced from the help text, that will make checking the results of this easy. @satra Is that the case?

@satra
Copy link
Member

satra commented Dec 14, 2018

docs are produced from the help text. (a side bug: our release version docs don't list the release version properly)

@satra
Copy link
Member

satra commented Dec 14, 2018

@oesteban
Copy link
Contributor Author

This one is ready to go 👍

@satra, what you mean by our release version docs don't list the release version properly?

@satra
Copy link
Member

satra commented Dec 14, 2018

@effigies - take a look at the release/devel versions on the side panel in these two links:

https://nipype.readthedocs.io/en/1.1.6/
https://nipype.readthedocs.io/en/latest/

@satra
Copy link
Member

satra commented Dec 14, 2018

i meant @oesteban - sorry

@effigies
Copy link
Member

@satra Sorry, missed that in the last release. Pushed a fix master, so we'll get it for a couple days, but no going back to fix it on the release tag.

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.

@oesteban Compare:

Old

screen shot 2018-12-14 at 09 09 26

New

screen shot 2018-12-14 at 09 09 34

I agree with the move away from alphabetizing inputs/outputs, as those are usually already sorted by the interface author's notion of importance. (This was possibly accidental... I've suggested removing sorted in a couple more places.)

I think we should preserve the extra newline between mandatory and optional sections, and I think the extra indentation helps the input names pop out, so I've made suggestions I think will resolve these.

A further note, it looks like we have not been generating references correctly (see "References:: None" under *CompCor) but now we're not generating them at all. Fixing generation is probably a problem for another PR and thus another release, but I've at least suggested a fix I think will restore the indicator that there should be a reference.

@effigies effigies mentioned this pull request Dec 14, 2018
9 tasks
@oesteban
Copy link
Contributor Author

A further note, it looks like we have not been generating references correctly (see "References:: None" under *CompCor) but now we're not generating them at all. Fixing generation is probably a problem for another PR and thus another release, but I've at least suggested a fix I think will restore the indicator that there should be a reference.

Yep, I think I assumed we would go back to this issue at some point, and I didn't like having that "References:: None". But I'm fine either way.

@effigies
Copy link
Member

@effigies
Copy link
Member

But otherwise this looks good.

@effigies effigies merged commit fbed1f3 into nipy:master Dec 14, 2018
yarikoptic added a commit to yarikoptic/nipype that referenced this pull request Jan 11, 2019
1.1.7 (December 17, 2018)

* FIX: Copy node list before generating a flat graph (nipy#2828)
* FIX: Update pytest req'd version to 3.6 (nipy#2827)
* FIX: Set ResourceMonitor.fname to an absolute path (nipy#2824)
* FIX: Order of SPM.NewSegment channel_info boolean tuple is (Field, Corrected) (nipy#2817)
* FIX: Indices were swapped for memory and cpu profile data (nipy#2816)
* FIX: ``status_callback`` not called with ``stop_on_first_crash`` (nipy#2810)
* FIX: Change undefined ScriptError on LFS plugin to IOError (nipy#2803)
* ENH: Add NaN failure mode to CompCor interfaces (nipy#2819)
* ENH: Enable cnr_maps and residuals outputs for FSL eddy (nipy#2750)
* ENH: Improve ``str2bool`` + doctests (nipy#2807)
* TST: Improve py.test configuration of doctests (nipy#2802)
* DOC: Update DOI badge to point to all versions (nipy#2804)
* MAINT: Offload interfaces with help formatting (nipy#2797)
* MAINT: Reduce minimal code redundancy in filemanip.get_dependencies (nipy#2782)
* MAINT: Delayed imports to reduce import time (nipy#2809)
...
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.

4 participants