Skip to content

Commit

Permalink
Merge pull request #35 from oliver-sanders/cylc-set-stuff
Browse files Browse the repository at this point in the history
Cylc set stuff
  • Loading branch information
hjoliver authored Dec 18, 2023
2 parents 3fddad0 + ca8637e commit 2f8536a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
33 changes: 19 additions & 14 deletions cylc/flow/scripts/set.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 prerequisites 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
Expand Down
1 change: 1 addition & 0 deletions cylc/flow/tui/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
'kill',
'trigger',
'poll',
'set',
],
'job': [
'kill',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">log </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&gt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">poll </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&gt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">release </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&gt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">show </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&gt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">set </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&gt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#ffffff;background:#0000ee">quit: </span><span style="color:#00ffff;background:#0000ee">q</span><span style="color:#ffffff;background:#0000ee"> help: </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> q to close </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#00ffff;background:#0000ee">↥ ↧ Home End </span><span style="color:#ffffff;background:#0000ee"> </span>
<span style="color:#ffffff;background:#0000ee">filter tasks: </span><span style="color:#00ffff;background:#0000ee">T</span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5">────────────────────────────────────────────────</span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#ffffff;background:#0000ee"> </span>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/tui/screenshots/test_show.fail.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5">&lt;</span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
<span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"> </span><span style="color:#000000;background:#e5e5e5"></span><span style="color:#000000;background:#e5e5e5"> </span>
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/tui/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit 2f8536a

Please sign in to comment.