quickie.tasks.Script
- class quickie.tasks.Script(*args, script: str | None = None, executable: str | None = None, **kwargs)
Base class for tasks that run a script.
- __init__(*args, script: str | None = None, executable: str | None = None, **kwargs)
Initialize the task.
- Parameters:
args – Task instance arguments.
script – The script to run.
executable – The executable to use to run the script.
kwargs – Task instance keyword arguments.
Methods
__init__(*args[, script, executable])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_cleanup(*args, **kwargs)Get the tasks to run after this task, even if it fails.
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_script(*args, **kwargs)Get the script to run.
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(script)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.
Attributes
afterTasks to run after this task.
argsArguments for the task.
beforeTasks to run before this task.
cleanupTasks to run at the end, even if the task, or before or after tasks fail.
conditionThe condition to check before running the task.
envThe environment.
executableextra_argsWhether to allow extra command line arguments.
parserParser for the task.
scriptwdThe current working directory.