import argparse
from .command.cli_command_parser import CLIArgument
[docs]
class ConfigRoot:
PIPELINE = "pipeline"
PARAMETERS = "parameters"
GLOBAL_PARAMETERS = "global_parameters"
VERSION = "version"
PIPER_GLOBAL_PARAMS = {"_output_dir_", "_global_parameters_", "_qa_dir_"}
PIPER_UPSTREAM = "_upstream_output_"
CONFIG_CLI_ARGS = [
CLIArgument(
"--config-install-path",
dest="config_install_path",
type=str,
default="./",
help="""Directory path to store the default config.
Defaults to current working directory.""",
),
CLIArgument(
"--set",
dest="override_defaults",
action="append",
nargs=2,
metavar=("path", "value"),
help="Overrides for default config",
),
]
RUN_CLI_ARGS = [
CLIArgument(
"--config",
dest="config_path",
type=str,
help="Path to the pipeline configuration yaml file",
),
CLIArgument(
"--output",
dest="output_path",
type=str,
default="./output",
help="""Path to store pipeline outputs. Defaults to ./output.
This directory will be created by the pipeline if it doesn't
exist already.""",
),
CLIArgument(
"--unique-output-subdir",
dest="unique_output_subdir",
action=argparse.BooleanOptionalAction,
default=True,
help="""Flag to create timestamped output subdirectory.
Defaults to true, where a unique subdirectory is created inside the
output directory passed via --output option, and the outputs
are stored inside the subdirectory""",
),
CLIArgument(
"--stages",
dest="stages",
nargs="+",
help="Pipeline stages to be executed",
),
CLIArgument(
"--set",
dest="override_defaults",
action="append",
nargs=2,
metavar=("path", "value"),
help="Overrides for default config",
),
CLIArgument(
"--verbose",
"-v",
dest="verbose",
action="count",
default=0,
help="Increase pipeline verbosity to debug level.",
),
]