tfep.utils.cli.tool.CLIOption

class tfep.utils.cli.tool.CLIOption(option_name)[source]

Bases: ABC

Generic descriptor for command line option.

This must be inherited by all options for :class:.CLITool to automatically discover the option. To implement this, it is sufficient to provide an implementation of the to_subprocess() method, which takes the object instance as input and outputs a list with the strings to append to the command in subprocess format.

Parameters:

option_name (str) – The name of the option in the command line interface (e.g., '-o').

__init__(option_name)[source]

Methods

__init__(option_name)

to_subprocess(owner_instance)

Return the strings to append to the command in subprocess format.

abstract to_subprocess(owner_instance)[source]

Return the strings to append to the command in subprocess format.

For example, it might return something like ['-o', 'path_to_my_file.txt'].