Skip to content

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

Open
@sebitz

Description

@sebitz

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

Activity

changed the title [-]cwltool --tool-help fails if `doc` is a list[/-] [+]`cwltool --tool-help` fails if `doc` is a list[/+] on Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sebitz

        Issue actions

          `cwltool --tool-help` fails if `doc` is a list · Issue #2100 · common-workflow-language/cwltool