def workspace_manage_experiments_setup_parser()

in lib/ramble/ramble/cmd/workspace.py [0:0]


def workspace_manage_experiments_setup_parser(subparser):
    """manage experiment definitions"""
    arguments.add_common_arguments(subparser, ["application"])

    subparser.add_argument(
        "--workload-filter",
        "--wf",
        dest="workload_filters",
        action="append",
        help="glob filter to use when selecting workloads in the application. "
        + "Workload is kept if it matches any filter.",
    )

    subparser.add_argument(
        "--variable-filter",
        "--vf",
        dest="variable_filters",
        action="append",
        help="glob filter to use when selecting variables in the workloads. "
        + "Variable is kept if it matches any filter.",
    )

    subparser.add_argument(
        "--variable-definition",
        "-v",
        dest="variable_definitions",
        action="append",
        help="variable definition to set in the generated experiments. "
        + "Given in the form key=value",
    )

    subparser.add_argument(
        "--experiment-name",
        "-e",
        dest="experiment_name",
        default="generated",
        help="name of generated experiment",
    )

    subparser.add_argument(
        "--package-manager",
        "-p",
        dest="package_manager",
        default=None,
        help="name of (optional) package manager to use within the experiment scope",
    )

    subparser.add_argument(
        "--workflow-manager",
        "--wm",
        dest="workflow_manager",
        default=None,
        help="name of (optional) workflow manager to use within the experiment scope",
    )

    subparser.add_argument(
        "--dry-run",
        "--print",
        dest="dry_run",
        action="store_true",
        help="perform a dry run. Print resulting config to screen and not "
        + "to the workspace configuration file",
    )

    subparser.add_argument(
        "--overwrite",
        dest="overwrite",
        action="store_true",
        help="overwrite existing definitions with newly generated definitions",
    )

    variable_control = subparser.add_mutually_exclusive_group()
    variable_control.add_argument(
        "--include-default-variables",
        "-i",
        action="store_true",
        help="whether to include default variable values in the resulting config",
    )

    variable_control.add_argument(
        "--workload-name-variable",
        "-w",
        default=None,
        metavar="VAR",
        help="variable name to collapse workloads in",
    )

    subparser.add_argument(
        "--zip",
        "-z",
        dest="zips",
        action="append",
        help="zip to define for the experiments, in the format zipname=[zipvar1,zipvar2]",
    )

    subparser.add_argument(
        "--matrix",
        "-m",
        dest="matrix",
        help="comma delimited list of variable names to matrix in the experiments",
    )