Skip to content

MRG: allow more support for cli #1908

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 4 commits into from
Apr 30, 2017
Merged

MRG: allow more support for cli #1908

merged 4 commits into from
Apr 30, 2017

Conversation

satra
Copy link
Member

@satra satra commented Mar 25, 2017

@codecov-io
Copy link

codecov-io commented Mar 26, 2017

Codecov Report

Merging #1908 into master will increase coverage by 1.76%.
The diff coverage is 8.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1908      +/-   ##
==========================================
+ Coverage   70.45%   72.21%   +1.76%     
==========================================
  Files        1086     1088       +2     
  Lines       55291    55527     +236     
  Branches     7994     8009      +15     
==========================================
+ Hits        38956    40100    +1144     
+ Misses      14927    14161     -766     
+ Partials     1408     1266     -142
Flag Coverage Δ
#smoketests 72.21% <8.1%> (+1.76%) ⬆️
#unittests 69.81% <8.1%> (-0.03%) ⬇️
Impacted Files Coverage Δ
nipype/utils/nipype_cmd.py 76.66% <0%> (+10%) ⬆️
nipype/scripts/utils.py 25.92% <8.33%> (-13.66%) ⬇️
nipype/algorithms/misc.py 42.83% <0%> (-1.39%) ⬇️
nipype/algorithms/confounds.py 74.65% <0%> (ø) ⬆️
nipype/workflows/smri/niftyreg/groupwise.py 8% <0%> (ø) ⬆️
examples/test_spm.py
examples/fmri_fsl_reuse.py 75.67% <0%> (ø)
examples/fmri_fsl_feeds.py 96.61% <0%> (ø)
examples/fmri_spm_dartel.py 85.18% <0%> (ø)
nipype/interfaces/freesurfer/preprocess.py 65.28% <0%> (+0.2%) ⬆️
... and 24 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 f66a5a6...901cf05. Read the comment docs.

@satra satra changed the title WIP: allow more support for cli MRG: allow more support for cli Apr 24, 2017
@satra
Copy link
Member Author

satra commented Apr 24, 2017

@chrisfilo - a review here would be helpful - currently many of the cli break because we don't have full support. this is an attempt to improve that a bit.

Copy link
Contributor

@oesteban oesteban left a comment

Choose a reason for hiding this comment

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

Looks good to me. Some possible improvements attached.

trait_type = type(spec.inner_traits[0].trait_type.default_value)
if trait_type in (bool, str, int, float):
args["type"] = trait_type

if hasattr(spec, "mandatory") and spec.mandatory:
Copy link
Contributor

Choose a reason for hiding this comment

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

if getattr(spec, "mandatory", False):

trait_type = type(spec.trait_type.default_value)
if trait_type in (str, int, float):
args["type"] = trait_type
elif len(spec.inner_traits) == 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

What if len(spec.inner_traits) > 1? is that a possible case?. If so, we should raise an error

# current support is for simple trait types
if not spec.inner_traits:
trait_type = type(spec.trait_type.default_value)
if trait_type in (str, int, float):
Copy link
Contributor

Choose a reason for hiding this comment

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

For compatibility, we should add an from builtins import str, bytes. Also, add bytes to this check.

Finally, change the type if trait_type is bytes to be str

args["type"] = trait_type
elif len(spec.inner_traits) == 1:
trait_type = type(spec.inner_traits[0].trait_type.default_value)
if trait_type in (bool, str, int, float):
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as before with bytes

satra added 3 commits April 29, 2017 10:41
* master: (131 commits)
  Update ISSUE_TEMPLATE.md
  fix: more py36 fixes and doc updates
  [skip ci] Update CHANGES
  [ENH] Add interface to antsAffineInitializer
  add g++ to docker base file
  fix: streamlines less than 100
  fix: sidestep Undefined issue
  setting self.numthreads to omp_core_val if set
  fix: deprecation cycle and basic testing
  fix: typo
  FIX: Typo in private method name
  doc: clean up option presentation
  enh: clean up documentation
  fix: update tests and integration tests to py36
  fix: installation options and test on py36
  fix: fixed failing tests
  fix: remove mask_file check
  enh: multiple masks and options to compcor
  docstrings fix
  code readability improvements
  ...
* upstream/master:
  fix errors in niftyreg workflows docstrings
  fixing the confounds doc build
  disable dummy test, close nipy#1933
  force exit if any test failed
  [skip ci] Update CHANGES
  [FIX] Ensure build fails in Circle when tests fail
  Fixed description.
  fixing arg strings
  fixing expected output string
  naming fixes
  Added documentation and doctests.
  add qwarp
@satra satra merged commit d82a18f into nipy:master Apr 30, 2017
@satra satra deleted the fix/clirun branch October 30, 2017 15:16
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