plpipes.runner#
Module: plpipes.runner
The purpose of the runner is to offer a unified entry point for the project actions and pipelines. It extracts information from a set of environment variables and parses command line arguments in a standard way.
For more information, refer to Runner.
arg_parser(**kwargs)
#
Initializes the argument parser for the runner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kwargs
|
Additional keyword arguments for customizing the parser. |
{}
|
Returns:
| Type | Description |
|---|---|
|
An instance of argparse.ArgumentParser configured for the runner. |
Source code in src\plpipes\runner.py
main(args=None)
#
Main entry point for the runner. Parses arguments and executes specified actions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
The command line arguments to parse (defaults to None). |
None
|
Source code in src\plpipes\runner.py
parse_args_and_init(arg_parser, args=None)
#
Parses command line arguments and initializes the PLPipes framework.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arg_parser
|
The argument parser instance to use for parsing. |
required | |
args
|
The command line arguments to parse (defaults to sys.argv). |
None
|
Returns:
| Type | Description |
|---|---|
|
The parsed options as an object with attributes corresponding to the arguments. |
Raises:
| Type | Description |
|---|---|
Exception
|
If the program name is missing from the argument list. |
Source code in src\plpipes\runner.py
simple_init(args=None)
#
A simplified initialization function that uses a default argument parser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
The command line arguments to parse (defaults to None). |
None
|
Returns:
| Type | Description |
|---|---|
|
The parsed options as an object with attributes corresponding to the arguments. |