@@ -211,48 +211,55 @@ def convert():
211
211
help = "JSON file name where the Boutiques descriptor will be "
212
212
"written." )
213
213
@click .option (
214
- "-t" ,
215
- "--ignored-template-inputs" ,
214
+ "-c" ,
215
+ "--container-image" ,
216
+ required = True ,
216
217
type = str ,
217
- multiple = True ,
218
- help = "Interface inputs ignored in path template creations." )
218
+ help = "Name of the container image where the tool is installed." )
219
219
@click .option (
220
- "-d" ,
221
- "--docker-image" ,
220
+ "-p" ,
221
+ "--container-type" ,
222
+ required = True ,
222
223
type = str ,
223
- help = "Name of the Docker image where the Nipype interface is "
224
- "available." )
224
+ help = "Type of container image (Docker or Singularity)." )
225
225
@click .option (
226
- "-r " ,
227
- "--docker -index" ,
226
+ "-x " ,
227
+ "--container -index" ,
228
228
type = str ,
229
- help = "Docker index where the Docker image is stored (e.g. "
229
+ help = "Optional index where the image is available (e.g. "
230
230
"http://index.docker.io)." )
231
231
@click .option (
232
- "-n " ,
233
- "--ignore-template-numbers " ,
234
- is_flag = True ,
235
- flag_value = True ,
236
- help = "Ignore all numbers in path template creations ." )
232
+ "-g " ,
233
+ "--ignore-inputs " ,
234
+ type = str ,
235
+ multiple = True ,
236
+ help = "List of interface inputs to not include in the descriptor ." )
237
237
@click .option (
238
238
"-v" ,
239
239
"--verbose" ,
240
240
is_flag = True ,
241
241
flag_value = True ,
242
- help = "Enable verbose output." )
243
- def boutiques (interface , module , output , ignored_template_inputs , docker_image ,
244
- docker_index , ignore_template_numbers , verbose ):
242
+ help = "Print information messages." )
243
+ @click .option (
244
+ "-a" ,
245
+ "--author" ,
246
+ type = str ,
247
+ help = "Author of the tool (required for publishing)." )
248
+ @click .option (
249
+ "-t" ,
250
+ "--tags" ,
251
+ type = str ,
252
+ help = "JSON string containing tags to include in the descriptor,"
253
+ "e.g. \" {\" key1\" : \" value1\" }\" " )
254
+ def boutiques (module , interface , container_image , container_type , output ,
255
+ container_index , verbose , author , ignore_inputs , tags ):
245
256
"""Nipype to Boutiques exporter.
246
257
247
258
See Boutiques specification at https://github.com/boutiques/schema.
248
259
"""
249
260
from nipype .utils .nipype2boutiques import generate_boutiques_descriptor
250
261
251
- # Generates JSON string
252
- json_string = generate_boutiques_descriptor (
253
- module , interface , ignored_template_inputs , docker_image , docker_index ,
254
- verbose , ignore_template_numbers )
255
-
256
- # Writes JSON string to file
257
- with open (output , 'w' ) as f :
258
- f .write (json_string )
262
+ # Generates JSON string and saves it to file
263
+ generate_boutiques_descriptor (
264
+ module , interface , container_image , container_type , container_index ,
265
+ verbose , True , output , author , ignore_inputs , tags )
0 commit comments