From cd4a3e35af834027a457b1917f340e40baa8ad54 Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Fri, 15 Dec 2023 10:18:49 +0000 Subject: [PATCH 1/3] set: add note about CLI completion --- cylc/flow/scripts/set.py | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/cylc/flow/scripts/set.py b/cylc/flow/scripts/set.py index 504974d8c34..c31b8f0b994 100755 --- a/cylc/flow/scripts/set.py +++ b/cylc/flow/scripts/set.py @@ -18,26 +18,31 @@ """cylc set [OPTIONS] ARGS -Manually set task prerequisites and outputs in a running workflow. +Manually set task prerequisites or outputs in a running workflow. -By default, set all required outputs complete (note that `succeeded` could be -an optional output). +By default, set all required outputs (note that `succeeded` could be an +optional output). -Setting prerequisites contributes to a task's readiness to run and promotes it -to the scheduler's active window where clock and xtriggers will become active. +Prerequitistes: + Setting prerequisites contributes to a task's readiness to run and promotes + it to the scheduler's active window where xtriggers will become active. -Setting outputs affects task completion and spawns downstream tasks that depend -on those outputs. +Outputs: + Setting outputs affects task completion and spawns downstream tasks that + depend on those outputs. -Implied outputs are set automatically: - - started implies submitted - - custom outputs imply submitted and started - - succeeded implies submitted, started, and all required custom outputs - - failed implies submitted and started - - expired does not imply other outputs + Implied outputs are set automatically: + - started implies submitted + - custom outputs imply submitted and started + - succeeded implies submitted, started, and all required custom outputs + - failed implies submitted and started + - expired does not imply other outputs -Examples: +CLI Completion: + Cylc can auto-complete prequisites and outputs for active tasks if you + specify the task in the command before attempting to complete these options. +Examples: # complete all required outputs of 3/bar: $ cylc set my_workflow//3/bar From 7c75fbc954cd563cd1494a057a7a610319817f14 Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Fri, 15 Dec 2023 10:28:35 +0000 Subject: [PATCH 2/3] tui: support the "cylc set" command with default opts --- cylc/flow/tui/data.py | 1 + .../test_online_mutation.hold-mutation-selected.html | 2 +- tests/integration/tui/screenshots/test_show.fail.html | 2 +- tests/integration/tui/test_show.py | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cylc/flow/tui/data.py b/cylc/flow/tui/data.py index 04c3d7220b1..90344e2462b 100644 --- a/cylc/flow/tui/data.py +++ b/cylc/flow/tui/data.py @@ -110,6 +110,7 @@ 'kill', 'trigger', 'poll', + 'set', ], 'job': [ 'kill', diff --git a/tests/integration/tui/screenshots/test_online_mutation.hold-mutation-selected.html b/tests/integration/tui/screenshots/test_online_mutation.hold-mutation-selected.html index 34be2ffa0ce..af0a063a14f 100644 --- a/tests/integration/tui/screenshots/test_online_mutation.hold-mutation-selected.html +++ b/tests/integration/tui/screenshots/test_online_mutation.hold-mutation-selected.html @@ -9,7 +9,7 @@ < log > < poll > < release > - < show > + < set > quit: q help: q to close ↥ ↧ Home End filter tasks: T──────────────────────────────────────────────── diff --git a/tests/integration/tui/screenshots/test_show.fail.html b/tests/integration/tui/screenshots/test_show.fail.html index f788e5b3a55..66a4836bc01 100644 --- a/tests/integration/tui/screenshots/test_show.fail.html +++ b/tests/integration/tui/screenshots/test_show.fail.html @@ -21,7 +21,7 @@ < < < - + < diff --git a/tests/integration/tui/test_show.py b/tests/integration/tui/test_show.py index c664cdd1393..063fd4b8781 100644 --- a/tests/integration/tui/test_show.py +++ b/tests/integration/tui/test_show.py @@ -48,7 +48,7 @@ async def test_show(flow, scheduler, start, rakiura, monkeypatch): rk.user_input('down', 'down', 'enter') # select the "show" context option - rk.user_input(*(['down'] * 6), 'enter') + rk.user_input(*(['down'] * 7), 'enter') rk.compare_screenshot( 'success', 'the show output should be displayed', @@ -63,7 +63,7 @@ def cli_cmd_fail(*args, **kwargs): ) # select the "show" context option - rk.user_input('q', 'enter', *(['down'] * 6), 'enter') + rk.user_input('q', 'enter', *(['down'] * 7), 'enter') rk.compare_screenshot( 'fail', 'the error should be displayed', From ca8637e0a198e0ee9bcfda4c0ee8d2b94cd8dca2 Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Tue, 19 Dec 2023 12:12:19 +1300 Subject: [PATCH 3/3] Apply suggestions from code review [skip ci] --- cylc/flow/scripts/set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cylc/flow/scripts/set.py b/cylc/flow/scripts/set.py index c31b8f0b994..b6f50c1923c 100755 --- a/cylc/flow/scripts/set.py +++ b/cylc/flow/scripts/set.py @@ -39,7 +39,7 @@ - expired does not imply other outputs CLI Completion: - Cylc can auto-complete prequisites and outputs for active tasks if you + Cylc can auto-complete prerequisites and outputs for active tasks if you specify the task in the command before attempting to complete these options. Examples: