# cwltool.argparser

Command line argument parsing for cwltool.

## Classes

`FSAction` | Base action for our custom actions.
`FSAppendAction` | Appending version of the base action for our custom actions.
`FileAction` | Base action for our custom actions.
`DirectoryAction` | Base action for our custom actions.
`FileAppendAction` | Appending version of the base action for our custom actions.
`DirectoryAppendAction` | Appending version of the base action for our custom actions.
`AppendAction` | An argparse action that clears the default values if any value is provided.

## Functions

`arg_parser`() |
`get_default_args`() | Get default values of cwltool's command line options.
`add_argument`(toolparser, name, inptype, records[, ...]) |
`generate_parser`(toolparser, tool, namemap, records[, ...]) | Generate an ArgumentParser for the given CWL Process.

## Module Contents

cwltool.argparser.arg_parser()
  Return type:

    argparse.ArgumentParser

cwltool.argparser.get_default_args()

  Get default values of cwltool’s command line options.

  Return type:

    dict[str, Any]

class cwltool.argparser.FSAction(option_strings, dest, nargs=None, urljoin=urllib.parse.urljoin, base_uri='', **kwargs)

  Bases: `argparse.Action`

  Base action for our custom actions.

  Parameters:

    - option_strings (list[str])

    - dest (str)

    - nargs (Any)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

    - kwargs (Any)

  objclass: str | None = None
  urljoin
  base_uri = ''
  __call__(parser, namespace, values, option_string=None)
    Parameters:

      - parser (argparse.ArgumentParser)

      - namespace (argparse.Namespace)

      - values (str | collections.abc.Sequence[Any] | None)

      - option_string (str | None)

    Return type:

      None

class cwltool.argparser.FSAppendAction(option_strings, dest, nargs=None, urljoin=urllib.parse.urljoin, base_uri='', **kwargs)

  Bases: `argparse.Action`

  Appending version of the base action for our custom actions.

  Parameters:

    - option_strings (list[str])

    - dest (str)

    - nargs (Any)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

    - kwargs (Any)

  objclass: str | None = None
  urljoin
  base_uri = ''
  __call__(parser, namespace, values, option_string=None)
    Parameters:

      - parser (argparse.ArgumentParser)

      - namespace (argparse.Namespace)

      - values (str | collections.abc.Sequence[Any] | None)

      - option_string (str | None)

    Return type:

      None

class cwltool.argparser.FileAction(option_strings, dest, nargs=None, urljoin=urllib.parse.urljoin, base_uri='', **kwargs)

  Bases: `FSAction`

  Base action for our custom actions.

  Parameters:

    - option_strings (list[str])

    - dest (str)

    - nargs (Any)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

    - kwargs (Any)

  objclass: str | None = 'File'

class cwltool.argparser.DirectoryAction(option_strings, dest, nargs=None, urljoin=urllib.parse.urljoin, base_uri='', **kwargs)

  Bases: `FSAction`

  Base action for our custom actions.

  Parameters:

    - option_strings (list[str])

    - dest (str)

    - nargs (Any)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

    - kwargs (Any)

  objclass: str | None = 'Directory'

class cwltool.argparser.FileAppendAction(option_strings, dest, nargs=None, urljoin=urllib.parse.urljoin, base_uri='', **kwargs)

  Bases: `FSAppendAction`

  Appending version of the base action for our custom actions.

  Parameters:

    - option_strings (list[str])

    - dest (str)

    - nargs (Any)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

    - kwargs (Any)

  objclass: str | None = 'File'

class cwltool.argparser.DirectoryAppendAction(option_strings, dest, nargs=None, urljoin=urllib.parse.urljoin, base_uri='', **kwargs)

  Bases: `FSAppendAction`

  Appending version of the base action for our custom actions.

  Parameters:

    - option_strings (list[str])

    - dest (str)

    - nargs (Any)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

    - kwargs (Any)

  objclass: str | None = 'Directory'

class cwltool.argparser.AppendAction(option_strings, dest, nargs=None, **kwargs)

  Bases: `argparse.Action`

  An argparse action that clears the default values if any value is provided.

  Parameters:

    - option_strings (list[str])

    - dest (str)

    - nargs (Any)

    - kwargs (Any)

  __call__(parser, namespace, values, option_string=None)
    Parameters:

      - parser (argparse.ArgumentParser)

      - namespace (argparse.Namespace)

      - values (str | collections.abc.Sequence[Any] | None)

      - option_string (str | None)

    Return type:

      None

cwltool.argparser.add_argument(toolparser, name, inptype, records, description='', default=None, input_required=True, urljoin=urllib.parse.urljoin, base_uri='')
  Parameters:

    - toolparser (argparse.ArgumentParser)

    - name (str)

    - inptype (Any)

    - records (list[str])

    - description (str)

    - default (Any)

    - input_required (bool)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

  Return type:

    None

cwltool.argparser.generate_parser(toolparser, tool, namemap, records, input_required=True, urljoin=urllib.parse.urljoin, base_uri='')

  Generate an ArgumentParser for the given CWL Process.

  Parameters:

    - toolparser (argparse.ArgumentParser)

    - tool (cwltool.process.Process)

    - namemap (dict[str, str])

    - records (list[str])

    - input_required (bool)

    - urljoin (collections.abc.Callable[[str, str], str])

    - base_uri (str)

  Return type:

    argparse.ArgumentParser