diff --git a/bin/cylc-hold b/bin/cylc-hold index 859bd8bfca1..077aa6618ba 100755 --- a/bin/cylc-hold +++ b/bin/cylc-hold @@ -18,7 +18,7 @@ """cylc [control] hold [OPTIONS] ARGS -Hold one or more waiting tasks (cylc hold REG TASKID ...), or +Hold one or more waiting tasks (cylc hold REG TASK_GLOB ...), or a whole suite (cylc hold REG). Held tasks do not submit even if they are ready to run. @@ -44,7 +44,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ("REG", "Suite name"), - ('[TASKID ...]', 'Task identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) parser.add_option( "--after", @@ -66,10 +66,10 @@ def main(): suite, options.owner, options.host, options.port) if args: - items = parser.parse_multitask_compat(options, args) + task_globs = parser.parse_multitask_compat(options, args) pclient( 'hold_tasks', - {'task_globs': items}, + {'task_globs': task_globs}, timeout=options.comms_timeout ) elif options.hold_point_string: diff --git a/bin/cylc-kill b/bin/cylc-kill index e7150cbf2cb..729801693df 100755 --- a/bin/cylc-kill +++ b/bin/cylc-kill @@ -20,7 +20,7 @@ Kill jobs of active tasks and update their statuses accordingly. -To kill one or more tasks, "cylc kill REG TASKID ..."; to kill all active +To kill one or more tasks, "cylc kill REG TASK_GLOB ..."; to kill all active tasks: "cylc kill REG". """ @@ -43,7 +43,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ('REG', 'Suite name'), - ('[TASKID ...]', 'Task identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) options, args = parser.parse_args() diff --git a/bin/cylc-poll b/bin/cylc-poll index ff716862b49..a0f20c9563b 100755 --- a/bin/cylc-poll +++ b/bin/cylc-poll @@ -20,8 +20,8 @@ Poll (query) task jobs to verify and update their statuses. -Use "cylc poll REG" to poll all active tasks, or "cylc poll REG TASKID" to poll -individual tasks or families, or groups of them. +Use "cylc poll REG" to poll all active tasks, or "cylc poll REG TASK_GLOB" +to poll individual tasks or families, or groups of them. """ import sys @@ -42,7 +42,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ('REG', 'Suite name'), - ('[TASKID ...]', 'Task identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) parser.add_option( "-s", "--succeeded", help="Allow polling of succeeded tasks.", @@ -58,14 +58,14 @@ def main(): pclient = SuiteRuntimeClient( suite, options.owner, options.host, options.port, options.comms_timeout) - items = parser.parse_multitask_compat(options, args) + task_globs = parser.parse_multitask_compat(options, args) # Back compat: back_out introduced >7.5.0 # So don't call with "poll_succ" if not necessary to avoid breakage. if options.poll_succ: pclient('poll_tasks', - {'task_globs': items, 'poll_succ': options.poll_succ}) + {'task_globs': task_globs, 'poll_succ': options.poll_succ}) else: - pclient('poll_tasks', {'task_globs': items}) + pclient('poll_tasks', {'task_globs': task_globs}) if __name__ == "__main__": diff --git a/bin/cylc-release b/bin/cylc-release index 07ea3aeb294..d9ad3f5f1b1 100755 --- a/bin/cylc-release +++ b/bin/cylc-release @@ -18,7 +18,7 @@ """cylc [control] release|unhold [OPTIONS] ARGS -Release one or more held tasks (cylc release REG TASKID) +Release one or more held tasks (cylc release REG TASK_GLOB) or the whole suite (cylc release REG). Held tasks do not submit even if they are ready to run. @@ -43,7 +43,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ("REG", 'Suite name'), - ('[TASKID ...]', 'Task identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) options, args = parser.parse_args() suite = args.pop(0) @@ -56,8 +56,8 @@ def main(): suite, options.owner, options.host, options.port, options.comms_timeout) if args: - items = parser.parse_multitask_compat(options, args) - pclient('release_tasks', {'task_globs': items}) + task_globs = parser.parse_multitask_compat(options, args) + pclient('release_tasks', {'task_globs': task_globs}) else: pclient('release_suite') diff --git a/bin/cylc-remove b/bin/cylc-remove index 96148bb4e18..ec33d12f126 100755 --- a/bin/cylc-remove +++ b/bin/cylc-remove @@ -18,7 +18,7 @@ """cylc [control] remove [OPTIONS] ARGS -Remove one or more tasks (cylc remove REG TASKID), or all tasks with a +Remove one or more tasks (cylc remove REG TASK_GLOB), or all tasks with a given cycle point (cylc remove REG *.POINT) from a running suite. Tasks will spawn successors first if they have not done so already. @@ -42,7 +42,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ("REG", "Suite name"), - ('TASKID [...]', 'Task identifiers')]) + ('TASK_GLOB [...]', 'Task matching patterns')]) parser.add_option( "--no-spawn", @@ -56,10 +56,10 @@ def main(): pclient = SuiteRuntimeClient( suite, options.owner, options.host, options.port, options.comms_timeout) - items = parser.parse_multitask_compat(options, args) + task_globs = parser.parse_multitask_compat(options, args) pclient( 'remove_tasks', - {'task_globs': items, 'spawn': (not options.no_spawn)} + {'task_globs': task_globs, 'spawn': (not options.no_spawn)} ) diff --git a/bin/cylc-reset b/bin/cylc-reset index 3cec9b30eb9..65bcec3e9e7 100755 --- a/bin/cylc-reset +++ b/bin/cylc-reset @@ -52,7 +52,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ('REG', 'Suite name'), - ('[TASKID ...]', 'Task identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) parser.add_option( "-s", "--state", metavar="STATE", @@ -96,10 +96,10 @@ def main(): pclient = SuiteRuntimeClient( suite, options.owner, options.host, options.port, options.comms_timeout) - items = parser.parse_multitask_compat(options, args) + task_globs = parser.parse_multitask_compat(options, args) pclient( 'reset_task_states', - {'task_globs': items, 'state': options.state, + {'task_globs': task_globs, 'state': options.state, 'outputs': options.outputs} ) diff --git a/bin/cylc-show b/bin/cylc-show index 2ca9120a6e5..c2b1f2c56c3 100755 --- a/bin/cylc-show +++ b/bin/cylc-show @@ -43,7 +43,7 @@ def main(): __doc__, comms=True, noforce=True, multitask=True, argdoc=[ ('REG', 'Suite name'), - ('[TASKID ...]', 'Task names or identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) parser.add_option('--list-prereqs', action="store_true", default=False, help="Print a task's pre-requisites as a list.") diff --git a/bin/cylc-spawn b/bin/cylc-spawn index 3ad0f1b1372..0996e492d74 100755 --- a/bin/cylc-spawn +++ b/bin/cylc-spawn @@ -41,7 +41,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ('REG', 'Suite name'), - ('[TASKID ...]', 'Task identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) options, args = parser.parse_args() diff --git a/bin/cylc-trigger b/bin/cylc-trigger index 4640277ea52..713cb7ef3eb 100755 --- a/bin/cylc-trigger +++ b/bin/cylc-trigger @@ -62,7 +62,7 @@ def main(): __doc__, comms=True, multitask=True, argdoc=[ ('REG', 'Suite name'), - ('[TASKID ...]', 'Task identifiers')]) + ('[TASK_GLOB ...]', 'Task matching patterns')]) parser.add_option( "-e", "--edit", @@ -86,8 +86,8 @@ def main(): aborted = False if options.edit_run: - items = parser.parse_multitask_compat(options, args) - task_id = items[0] + task_globs = parser.parse_multitask_compat(options, args) + task_id = task_glob[0] # Check that TASK is a unique task. success, msg = pclient( 'ping_task', @@ -191,13 +191,10 @@ def main(): aborted = True # Trigger the task proxy(s). - items = parser.parse_multitask_compat(options, args) - # Back compat: back_out introduced >7.5.0 - # So don't call with "back_out" if not necessary to avoid breakage. - if aborted: - pclient('trigger_tasks', {'task_globs': items, 'back_out': aborted}) - else: - pclient('trigger_tasks', {'task_globs': items}) + pclient('trigger_tasks', { + 'task_globs': parser.parse_multitask_compat(options, args), + 'back_out': aborted + }) if __name__ == "__main__": diff --git a/lib/cylc/option_parsers.py b/lib/cylc/option_parsers.py index 663c3b6ca38..d6d87593560 100644 --- a/lib/cylc/option_parsers.py +++ b/lib/cylc/option_parsers.py @@ -32,7 +32,8 @@ class CylcOptionParser(OptionParser): """Common options for all cylc CLI commands.""" MULTITASK_USAGE = """ -TASKID is a pattern to match task proxies or task families, or groups of them: +TASK_GLOB is a pattern to match task proxies or task families, +or groups of them: * [CYCLE-POINT-GLOB/]TASK-NAME-GLOB[:TASK-STATE] * [CYCLE-POINT-GLOB/]FAMILY-NAME-GLOB[:TASK-STATE] * TASK-NAME-GLOB[.CYCLE-POINT-GLOB][:TASK-STATE] @@ -49,7 +50,7 @@ class CylcOptionParser(OptionParser): The old 'MATCH POINT' syntax will be automatically detected and supported. To avoid this, use the '--no-multitask-compat' option, or use the new syntax -(with a '/' or a '.') when specifying 2 TASKID arguments.""" +(with a '/' or a '.') when specifying 2 TASK_GLOB arguments.""" def __init__(self, usage, argdoc=None, comms=False, noforce=False, jset=False, multitask=False, prep=False, auto_add=True, @@ -212,15 +213,6 @@ def add_std_options(self): action="store", default=None, dest="templatevars_file") if self.multitask: - self.add_std_option( - "-m", "--family", - help=( - "(Obsolete) This option is now ignored " - "and is retained for backward compatibility only. " - "TASKID in the argument list can be used to match " - "task and family names regardless of this option."), - action="store_true", default=False, dest="is_family") - self.add_std_option( "--no-multitask-compat", help="Disallow backward compatible multitask interface.",