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

[FIX] workflow help msg #1677

Merged
merged 10 commits into from Dec 3, 2018

Conversation

Projects
None yet
3 participants
@skoudoro
Copy link
Member

skoudoro commented Nov 30, 2018

The goal of this PR is to fix #1674. Now, you get:

(dipy_dev_3) 149-160-137-169:dipy koudoro$   ~/.local/bin/dipy_mask
usage: dipy_mask [-h] [--ub float] [--out_dir str] [--out_mask str] [--force]
                 [--version] [--out_strat string] [--mix_names]
                 [--log_level string] [--log_file string]
                 input_files lb
dipy_mask: error: the following arguments are required: input_files, lb
(dipy_dev_3) 149-160-137-169:dipy koudoro$

I use the opportunity to:

  • remove our argparse module copy. It was there for the backward compatibility with Python 2.6 so not needed anymore
  • Standardize a bit more workflows input/output
  • Check and update Workflows docstring
@arokem

This comment has been minimized.

Copy link
Member

arokem commented Dec 1, 2018

This is the best thing I've seen all day:

screen shot 2018-11-30 at 4 04 22 pm

@arokem
Copy link
Member

arokem left a comment

Is this still WIP? There's a lot of changes here. What's the crucial change that makes this produce the help message instead of the error?

@@ -153,7 +155,7 @@ def add_workflow(self, workflow):
_kwargs['type'] = str

if isnarg:
_kwargs['nargs'] = '*'
_kwargs['nargs'] = '*' if is_optionnal else '+'

This comment has been minimized.

@arokem

arokem Dec 1, 2018

Member

Could you please change is_optionnal to is_optional while you're at it?

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Dec 1, 2018

Codecov Report

❗️ No coverage uploaded for pull request base (master@6e2b002). Click here to learn what that means.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1677   +/-   ##
=========================================
  Coverage          ?   90.58%           
=========================================
  Files             ?      232           
  Lines             ?    28162           
  Branches          ?     2981           
=========================================
  Hits              ?    25511           
  Misses            ?     2039           
  Partials          ?      612
Impacted Files Coverage Δ
dipy/workflows/tests/test_reconst_csa_csd.py 95.23% <ø> (ø)
dipy/workflows/mask.py 95% <ø> (ø)
dipy/workflows/segment.py 72.44% <ø> (ø)
dipy/workflows/reconst.py 82.1% <100%> (ø)
dipy/workflows/tests/test_reconst_mapmri.py 92.64% <100%> (ø)
dipy/workflows/workflow.py 88.63% <100%> (ø)
dipy/workflows/flow_runner.py 97.56% <100%> (ø)
dipy/workflows/base.py 78.41% <85.71%> (ø)

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 6e2b002...033f861. Read the comment docs.

@skoudoro

This comment has been minimized.

Copy link
Member

skoudoro commented Dec 1, 2018

This is the best thing I've seen all day:

ahahah 😄

Is this still WIP?

Finally no, I wanted to fix another issue on the same PR. Finally, I should just create a new PR.

What's the crucial change that makes this produce the help message instead of the error?

here is the crucial change. we were using an old version of argparse to keep the compatibility with python 2.6. We do not need this anymore and Python dev improved the default behavior of argparse module. You can see here the doc

The other changes are just code cleaning.

@arokem

This comment has been minimized.

Copy link
Member

arokem commented Dec 1, 2018

Cool. This all looks good to me. If you just make a quick change to fix that typo (optionnal) then I will merge this tomorrow night, unless someone else wants to chime in.

@arokem

This comment has been minimized.

Copy link
Member

arokem commented on doc/examples/streamline_formats.py in 82a5cf6 Dec 1, 2018

"you" => "your"

@arokem arokem merged commit 96d0e73 into nipy:master Dec 3, 2018

4 checks passed

codecov/patch No report found to compare against
Details
codecov/project No report found to compare against
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@arokem

This comment has been minimized.

Copy link
Member

arokem commented Dec 3, 2018

Thanks!

@skoudoro skoudoro deleted the skoudoro:issue-1674-workflow-help-msg branch Dec 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment