-
Notifications
You must be signed in to change notification settings - Fork 532
WIP: Move nipype commands to a group command #1608
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
Conversation
I still can't figure out if there is any clean way of using Click for the --format option in the convert command. For now I added a to_boutiques command. |
1 similar comment
The only option I can see is to have a simple |
@alexsavio - this section (http://click.pocoo.org/5/quickstart/#nesting-commands) and the next suggests how to include subcommands and options. so perhaps two sets of groups (one for main nipype_cli - e.g., show, convert) and one for format type (boutique, cwl, etc.,.) under convert with their own options would work. so something along the lines of this example (without the chaining): |
Thanks @satra. Now it looks like |
Current coverage is 70.82% (diff: 29.91%)@@ master #1608 diff @@
==========================================
Files 995 1032 +37
Lines 48658 51798 +3140
Methods 0 0
Messages 0 0
Branches 7317 7341 +24
==========================================
+ Hits 33965 36685 +2720
- Misses 13271 14024 +753
+ Partials 1422 1089 -333
|
Hi, |
@alexsavio - could we merge with current master and make sure the tests pass for this. |
yes, please. On Sat, 1 Oct 2016, 22:29 Satrajit Ghosh, notifications@github.com wrote:
Sent from my phone, sorry for brevity or typos. |
This is a great addition!. Please, merge #1627 first... :) |
@alexsavio - could you please merge with current master and resolve the conflicts. |
Ok, sorry. I didn't get your previous message. Merged master. |
@@ -8,6 +8,7 @@ nose>=1.2 | |||
future==0.15.2 | |||
simplejson>=3.8.0 | |||
prov>=1.4.0 | |||
click>=6.6.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, add 'click'
in nipype/info.py
, in the REQUIRES
list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
value = str2bool(value) | ||
except: | ||
pass | ||
print("setting function inputs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use logging instead of prints?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied this from the previous existing functions. Would you like me to use logging instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for the old nipype_cmd it makes sense. Probably it doesn't for nipype_display_crash and others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is previous code, I think I can do this in another PR.
ignore_template_numbers) | ||
|
||
# Writes JSON string to file | ||
with open(output, 'w') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add from io import open
at the top (py2/3 compatibility)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* upstream/master: undo matplotlib change. move badge to codecov disable matplotlib extension to test doc building. merge upstream master fix: retroicor - cleaned up interface, vim presets
Nipypeclick
Thanks @satra |
fix interface doc builder skip patterns
doc+fix: do not generate api from scripts directory
doc: update cli related docs
This is a continuation of #1596.
I am using
click
to create a group command, instead of adding all commands as separate scripts in thebin
folder.