Skip to content
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

cwltool --tool-help fails if doc is a list #2100

Open
sebitz opened this issue Feb 13, 2025 · 0 comments
Open

cwltool --tool-help fails if doc is a list #2100

sebitz opened this issue Feb 13, 2025 · 0 comments

Comments

@sebitz
Copy link

sebitz commented Feb 13, 2025

example_tool.cwl:

cwlVersion: v1.2
class: CommandLineTool

label: A short, human-readable label.
doc:
- A longer description of the tool or workflow.
- "Ideally with examples, for instance:"
- |
      cwltool --tool-help tool_help_doclist.cwl

inputs:
  message:
    default: hello world
    type: string

outputs:
  main_output: stdout

baseCommand: echo
arguments: [ $(inputs.message) ]

stdout: message.txt

Running cwltool --tool-help example_tool.cwl (both with version 3.1.20250110105449 and 3.1.20241217163858) prints the following error:

ERROR Unhandled error, try again with --debug for more information:
  Unable to get render width for ['A longer description of the tool.', 'Ideally with examples, e.g.:', 'cwltool --tool-help tool_help_doclist.cwl\n']; a str, Segment, or object with __rich_console__ method is required

Expected output:

usage: example_tool.cwl [-h] [--message MESSAGE] [job_order]

A longer description of the tool or workflow. Ideally with examples,
for instance: cwltool --tool-help example_tool.cwl

positional arguments:
  job_order          Job input json file

options:
  -h, --help         show this help message and exit
  --message MESSAGE

Or, (maybe) even better:

usage: example_tool.cwl [-h] [--message MESSAGE] [job_order]

A short, human-readable label.

A longer description of the tool or workflow. Ideally with examples,
for instance:

  cwltool --tool-help example_tool.cwl


positional arguments:
  job_order          Job input json file

options:
  -h, --help         show this help message and exit
  --message MESSAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant