Skip to content

[WIP] ENH: Add support for building interfaces from Boutiques specs #2704

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

Closed
wants to merge 12 commits into from

Conversation

effigies
Copy link
Member

@effigies effigies commented Sep 18, 2018

Summary

Initial support for dynamically constructing Nipype interfaces from Boutiques specifications

List of changes proposed in this PR (pull-request)

  • Create BoutiquesInterface class with dynamic input/output specs
  • Populate the input spec based on the "inputs" section of a passed spec
  • Populate the output spec based on the "output-files" section of a passed spec
  • Test submission in MultiProc, to ensure proper serialization/deserialization
  • Add basic AFNI test (considering adwarp as it is relatively complete)
  • Add script, or small set of scripts, with specs that exercise all features of the schema

cc @gkiar @leej3

Acknowledgment

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

@effigies effigies added this to the future milestone Sep 18, 2018
@effigies
Copy link
Member Author

I'm somewhat inclined to target Nipype 2.0 for this, but I don't know that there's anything that will be made particularly easier by dropping Python 2 support.

@satra
Copy link
Member

satra commented Sep 18, 2018

thanks @effigies - targeting 2.0 is fine with me. this will be a good sprint item to finalize, together with CWL support.

@effigies
Copy link
Member Author

Just as a note, most of the reason for creating the trait_map class variable was so that an AFNIBoutiqueInterface could adapt File to handle AFNI's command line specs.

@effigies effigies changed the base branch from master to dev/2.0 September 18, 2018 02:33
@effigies effigies force-pushed the enh/boutique_interface branch from 6d5c0c0 to c181c93 Compare September 18, 2018 02:35
@effigies effigies modified the milestones: future, Nipype 2.0 Sep 18, 2018
@gkiar
Copy link

gkiar commented Sep 18, 2018

cc: @glatard

rmarkello and others added 6 commits October 9, 2018 15:26
Adds support for dynamic parsing of boutiques output-files spec.

Unfortunately, boutiques does not support specification of which input
options will lead to the generation of specific output files, so _all_
output files are being specified. This will likely lead to some problems
down the road, and might be worth suggesting to the boutiques team as a
future enhancement of their schema.
Rather than assigning to self.inputs or self.outputs, BoutiqueInterface
will actually generate subclasses of DynamicTraitedSpec (so that things
like .help() might eventually work).
Generating an instance of BoutiqueInterface now allows for .help() to
generate pretty help text using standard nipype machinery.
Better file handling (existence checking, output aggregating) for
BoutiqueInterface
Adds example to BoutiqueInterface and makes some minor updates to input
spec handling.
ENH: Parse Boutiques output structure
@codecov-io
Copy link

codecov-io commented Oct 10, 2018

Codecov Report

Merging #2704 into dev/2.0 will decrease coverage by 0.82%.
The diff coverage is 67.12%.

Impacted file tree graph

@@             Coverage Diff             @@
##           dev/2.0    #2704      +/-   ##
===========================================
- Coverage    64.41%   63.59%   -0.83%     
===========================================
  Files          338      336       -2     
  Lines        42879    42851      -28     
  Branches      5363     5391      +28     
===========================================
- Hits         27620    27249     -371     
- Misses       14218    14514     +296     
- Partials      1041     1088      +47
Flag Coverage Δ
#unittests 63.59% <67.12%> (-0.83%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/base/__init__.py 100% <100%> (ø) ⬆️
nipype/interfaces/base/boutiques.py 66.97% <66.97%> (ø)
nipype/interfaces/nilearn.py 38.98% <0%> (-57.63%) ⬇️
nipype/utils/spm_docs.py 20% <0%> (-48%) ⬇️
nipype/interfaces/freesurfer/base.py 48.76% <0%> (-28.83%) ⬇️
nipype/utils/logger.py 58.46% <0%> (-27.7%) ⬇️
nipype/testing/fixtures.py 76.38% <0%> (-22.23%) ⬇️
nipype/interfaces/matlab.py 63.91% <0%> (-12.38%) ⬇️
nipype/workflows/fmri/spm/preprocess.py 60.2% <0%> (-10.21%) ⬇️
nipype/interfaces/spm/base.py 58.13% <0%> (-9.31%) ⬇️
... and 56 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 e057971...351b78c. Read the comment docs.

@effigies effigies closed this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants