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

ENH: Integrate new infrastructure in NiWorkflows to handle spatial references #159

Merged
merged 29 commits into from
Jan 30, 2020

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Jan 21, 2020

upstream PR - nipreps/fmriprep#1915

Changes

  • change output_spaces OrderedDict in function signatures to spaces, a Spaces object.

Maintenance

  • Remove --template, --fs-output-spaces, and --no-freesurfer command line arguments

@mgxd mgxd changed the title Rework: in Rework: internal / output spaces Jan 21, 2020
@pep8speaks
Copy link

pep8speaks commented Jan 22, 2020

Hello @mgxd! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-01-29 15:31:06 UTC

@mgxd
Copy link
Collaborator Author

mgxd commented Jan 22, 2020

@oesteban this roughly models the behavior discussed in nipreps/fmriprep#1604, though since we're essentially treating this as a new language (spac-ese?) it would be good to cement the conventions, especially when multiple entities are given.

An example of a potentially ambiguous input:
--output-spaces MNI152:label1-a:label2-b

Should this produce 1 MNI152 output with label1 / label2 specifications, or 2 MNI152 outputs each pertaining to a label spec?

To make this clearer, I propose introducing the , character to denote multiple specifications for a single space.

i.e.

  • --output-spaces MNI152NLin2009cAsym:res-1:res-2 should produce 2 resolutions of the MNI152NLin2009cAsym template

  • --output-spaces MNIPediatricAsym:cohort-1,res-2 should produce 1 resolution of cohort 1

  • --output-spaces MNIPediatricAsym:cohort-1:res-2 should produce the default (unspecified) resolution of cohort-1, and a lower resolution default MNIPediatricAsym (if there is one available)

WDYT?

@mgxd mgxd requested review from oesteban and effigies January 23, 2020 16:14
smriprep/cli/run.py Show resolved Hide resolved
smriprep/cli/run.py Outdated Show resolved Hide resolved
smriprep/cli/run.py Outdated Show resolved Hide resolved
smriprep/cli/run.py Outdated Show resolved Hide resolved
smriprep/workflows/norm.py Outdated Show resolved Hide resolved
@oesteban
Copy link
Member

Please check out mgxd#2

spaces,
debug=False,
name='anat_preproc_wf',
skull_strip_fixed_seed=False
Copy link
Member

Choose a reason for hiding this comment

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

Just a note that we've apparently abandoned our usual rule of no default arguments (except name) in workflow building functions.

We might want to think about either re-enforcing it or making an explicit statement in a style guide of when default arguments should be used.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds reasonable

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.

This LGTM.

@effigies effigies added this to the 0.5.0 milestone Jan 29, 2020
@mgxd mgxd added the blocked label Jan 29, 2020
@oesteban
Copy link
Member

@mgxd why blocked?

@codecov-io
Copy link

codecov-io commented Jan 29, 2020

Codecov Report

Merging #159 into master will decrease coverage by 0.07%.
The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #159      +/-   ##
==========================================
- Coverage   77.64%   77.56%   -0.08%     
==========================================
  Files          15       14       -1     
  Lines         841      798      -43     
  Branches      104       90      -14     
==========================================
- Hits          653      619      -34     
+ Misses        145      139       -6     
+ Partials       43       40       -3
Flag Coverage Δ
#ds005 72.77% <25.92%> (-0.65%) ⬇️
#ds054 58.84% <55.55%> (-0.99%) ⬇️
Impacted Files Coverage Δ
smriprep/workflows/anatomical.py 77.14% <ø> (-0.33%) ⬇️
smriprep/interfaces/reports.py 77.21% <0%> (-4.12%) ⬇️
smriprep/workflows/outputs.py 70.87% <100%> (ø) ⬆️
smriprep/workflows/norm.py 100% <100%> (ø) ⬆️
smriprep/workflows/base.py 85.45% <100%> (ø) ⬆️
smriprep/cli/run.py 77.07% <100%> (+2.73%) ⬆️
smriprep/interfaces/templateflow.py 92.5% <100%> (+1.32%) ⬆️

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 cb708ac...082bfc5. Read the comment docs.

@oesteban
Copy link
Member

DS005 needs a cache wipeout bc it's picking up an old normalization reportlet (it should come out without normalization)

@mgxd
Copy link
Collaborator Author

mgxd commented Jan 29, 2020

need to do some testing on fmriprep side

@oesteban
Copy link
Member

You are referring to nipreps/fmriprep#1915, right?

Name of ANTs skull-stripping template (e.g., 'OASIS30ANTs') and
dictionary of template specifications.
subject_id : str
skull_strip_template : :py:class:`~niworkflows.utils.spaces.Space`
Copy link
Member

Choose a reason for hiding this comment

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

btw, intersphinx is working with niworkflows :)

@oesteban oesteban changed the title Rework: internal / output spaces ENH: Integrate new infrastructure in NiWorkflows to handle spatial references Jan 29, 2020
oesteban added a commit to oesteban/smriprep that referenced this pull request Jan 29, 2020
- Don't deploy to Pypi if ``build_docs`` fails (close nipreps#150)
- Do not cache reportlets folder (see nipreps#159 (comment))
@mgxd
Copy link
Collaborator Author

mgxd commented Jan 30, 2020

i think this is fine to merge in - let's try to hold off release until nipreps/fmriprep#1915 is resolved

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.

5 participants