8
8
UNKNOWN_OPTIONS ,
9
9
ExistingDirPath ,
10
10
ExistingFilePath ,
11
+ UnexistingFilePath ,
11
12
RegularExpression ,
12
13
PythonModule ,
13
14
grouper )
@@ -142,25 +143,18 @@ def run(ctx, module, interface, list, help):
142
143
run_instance (node , args )
143
144
144
145
145
- # @cli.command(context_settings=UNKNOWN_OPTIONS)
146
- # @click.option('-f', '--format', type=click.Choice(['boutiques']),
147
- # help='Output format type.')
148
- # @click.argument('format_args', nargs=-1, type=click.UNPROCESSED)
149
- # @click.pass_context
150
- # def convert(ctx, format, format_args):
151
- # """Export nipype interfaces to other formats."""
152
- # if format == 'boutiques':
153
- # ctx.params.pop('format')
154
- # ctx.params = dict(grouper(ctx.params['format_args'], 2))
155
- # ctx.forward(to_boutiques)
146
+ @cli .group ()
147
+ def convert ():
148
+ """Export nipype interfaces to other formats."""
149
+ pass
156
150
157
151
158
- @cli .command (context_settings = CONTEXT_SETTINGS )
152
+ @convert .command (context_settings = CONTEXT_SETTINGS )
159
153
@click .option ("-i" , "--interface" , type = str , required = True ,
160
154
help = "Name of the Nipype interface to export." )
161
155
@click .option ("-m" , "--module" , type = PythonModule (), required = True ,
162
156
help = "Module where the interface is defined." )
163
- @click .option ("-o" , "--output" , type = str , required = True ,
157
+ @click .option ("-o" , "--output" , type = UnexistingFilePath , required = True ,
164
158
help = "JSON file name where the Boutiques descriptor will be written." )
165
159
@click .option ("-t" , "--ignored-template-inputs" , type = str , multiple = True ,
166
160
help = "Interface inputs ignored in path template creations." )
@@ -172,10 +166,10 @@ def run(ctx, module, interface, list, help):
172
166
help = "Ignore all numbers in path template creations." )
173
167
@click .option ("-v" , "--verbose" , is_flag = True , flag_value = True ,
174
168
help = "Enable verbose output." )
175
- def to_boutiques (interface , module , output , ignored_template_inputs ,
176
- docker_image , docker_index , ignore_template_numbers ,
177
- verbose ):
178
- """Nipype Boutiques exporter.
169
+ def boutiques (interface , module , output , ignored_template_inputs ,
170
+ docker_image , docker_index , ignore_template_numbers ,
171
+ verbose ):
172
+ """Nipype to Boutiques exporter.
179
173
180
174
See Boutiques specification at https://github.com/boutiques/schema.
181
175
"""
0 commit comments