def get_option_parser(): parser = COP( __doc__, comms=True, multitask=True, argdoc=[('ID [ID ...]', 'Workflow/Cycle/Family/Task ID(s)')], ) 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.", ) parser.add_option( '--task-def', action="append", default=None, dest='task_defs', metavar='TASK_NAME', help="View metadata for a task definition (can be used multiple times)" ) return parser
def get_option_parser(): parser = COP(__doc__, comms=True) 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", "--flow", help="Print flow label with tasks.", action="store_true", default=False, dest="flow") 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__, comms=True, multitask=True, multiworkflow=True, argdoc=[('ID [ID ...]', 'Cycle/Family/Task ID(s)')], ) parser.add_option("-o", "--output", metavar="OUTPUT", help="Set OUTPUT (default \"succeeded\") completed.", action="append", default=None, dest="outputs") parser.add_option("-f", "--flow", metavar="FLOW", help="Number of the flow to attribute the outputs.", action="store", default=None, dest="flow_num") return parser
def get_option_parser(): """Augment options parser to current context.""" parser = COP(__doc__, argdoc=[('REG', 'Suite name')], comms=True) delta_keys = list(DELTAS_MAP) pb_topics = ("Directly published data-store topics include: '" + ("', '").join(delta_keys[:-1]) + "' and '" + delta_keys[-1] + "'.") parser.add_option( "-T", "--topics", help="Specify a comma delimited list of subscription topics. " + pb_topics, action="store", dest="topics", default='workflow') parser.add_option("-o", "--once", help="Show a single publish then exit.", action="store_true", default=False, dest="once") return parser
def get_option_parser(): parser = COP(__doc__, comms=True, argdoc=[("REG", "Suite name"), ("CHECKPOINT-NAME", "Checkpoint name")]) return parser
def get_option_parser(): parser = COP(__doc__, comms=True, argdoc=[('REG', 'Suite name'), ('[TASK]', 'Task ' + TaskID.SYNTAX)]) return parser
def get_option_parser(): parser = COP(__doc__, comms=True, multitask=True, argdoc=[('REG', 'Workflow name'), ('[TASK_GLOB ...]', 'Task matching patterns')]) 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("-s", "--state", metavar="STATE", help="Reset task state to STATE, can be %s" % (', '.join(TASK_STATUSES_CAN_RESET_TO)), choices=list(TASK_STATUSES_CAN_RESET_TO), action="store", dest="state") parser.add_option( "--output", "-O", metavar="OUTPUT", help=("Find task output by message string or trigger string, " + "set complete or incomplete with !OUTPUT, " + "'*' to set all complete, '!*' to set all incomplete. " + "Can be used more than once to reset multiple task outputs."), action="append", default=[], dest="outputs") return parser
def get_option_parser(): parser = COP(__doc__, comms=True, noforce=True) 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("-r", "--raw", "--raw-format", help='Display raw format.', action="store_const", const="raw", dest="disp_form") 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__, comms=True, argdoc=[('WORKFLOW', 'Workflow name or ID'), ('LEVEL', ', '.join(LOG_LEVELS.keys()))]) return parser
def get_option_parser(): parser = COP(__doc__, jset=True, prep=True, icp=True) 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', 'dummy-local', 'simulation']) parser.set_defaults(is_validate=True) return parser
def get_option_parser(): parser = COP( __doc__, comms=True, argdoc=[ ("WORKFLOW_ID", "Workflow ID"), ("MSG", "External trigger message"), ("TRIGGER_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__, 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") return parser
def get_option_parser(): parser = COP(__doc__, argdoc=[('WORKFLOW', 'Workflow name or ID')]) parser.add_option( "-r", "--raw", help="Show raw timing output suitable for custom diagnostics.", action="store_true", default=False, dest="show_raw") parser.add_option("-s", "--summary", help="Show textual summary timing output for tasks.", action="store_true", default=False, dest="show_summary") parser.add_option("-w", "--web-summary", help="Show HTML summary timing output for tasks.", action="store_true", default=False, dest="html_summary") parser.add_option("-O", "--output-file", help="Output to a specific file", action="store", default=None, dest="output_filename") 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', 'Suite name'), ('LEVEL', ', '.join(LOG_LEVELS.keys()))]) return parser
def get_option_parser(): parser = COP(__doc__, jset=True, prep=True, icp=True) parser.add_option( "--strict", help="Fail any use of unsafe or experimental features. " "Currently this just means naked dummy tasks (tasks with no " "corresponding runtime section) as these may result from " "unintentional typographic errors in task names.", action="store_true", default=False, dest="strict") 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', 'dummy-local', 'simulation']) parser.set_defaults(is_validate=True) return parser
def get_option_parser(): parser = COP(__doc__, comms=True, multitask=True, argdoc=[('REG', "Workflow name")]) return parser
def get_option_parser(): parser = COP( __doc__, argdoc=[("INSTALL_TARGET", "target platform to be tidied"), ("RUND", "The run directory of the workflow")] ) return parser
def get_option_parser(): parser = COP(__doc__) parser.add_option( "-t", "--task", help="Specify a task to check the state of.", action="store", dest="task", default=None) parser.add_option( "-p", "--point", help="Specify the cycle point to check task states for.", action="store", dest="cycle", default=None) parser.add_option( "-T", "--task-point", help="Use the CYLC_TASK_CYCLE_POINT environment variable as the " "cycle point to check task states for. " "Shorthand for --point=$CYLC_TASK_CYCLE_POINT", action="store_true", dest="use_task_point", default=False) parser.add_option( "--template", metavar="TEMPLATE", help="Remote cyclepoint template (IGNORED - this is now determined " "automatically).", action="store", dest="template") parser.add_option( "-d", "--run-dir", help="The top level cylc run directory if non-standard. The " "database should be DIR/REG/log/db. Use to interrogate " "suites owned by others, etc.; see note above.", metavar="DIR", action="store", dest="run_dir", default=None) parser.add_option( "-s", "--offset", help="Specify an offset to add to the targeted cycle point", action="store", dest="offset", default=None) conds = ("Valid triggering conditions to check for include: '" + ("', '").join( sorted(CylcSuiteDBChecker.STATE_ALIASES.keys())[:-1]) + "' and '" + sorted( CylcSuiteDBChecker.STATE_ALIASES.keys())[-1] + "'. ") states = ("Valid states to check for include: '" + ("', '").join(TASK_STATUSES_ORDERED[:-1]) + "' and '" + TASK_STATUSES_ORDERED[-1] + "'.") parser.add_option( "-S", "--status", help="Specify a particular status or triggering condition to " "check for. " + conds + states, action="store", dest="status", default=None) parser.add_option( "-O", "--output", "-m", "--message", help="Check custom task output by message string or trigger string.", action="store", dest="msg", default=None) SuitePoller.add_to_cmd_options(parser) return parser
def get_option_parser(): """CLI.""" parser = COP(__doc__, jset=True, prep=True, argdoc=[('[WORKFLOW]', 'Workflow name or path'), ('[START]', 'Initial cycle point ' '(default: workflow 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 workflow 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 workflows (implies --reference)', action='store', ) return parser
def get_option_parser(): parser = COP( __doc__, comms=True, multiworkflow=True, argdoc=[('WORKFLOW_ID ...', 'Workflow IDs')], ) return parser
def get_option_parser(): parser = COP( __doc__, comms=True, multitask=True, argdoc=[ ("REG", "Workflow name"), ('TASK_GLOB [...]', 'Task matching patterns')]) return parser
def get_option_parser(): """CLI opts for "cylc scan".""" parser = COP( __doc__, comms=True, argdoc=[], ) parser.add_option( '--name', '-n', help=('Filter flows by registered name using a regex.' ' Can be used multiple times, workflows will be displayed if' ' their name matches ANY of the provided regexes.'), action='append') parser.add_option( '--states', help=('Choose which flows to display by providing a list of states' ' or "all" to show everything. See the full `cylc scan` help' ' for a list of supported states.'), default='running,paused,stopping', action='store') parser.add_option('--format', '-t', help=('Set the output format.' ' (rich: multi-line, human readable)' ' (plain: single-line)' ' (json: machine readable)' ' (tree: display registration hierarchy as a tree)' ' (name: just show flow names, machine readable)'), choices=('rich', 'plain', 'json', 'tree', 'name'), default='plain') parser.add_option( '--sort', help='Sort flows by name before writing them (takes longer).', action='store_true') parser.add_option( '--colour-blind', '--color-blind', help=( "Don't depend on colour to convey information. " ' Use this rather than --color=never so you still get bold text.'), action='store_true') parser.add_option( '--ping', help=('Test the connection to the flow. Scan normally just reads flow' ' contact files, but --ping forces a connection to the scheduler' ' and removes the contact file if it is not found to be running' " (this can happen if the scheduler gets killed and can't clean" ' up after itself).'), action='store_true') return parser
def get_option_parser(): parser = COP(__doc__, jset=True, prep=True) parser.add_option( "--inline", "-i", help="Inline include-files.", action="store_true", default=False, dest="inline") parser.add_option( "--empy", "-e", help="View after EmPy template processing " "(implies '-i/--inline' as well).", action="store_true", default=False, dest="empy") parser.add_option( "--jinja2", "-j", help="View after Jinja2 template processing " "(implies '-i/--inline' as well).", action="store_true", default=False, dest="jinja2") parser.add_option( "-p", "--process", help="View after all processing (EmPy, Jinja2, inlining, " "line-continuation joining).", action="store_true", default=False, dest="process") parser.add_option( "--mark", "-m", help="(With '-i') Mark inclusions in the left margin.", action="store_true", default=False, dest="mark") parser.add_option( "--label", "-l", help="(With '-i') Label file inclusions with the file name. Line " "numbers will not correspond to those reported by the parser.", action="store_true", default=False, dest="label") parser.add_option( "--single", help="(With '-i') Inline only the first instances of any " "multiply-included files. Line numbers will not correspond to " "those reported by the parser.", action="store_true", default=False, dest="single") parser.add_option( "--cat", "-c", help="Concatenate continuation lines (line numbers will " "not correspond to those reported by the parser).", action="store_true", default=False, dest="cat") parser.add_option( "--gui", "-g", help="Force use of the configured GUI editor.", action="store_true", default=False, dest="geditor") parser.add_option( "--stdout", help="Print the workflow definition to stdout.", action="store_true", default=False, dest="stdout") return parser
def main(): if not remrun(): from cylc.flow.option_parsers import CylcOptionParser as COP from cylc.flow.task_remote_cmd import remote_tidy parser = COP( __doc__, argdoc=[("RUND", "The run directory of the suite")] ) remote_tidy(parser.parse_args()[1][0]) # position argument 1, rund
def get_option_parser(): parser = COP( __doc__, comms=True, multitask=True, multiworkflow=True, argdoc=[('ID [ID ...]', 'Cycle/Family/Task ID(s)')], ) return parser
def get_option_parser(): parser = COP(__doc__, argdoc=[("INSTALL_TARGET", "Target to be initialised"), ("RUND", "The run directory of the workflow"), ('[DIRS_TO_BE_SYMLINKED ...]', "Directories to be symlinked")], color=False) return parser
def main(): parser = COP(__doc__, comms=True, argdoc=[('REG', 'Suite name')]) (options, args) = parser.parse_args() suite = args[0] pclient = SuiteRuntimeClient(suite, options.owner, options.host, options.port) print(pclient('get_cylc_version', timeout=options.comms_timeout))
def get_option_parser(): parser = COP(__doc__, argdoc=[('[DIR]', 'Target directory.'), ('[RESOURCES...]', 'Resources to extract (default all).')]) parser.add_option('--list', default=False, action='store_true') return parser