quickie.tasks.Command
- class quickie.tasks.Command(*args, binary: str | None = None, cmd_args: Sequence[str] | None = None, **kwargs)
Base class for tasks that run a binary.
- __init__(*args, binary: str | None = None, cmd_args: Sequence[str] | None = None, **kwargs)
Initialize the task.
- Parameters:
args – Task instance arguments.
kwargs – Task instance keyword arguments.
Methods
__init__(*args[, binary, cmd_args])Initialize the task.
add_args(parser)Add arguments to the parser.
condition_passes(*args, **kwargs)Check the condition before running the task.
full_run(*args, **kwargs)Call the task, including before, after, and cleanup tasks.
get_after(*args, **kwargs)Get the tasks to run after this task.
get_before(*args, **kwargs)Get the tasks to run before this task.
get_binary(*args, **kwargs)Get the name or path of the program to run.
get_cleanup(*args, **kwargs)Get the tasks to run after this task, even if it fails.
get_cmd(*args, **kwargs)Get the full command to run, as a sequence.
get_cmd_args(*args, **kwargs)Get the program arguments.
get_env(*args, **kwargs)Get the environment.
get_help()Get the help message of the task.
get_parser(*[, name])Get the parser for the task.
get_short_help()Get the short help message of the task.
get_wd(*args, **kwargs)Get the working directory.
log_task_execution(*args, **kwargs)Log information about the task execution.
log_task_execution_details(program, args)Log details about the task execution.
parse_and_run(args)Parse arguments and run the task.
parse_args(*, parser, args, extra_args)Parse arguments.
run(*args, **kwargs)Runs work related to the task, excluding before, after, and cleanup tasks.
run_after(*args, **kwargs)Run the tasks after this task.
run_before(*args, **kwargs)Run the tasks before this task.
run_cleanup(*args, **kwargs)Run the tasks after this task, even if it fails.
split_cmd_args(args)Split the arguments string into a list of arguments.
Attributes
afterTasks to run after this task.
argsArguments for the task.
beforeTasks to run before this task.
binaryThe name or path of the program to run.
cleanupTasks to run at the end, even if the task, or before or after tasks fail.
cmd_argsThe program arguments.
conditionThe condition to check before running the task.
envThe environment.
extra_argsWhether to allow extra command line arguments.
parserParser for the task.
wdThe current working directory.