Skip to content

options

Argument dataclass

Argument(name, argument, track=True)

Defines a command-line argument (positional).

This provides some extra functionality over defining command line argument explicitly, in addition to some extra parameters which sets how condor interprets how to handle them within the DAG and within submit descriptions.

Parameters:

Name Type Description Default
name str

The option name. Since this is a positional argument, it is not used explicitly in the command, but is needed to define variable names within jobs.

required
argument int | float | str | list

The positional argument value(s) used in a command.

required
track bool

Whether to track files defined here and used externally within jobs to determine parent-child relationships when nodes specify this option as an input or output. On by default.

True

Examples:

>>> Argument("command", "run").vars()
'run'
>>> files = ["input_1.txt", "input_2.txt"]
>>> Argument("input-files", files).vars()
'input_1.txt input_2.txt'

File dataclass

File(name, argument, track=True)

Defines a file for dependency tracking and transfer.

Unlike Argument or Option, a File is not included in the job's command-line arguments. It is used solely for tracking file I/O relationships between nodes and for HTCondor file transfer.

Parameters:

Name Type Description Default
name str

The name used for condor variable naming.

required
argument int | float | str | list

The file path(s).

required
track bool

Whether to track this file for parent-child relationships. On by default.

True

Examples:

>>> File("output", "result.txt").vars()
'result.txt'
>>> File("output", "/path/to/result.txt").remaps()
'result.txt=/path/to/result.txt'

Literal dataclass

Literal(argument, track=True)

Defines a command-line literal.

This provides some extra functionality over defining command line argument explicitly, in addition to some extra parameters which sets how condor interprets how to handle them within the DAG and within submit descriptions.

Parameters:

Name Type Description Default
argument int | float | str

The positional argument value(s) used in a command.

required
track bool

Whether to track files defined here and used externally within jobs to determine parent-child relationships when nodes specify this option as an input or output. On by default.

True

Examples:

>>> Literal("run").vars()
'run'
>>> Literal("/path/to/input_1.txt").remaps()
'input_1.txt=/path/to/input_1.txt'

Option dataclass

Option(name, argument=None, track=True, prefix='--')

Defines a command-line option (long form).

This provides some extra functionality over defining command line options explicitly, in addition to some extra parameters which sets how condor interprets how to handle them within the DAG and within submit descriptions.

Parameters:

Name Type Description Default
name str

The option name to be used in a command.

required
argument int | float | str | list | None

The argument value(s) used in a command.

None
track bool | None

Whether to track files defined here and used externally within jobs to determine parent-child relationships when nodes specify this option as an input or output. On by default.

True
prefix str

The option prefix to use, e.g. for --verbose, -- is the prefix. Uses -- by default.

'--'

Examples:

>>> Option("verbose").vars()
'--verbose'
>>> Option("input-type", "file").vars()
'--input-type file'
>>> Option("ifos", ["H1", "L1", "V1"]).vars()
'--ifos H1 --ifos L1 --ifos V1'