def get_option_parser(): parser = COP(__doc__, comms=True, prep=True, argdoc=[('[WORKFLOW_NAME]', 'Workflow source name')]) parser.add_option("--flow-name", help="Install into ~/cylc-run/<workflow_name>/runN ", action="store", metavar="WORKFLOW_NAME", default=None, dest="workflow_name") parser.add_option("--directory", "-C", help="Install the workflow found in path specfied.", action="store", metavar="PATH/TO/FLOW", default=None, dest="source") parser.add_option( "--symlink-dirs", help=( "Enter a list, in the form 'log=path/to/store, share = $...'" ". Use this option to override local symlinks for directories run," " log, work, share, share/cycle, as configured in global.cylc. " "Enter an empty list \"\" to skip making localhost symlink dirs."), action="store", dest="symlink_dirs") parser.add_option("--run-name", help="Name the run.", action="store", metavar="RUN_NAME", default=None, dest="run_name") parser.add_option( "--no-run-name", help="Install the workflow directly into ~/cylc-run/<workflow_name>", action="store_true", default=False, dest="no_run_name") parser.add_cylc_rose_options() return parser
def get_option_parser(): parser = COP( __doc__, argdoc=[ ("JOB-LOG-ROOT", "The log/job sub-directory for the suite"), ("[JOB-LOG-DIR ...]", "A point/name/submit_num sub-directory"), ], ) parser.add_option( "--remote-mode", help="Is this being run on a remote job host?", action="store_true", dest="remote_mode", default=False, ) parser.add_option( "--utc-mode", help="(for remote mode) is the suite running in UTC mode?", action="store_true", dest="utc_mode", default=False, ) parser.add_option( "--clean-env", help="Clean job submission environment.", action="store_true", dest="clean_env", default=False, ) parser.add_option( "--env", help="Variable to pass from parent environment to job submit " "environment. This option can be used multiple times.", action="append", metavar="VAR=VALUE", dest="env", default=[] ) parser.add_option( "--path", help="Executable location to pass to job submit environment. " "This option can be used multiple times.", action="append", metavar="PATH", dest="path", default=[] ) return parser
def get_option_parser(): parser = COP(__doc__, jset=True, prep=True, icp=True, argdoc=[('SUITE1', 'Suite name or path'), ('SUITE2', 'Suite name or path')]) parser.add_option("-n", "--nested", help="print flow.cylc section headings in nested form.", action="store_true", default=False, dest="nested") return parser
def get_option_parser() -> COP: parser = COP(__doc__, comms=True, multitask=True, argdoc=[('REG', "Workflow name"), ('[TASK_GLOB ...]', "Task matching patterns")]) parser.add_option( "--all", help=( "Release all held tasks and remove the 'hold after cycle point', " "if set."), action="store_true", dest="release_all") return parser
def get_option_parser(): parser = COP( __doc__, argdoc=[("[REG]", "Suite name"), ("[PATH]", "Suite definition directory (defaults to $PWD)")]) parser.add_option( "--redirect", help="Allow an existing suite name and run directory" " to be used with another suite.", action="store_true", default=False, dest="redirect") parser.add_option( "--run-dir", help="Symlink $HOME/cylc-run/REG to RUNDIR/REG.", action="store", metavar="RUNDIR", default=None, dest="rundir") return parser
def get_option_parser(): parser = COP(__doc__, jset=True, icp=True, argdoc=[("REG", "Suite name"), ("TASK [...]", "Family or task ID (%s)" % TaskID.SYNTAX)]) parser.set_defaults(sched=False, dry_run=False) parser.add_option( "-d", "--dry-run", help="Generate the job script for the task, but don't submit it.", action="store_true", dest="dry_run") return parser
def get_option_parser(): parser = COP( __doc__, comms=True, multitask_nocycles=True, argdoc=[ ("REG", "Suite name"), ('TASKID [...]', 'Task identifier')]) parser.add_option( "--stop-point", "--remove-point", help="Optional hold/stop cycle point for inserted task.", metavar="CYCLE_POINT", action="store", dest="stop_point_string") parser.add_option( "--no-check", help="Add task even if the provided cycle point is not " "valid for the given task.", action="store_true", default=False) return parser
def get_option_parser() -> COP: parser = COP( __doc__, comms=True, multitask=True, multiworkflow=True, argdoc=[('ID [ID ...]', 'Cycle/Family/Task ID(s)')], ) parser.add_option("--after", help="Hold all tasks after this cycle point.", metavar="CYCLE_POINT", action="store", dest="hold_point_string") return parser
def get_option_parser(): """CLI.""" parser = COP( __doc__, jset=True, prep=True, argdoc=[ ('[SUITE]', 'Suite name or path'), ('[START]', 'Initial cycle point ' '(default: suite initial point)'), ('[STOP]', 'Final cycle point ' '(default: initial + 3 points)')]) parser.add_option( '--icp', action='store', default=None, metavar='CYCLE_POINT', help=( 'Set initial cycle point. Required if not defined in suite.rc.')) return parser
def get_option_parser(): parser = COP( __doc__, comms=True, argdoc=[('WORKFLOW_ID', 'Workflow ID')], ) parser.add_option("-g", "--global", help="Global information only.", action="store_const", const="global", dest="disp_form") parser.add_option("-t", "--tasks", help="Task states only.", action="store_const", const="tasks", dest="disp_form") parser.add_option("-f", "--flows", help="Print flow numbers with tasks.", action="store_true", default=False, dest="show_flows") parser.add_option("-r", "--raw", "--raw-format", help='Display raw format.', action="store_const", const="raw", dest="disp_form") parser.add_option("-p", "--pretty", "--pretty-print", help='Display raw format with indents and newlines.', action="store_true", default=False, dest="pretty") parser.add_option( "-s", "--sort", help="Task states only; sort by cycle point instead of name.", action="store_true", default=False, dest="sort_by_cycle") return parser
def get_option_parser(): parser = COP(__doc__, argdoc=[('WORKFLOW', 'Workflow name or ID')], segregated_log=True) parser.add_option( '--rm', metavar='DIR[:DIR:...]', help=("Only clean the specified subdirectories (or files) in the " "run directory, rather than the whole run directory. " "Accepts quoted globs. Implies --verbose."), action='append', dest='rm_dirs', default=[]) parser.add_option( '--local-only', '--local', help="Only clean on the local filesystem (not remote hosts).", action='store_true', dest='local_only') parser.add_option( '--remote-only', '--remote', help="Only clean on remote hosts (not the local filesystem).", action='store_true', dest='remote_only') parser.add_option( '--force', help=("Allow cleaning of directories that contain workflow run dirs " "(e.g. 'cylc clean foo' when foo contains run1, run2 etc.). " "Warning: this might lead to remote installations and " "symlink dir targets not getting removed."), action='store_true', dest='force') parser.add_option( '--timeout', help=("The number of seconds to wait for cleaning to take place on " "remote hosts before cancelling."), action='store', default='120', dest='remote_timeout') return parser
def get_option_parser(): parser = COP( __doc__, argdoc=[ ('[RESOURCES...]', 'Resources to extract (default all).'), ('[DIR]', 'Target directory.') ] ) parser.add_option( '--list', help="List available package resources.", default=False, action='store_true' ) return parser
def get_option_parser(): parser = COP(__doc__, jset=True, prep=True, argdoc=[('WORKFLOW_ID_1', 'Workflow ID or path to source'), ('WORKFLOW_ID_2', 'Workflow ID or path to source')]) parser.add_option("-n", "--nested", help="print flow.cylc section headings in nested form.", action="store_true", default=False, dest="nested") parser.add_option(icp_option) return parser
def get_option_parser(): parser = COP( __doc__, jset=True, prep=True, icp=True, argdoc=[('WORKFLOW_ID', 'Workflow ID or path to source')], ) parser.add_option( "--check-circular", help="Check for circular dependencies in graphs when the number of " "tasks is greater than 100 (smaller graphs are always checked). " "This can be slow when the number of " "tasks is high.", action="store_true", default=False, dest="check_circular") parser.add_option( "--output", "-o", help="Specify a file name to dump the processed flow.cylc.", metavar="FILENAME", action="store", dest="output") parser.add_option("--profile", help="Output profiling (performance) information", action="store_true", default=False, dest="profile_mode") parser.add_option("-u", "--run-mode", help="Validate for run mode.", action="store", default="live", dest="run_mode", choices=['live', 'dummy', 'simulation']) parser.add_cylc_rose_options() parser.set_defaults(is_validate=True) return parser
def get_option_parser(): parser = COP( __doc__, comms=True, multiworkflow=True, argdoc=[ ('ID [ID ...]', 'Workflow/Cycle/Task ID(s)'), ], ) parser.add_option("-k", "--kill", help="Shut down after killing currently active tasks.", action="store_true", default=False, dest="kill") parser.add_option("--flow", metavar="INT", help="Stop flow number INT from spawning more tasks. " "The scheduler will shut down if it is the only flow.", action="store", dest="flow_num") parser.add_option( "-n", "--now", help=("Shut down without waiting for active tasks to complete." + " If this option is specified once," + " wait for task event handler, job poll/kill to complete." + " If this option is specified more than once," + " tell the workflow to terminate immediately."), action="count", default=0, dest="now") parser.add_option("-w", "--wall-clock", metavar="STOP", help="Shut down after time STOP (ISO 8601 formatted)", action="store", dest="wall_clock") StopPoller.add_to_cmd_options(parser, d_max_polls=0) return parser
def get_option_parser(): parser = COP(__doc__, comms=True, argdoc=[('[REG]', 'Workflow name')]) parser.add_cylc_rose_options() try: # If cylc-rose plugin is available __import__('cylc.rose') except ImportError: pass else: parser.add_option("--clear-rose-install-options", help="Clear options previously set by cylc-rose.", action='store_true', default=False, dest="clear_rose_install_opts") return parser
def get_option_parser(): parser = COP(__doc__, comms=True, argdoc=[("REG", "Workflow name"), ("[STOP]", "task POINT (cycle point), or TASK (task ID).")]) parser.add_option("-k", "--kill", help="Shut down after killing currently active tasks.", action="store_true", default=False, dest="kill") parser.add_option( "--flow", metavar="LABEL", help=("Stop a specified flow within a workflow from spawning " "any further. The scheduler will shut down if LABEL is the " "only flow."), action="store", dest="flow_label") parser.add_option( "-n", "--now", help=("Shut down without waiting for active tasks to complete." + " If this option is specified once," + " wait for task event handler, job poll/kill to complete." + " If this option is specified more than once," + " tell the workflow to terminate immediately."), action="count", default=0, dest="now") parser.add_option("-w", "--wall-clock", metavar="STOP", help="Shut down after time STOP (ISO 8601 formatted)", action="store", dest="wall_clock") StopPoller.add_to_cmd_options(parser, d_max_polls=0) return parser
def get_option_parser(): """CLI.""" parser = COP( __doc__, jset=True, prep=True, argdoc=[ ('[SUITE]', 'Suite name or path'), ('[START]', 'Initial cycle point ' '(default: suite initial point)'), ('[STOP]', 'Final cycle point ' '(default: initial + 3 points)')]) parser.add_option( '-u', '--ungrouped', help='Start with task families ungrouped (the default is grouped).', action='store_true', default=False, dest='ungrouped') parser.add_option( '-n', '--namespaces', help='Plot the suite namespace inheritance hierarchy ' '(task run time properties).', action='store_true', default=False, dest='namespaces') parser.add_option( '-r', '--reference', help='Output in a sorted plain text format for comparison purposes. ' 'If not given, assume --output-file=-.', action='store_true', default=False, dest='reference') parser.add_option( '--show-suicide', help='Show suicide triggers. They are not shown by default, unless ' 'toggled on with the tool bar button.', action='store_true', default=False, dest='show_suicide') parser.add_option( '--icp', action='store', default=None, metavar='CYCLE_POINT', help=( 'Set initial cycle point. Required if not defined in flow.cylc.')) parser.add_option( '--diff', help='Show the difference between two suites (implies --reference)', action='store', ) return parser
def get_option_parser() -> COP: parser = COP( __doc__, comms=True, multitask=True, multiworkflow=True, argdoc=[('ID [ID ...]', 'Cycle/Family/Task ID(s)')], ) parser.add_option( "--all", help=( "Release all held tasks and remove the 'hold after cycle point', " "if set."), action="store_true", dest="release_all") return parser
def get_option_parser(): parser = COP( __doc__, prep=True, jset=True, argdoc=[('WORKFLOW_ID', 'Workflow ID or path to source')], ) parser.add_option("-e", "--error", help="Exit with error status " "if " + CYLC_VERSION + " is not available on all remote platforms.", action="store_true", default=False, dest="error") return parser
def get_option_parser(): parser = COP(__doc__, prep=True) parser.add_option( "--inline", "-i", help="Edit with include-files inlined as described above.", action="store_true", default=False, dest="inline") parser.add_option( "--cleanup", help="Remove backup files left by previous inlined edit sessions.", action="store_true", default=False, dest="cleanup") parser.add_option( "--gui", "-g", help="Force use of the configured GUI editor.", action="store_true", default=False, dest="geditor") return parser
def get_option_parser(): parser = COP(__doc__, comms=True, argdoc=[('[REG]', 'Workflow name'), ('[TASK-JOB]', 'Task job identifier CYCLE/TASK_NAME/SUBMIT_NUM'), ('[[SEVERITY:]MESSAGE ...]', 'Messages')]) parser.add_option( '-s', '--severity', '-p', '--priority', metavar='SEVERITY', help='Set severity levels for messages that do not have one', action='store', dest='severity') return parser
def get_option_parser(): parser = COP( __doc__, comms=True, multitask=True, argdoc=[ ('REG', 'Suite name'), ('[TASK_GLOB ...]', 'Task matching patterns')]) parser.add_option( "-e", "--edit", help="Manually edit the job script before running it.", action="store_true", default=False, dest="edit_run") parser.add_option( "-g", "--geditor", help="(with --edit) force use of the configured GUI editor.", action="store_true", default=False, dest="geditor") return parser
def get_option_parser(): parser = COP( __doc__, comms=True, argdoc=[("REG", "Workflow name"), ("MSG", "External trigger message"), ("ID", "Unique trigger ID")]) parser.add_option( "--max-tries", help="Maximum number of send attempts " "(default %s)." % MAX_N_TRIES, metavar="INT", action="store", default=MAX_N_TRIES, dest="max_n_tries") parser.add_option( "--retry-interval", help="Delay in seconds before retrying " "(default %s)." % RETRY_INTVL_SECS, metavar="SEC", action="store", default=RETRY_INTVL_SECS, dest="retry_intvl_secs") return parser
def get_option_parser(): parser = COP(__doc__, jset=True, prep=True, icp=True) parser.add_option( "-a", "--all-tasks", help="Print all tasks, not just those used in the graph.", action="store_true", default=False, dest="all_tasks") parser.add_option( "-n", "--all-namespaces", help="Print all runtime namespaces, not just tasks.", action="store_true", default=False, dest="all_namespaces") parser.add_option( "-m", "--mro", help="Print the linear \"method resolution order\" for each namespace " "(the multiple-inheritance precedence order as determined by the " "C3 linearization algorithm).", action="store_true", default=False, dest="mro") parser.add_option( "-t", "--tree", help="Print the first-parent inheritance hierarchy in tree form.", action="store_true", default=False, dest="tree") parser.add_option( "-b", "--box", help="With -t/--tree, using unicode box characters. Your terminal " "must be able to display unicode characters.", action="store_true", default=False, dest="box") parser.add_option( "-w", "--with-titles", help="Print namespaces titles too.", action="store_true", default=False, dest="titles") parser.add_option( "-p", "--points", help="Print task IDs from [START] to [STOP] cycle points. Both bounds " "are optional and STOP can be an interval from START (or from the " "initial cycle point, by default). Use '-p , ' for the default range.", metavar="[START],[STOP]", action="store", default=None, dest="prange") parser.add_cylc_rose_options() return parser
def get_option_parser(): parser = COP(__doc__, argdoc=[('[REGEX]', 'Suite name regular expression pattern')]) parser.add_option("-t", "--tree", help="Print suites in nested tree form.", action="store_true", default=False, dest="tree") parser.add_option("-b", "--box", help="Use unicode box drawing characters in tree views.", action="store_true", default=False, dest="unicode") parser.add_option("-a", "--align", help="Align columns.", action="store_true", default=False, dest="align") parser.add_option("-x", help="don't print suite definition directory paths.", action="store_true", default=False, dest="x") parser.add_option("-y", help="Don't print suite titles.", action="store_true", default=False, dest="y") parser.add_option("--fail", help="Fail (exit 1) if no matching suites are found.", action="store_true", default=False, dest="fail") return parser
def get_option_parser(): parser = COP(__doc__, argdoc=[]) parser.add_option("-i", "--item", metavar="[SEC...]ITEM", help="Item or section to print (multiple use allowed).", action="append", dest="item", default=[]) parser.add_option( "--sparse", help="Only print items explicitly set in the config files.", action="store_true", default=False, dest="sparse") parser.add_option("-p", "--python", help="Print native Python format.", action="store_true", default=False, dest="pnative") parser.add_option("--print-run-dir", help="Print the configured top level run directory.", action="store_true", default=False, dest="run_dir") parser.add_option("--print-site-dir", help="Print the site configuration directory location.", action="store_true", default=False, dest="site_dir") parser.add_option("--print-user-dir", help="Print the user configuration directory location.", action="store_true", default=False, dest="user_dir") return parser
def get_option_parser(): parser = COP(__doc__, comms=True, prep=True, argdoc=[("[NAMED_RUN]", "Named run. e.g. my-flow/run1")]) # If cylc-rose plugin is available ad the --option/-O config try: __import__('cylc.rose') parser.add_option("--opt-conf-key", "-O", help=("Use optional Rose Config Setting " "(if cylc-rose is installed)"), action="append", default=[], dest="opt_conf_keys") parser.add_option( "--define", '-D', help=("Each of these overrides the `[SECTION]KEY` setting in a " "`rose-suite.conf` file. " "Can be used to disable a setting using the syntax " "`--define=[SECTION]!KEY` or even `--define=[!SECTION]`."), action="append", default=[], dest="defines") parser.add_option( "--define-suite", "--define-flow", '-S', help=("As `--define`, but with an implicit `[SECTION]` for " "workflow variables."), action="append", default=[], dest="define_suites") parser.add_option("--clear-rose-install-options", help=("Clear options previously set by cylc-rose."), action='store_true', default=False, dest="clear_rose_install_opts") except ImportError: pass return parser
def get_option_parser(): parser = COP(__doc__, comms=True, multitask=True, argdoc=[('REG', 'Suite name'), ('[TASK_NAME or TASK_GLOB ...]', 'Task names or match patterns')]) parser.add_option('--list-prereqs', action="store_true", default=False, help="Print a task's pre-requisites as a list.") parser.add_option('--json', action="store_true", default=False, help="Print output in JSON format.") return parser
def get_option_parser(): parser = COP(__doc__, argdoc=[('REG', "Workflow name")]) parser.add_option( '--local-only', '--local', help="Only clean on the local filesystem (not remote hosts).", action='store_true', dest='local_only') parser.add_option( '--timeout', help="The number of seconds to wait for cleaning to take place on " "remote hosts before cancelling.", action='store', default='120', dest='remote_timeout') return parser