@@ -13,6 +13,7 @@ This guide covers common issues when creating or modifying Boutiques descriptors
1313** Problem** : ` ERROR: 'name' is a required property `
1414
1515** Solution** : Ensure all required top-level fields are present:
16+
1617``` json
1718{
1819 "name" : " tool_name" ,
@@ -29,6 +30,7 @@ This guide covers common issues when creating or modifying Boutiques descriptors
2930** Problem** : ` ERROR: 'string' is not of type 'number' `
3031
3132** Solution** : Check that values match their declared types. For numeric parameters:
33+
3234``` json
3335{
3436 "id" : " threshold" ,
@@ -42,6 +44,7 @@ This guide covers common issues when creating or modifying Boutiques descriptors
4244** Problem** : ` ERROR: 'input-file' does not match pattern '^[0-9,_,a-z,A-Z]*$' `
4345
4446** Solution** : IDs must contain only alphanumeric characters and underscores:
47+
4548``` json
4649{
4750 "id" : " input_file" , // Not "input-file"
@@ -55,8 +58,10 @@ This guide covers common issues when creating or modifying Boutiques descriptors
5558
5659** Problem** : Value-key placeholders aren't replaced in the command line.
5760
58- ** Solution** :
61+ ** Solution** :
62+
59631 . Ensure the value-key in the parameter matches exactly what's in the command-line:
64+
6065 ``` json
6166 "command-line" : " tool [INPUT_FILE]" ,
6267 "inputs" : [
@@ -74,6 +79,7 @@ This guide covers common issues when creating or modifying Boutiques descriptors
7479** Problem** : Command-line flags aren't included in the generated command.
7580
7681** Solution** : Make sure you're using the correct fields:
82+
7783``` json
7884{
7985 "id" : " verbose" ,
@@ -87,6 +93,7 @@ This guide covers common issues when creating or modifying Boutiques descriptors
8793** Problem** : List values aren't formatted as expected in the command.
8894
8995** Solution** : Use the ` list-separator ` field to control how values are joined:
96+
9097``` json
9198{
9299 "id" : " coordinates" ,
@@ -104,6 +111,7 @@ This guide covers common issues when creating or modifying Boutiques descriptors
104111** Problem** : Parameters inside subcommands aren't accessible in the generated bindings.
105112
106113** Solution** : Check your subcommand structure:
114+
107115``` json
108116{
109117 "id" : " algorithm" ,
@@ -126,6 +134,7 @@ This guide covers common issues when creating or modifying Boutiques descriptors
126134** Problem** : The descriptor doesn't enforce mutually exclusive options.
127135
128136** Solution** : Instead of using ` groups ` with ` mutually-exclusive ` , use subcommands:
137+
129138``` json
130139{
131140 "id" : " mode" ,
@@ -144,7 +153,8 @@ This creates a proper union type in the generated bindings.
144153
145154** Problem** : Input files are reported as not found even though they exist.
146155
147- ** Solution** :
156+ ** Solution** :
157+
1481581 . Make sure you're using ` "type": "File" ` for input files
1491592 . Check if paths are relative to the current working directory
1501603 . For containerized runs, verify file paths are accessible in the container
@@ -154,6 +164,7 @@ This creates a proper union type in the generated bindings.
154164** Problem** : Output files appear in unexpected locations.
155165
156166** Solution** : Check your ` path-template ` in output-files:
167+
157168``` json
158169"output-files" : [
159170 {
@@ -170,6 +181,7 @@ Ensure all value-keys (`[OUTPUT_DIR]`, `[PREFIX]`) are defined in your inputs.
170181** Problem** : Output files have double extensions like ` file.nii.gz.nii.gz ` .
171182
172183** Solution** : Use ` path-template-stripped-extensions ` :
184+
173185``` json
174186"output-files" : [
175187 {
@@ -186,9 +198,11 @@ Ensure all value-keys (`[OUTPUT_DIR]`, `[PREFIX]`) are defined in your inputs.
186198
187199** Problem** : The container image cannot be pulled or found.
188200
189- ** Solution** :
201+ ** Solution** :
202+
1902031 . Verify the container exists in the specified registry
1912042 . Ensure the image name and tag are correct:
205+
192206 ``` json
193207 "container-image" : {
194208 "type" : " docker" ,
@@ -201,6 +215,7 @@ Ensure all value-keys (`[OUTPUT_DIR]`, `[PREFIX]`) are defined in your inputs.
201215** Problem** : The tool reports missing dependencies inside the container.
202216
203217** Solution** : Use a container that includes all required dependencies. You may need to build a custom container with a Dockerfile:
218+
204219``` dockerfile
205220FROM base/image:tag
206221RUN apt-get update && apt-get install -y additional-dependency
@@ -212,10 +227,12 @@ RUN apt-get update && apt-get install -y additional-dependency
212227
213228** Problem** : Confusion between value-keys and command-line-flags.
214229
215- ** Solution** :
230+ ** Solution** :
231+
216232- ` value-key ` is a placeholder in the command-line template
217233- ` command-line-flag ` is the actual flag used in the command (e.g., ` -v ` , ` --verbose ` )
218234- Both are often needed:
235+
219236 ``` json
220237 {
221238 "id" : " threshold" ,
@@ -229,15 +246,17 @@ RUN apt-get update && apt-get install -y additional-dependency
229246** Problem** : Confusion about how to define input and output files.
230247
231248** Solution** :
249+
232250- Input files use ` "type": "File" ` in the inputs section
233251- Output files are defined in the ` output-files ` section with a ` path-template `
234- - For parameters that specify output paths, use ` "type": "String" ` (not "File")
252+ - For parameters that specify output paths, use ` "type": "String" ` (not ` "File" ` )
235253
236254### Inconsistent Naming
237255
238256** Problem** : Similar parameters have inconsistent naming across descriptors.
239257
240258** Solution** : Follow consistent naming conventions:
259+
241260``` json
242261// Good:
243262"id" : " input_file"
@@ -255,6 +274,7 @@ RUN apt-get update && apt-get install -y additional-dependency
255274### Validating Descriptors
256275
257276Always validate your descriptors before using them:
277+
258278``` bash
259279# Using NiWrap validation
260280python -m pytest tests/test_descriptors.py::test_descriptor_validity
@@ -266,6 +286,7 @@ python -m pytest tests/test_descriptors.py::test_descriptor_validity
266286### Printing Command Line
267287
268288When testing, print the full command line to see if it's formed correctly:
289+
269290``` python
270291# Python
271292from niwrap.tool import function
@@ -276,6 +297,7 @@ print(cmd)
276297### Using Verbose Mode
277298
278299Many tools have verbose or debug modes that can help identify issues:
300+
279301``` json
280302{
281303 "id" : " verbose" ,
@@ -292,4 +314,4 @@ If you're still having issues:
292314
2933151 . Check existing descriptors in the NiWrap repository for examples
2943162 . Examine the [ Boutiques documentation] ( https://boutiques.github.io/doc/ )
295- 3 . Open an issue in the [ NiWrap issue tracker] ( https://github.com/styx-api/niwrap/issues )
317+ 3 . Open an issue in the [ NiWrap issue tracker] ( https://github.com/styx-api/niwrap/issues )
0 commit comments