Skip to content

Commit

Permalink
Merge pull request #800 from MetRonnie/cylc-set
Browse files Browse the repository at this point in the history
Cherry-pick `cylc set` corrections
  • Loading branch information
wxtim authored Feb 18, 2025
2 parents 857be00 + aceaa92 commit 347efa1
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 27 deletions.
12 changes: 6 additions & 6 deletions src/reference/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ Cylc 8.2
.. admonition:: Cylc Components
:class: hint

:cylc-flow: `8.2 <https://github.com/cylc/cylc-flow/blob/8.2.x/CHANGES.md>`__
:cylc-uiserver: `1.4 <https://github.com/cylc/cylc-uiserver/blob/1.4.x/CHANGES.md>`__
:cylc-rose: `1.3 <https://github.com/cylc/cylc-rose/blob/1.3.x/CHANGES.md>`__
:cylc-flow: `8.2 <https://github.com/cylc/cylc-flow/blob/8.2.7/CHANGES.md>`__
:cylc-uiserver: `1.4 <https://github.com/cylc/cylc-uiserver/blob/1.4.4/CHANGES.md>`__
:cylc-rose: `1.3 <https://github.com/cylc/cylc-rose/blob/1.3.4/CHANGES.md>`__


UI now remembers workspace tab layout
Expand Down Expand Up @@ -400,9 +400,9 @@ Cylc 8.1
.. admonition:: Cylc Components
:class: hint

:cylc-flow: `8.1 <https://github.com/cylc/cylc-flow/blob/master/CHANGES.md#cylc-814-released-2023-05-04>`__
:cylc-uiserver: `1.2 <https://github.com/cylc/cylc-uiserver/blob/1.2.x/CHANGES.md>`__
:cylc-rose: `1.1 <https://github.com/cylc/cylc-rose/blob/1.1.0/CHANGES.md#user-content-cylc-rose-110-released-2022-07-28>`__
:cylc-flow: `8.1 <https://github.com/cylc/cylc-flow/blob/8.1.4/CHANGES.md>`__
:cylc-uiserver: `1.2 <https://github.com/cylc/cylc-uiserver/blob/1.2.2/CHANGES.md>`__
:cylc-rose: `1.1 <https://github.com/cylc/cylc-rose/blob/1.1.1/CHANGES.md>`__

.. warning::

Expand Down
4 changes: 2 additions & 2 deletions src/user-guide/cheat-sheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ First, make your required changes to the files in the workflow's
cylc vr <id>

If you want to quickly edit a task's configuration, e.g. while developing a
workflow or testing changes, the
workflow or testing changes, the
:ref:`"Edit Runtime" feature <interventions.edit-a-tasks-configuration>`
in the GUI can be convenient.

Expand Down Expand Up @@ -218,7 +218,7 @@ Run or re-run a task (:ref:`more info <interventions.re-run-a-task>`)::

cylc trigger <id>//<cycle>/<task>

Mark a task as "succeeded"
Mark a task as complete
(:ref:`more info <interventions.set-task-outputs>`)::

cylc set <id>//<cycle>/<task>
Expand Down
36 changes: 21 additions & 15 deletions src/user-guide/interventions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,21 @@ Set Task Outputs
.. image:: set-task-outputs.gui.gif
:width: 75%

By default this sets the "succeeded" output, press the pencil icon next
to the trigger command to specify a different output.
By default, this sets all :term:`required outputs <required output>` for
the task, which usually includes ``succeeded``.
To specify the output(s) you would like to set,
press the pencil icon next to the "Set" command .

.. tab-item:: Tui
:sync: tui

.. image:: set-task-outputs.tui.gif
:width: 75%

By default, this sets the "succeeded" output. Use ``cylc set --output``
to specify a different output.
By default, this sets all :term:`required outputs <required output>` for
the task, which usually includes ``succeeded``.
To specify the output(s) you would like to set,
use ``cylc set --output``.

.. tab-item:: CLI
:sync: cli
Expand All @@ -184,8 +188,10 @@ Set Task Outputs
$ cylc set <workflow>//<task>
By default, this sets the "succeeded" output. Use the ``--output`` option
to specify a different output.
By default, this sets all :term:`required outputs <required output>` for
the task, which usually includes ``succeeded``.
To specify the output(s) you would like to set,
use the ``--output`` option.

You can also :ref:`set task prerequisites <interventions.set-task-prerequisites>`.
Should I set task outputs or prerequisites?
Expand All @@ -203,7 +209,7 @@ Set Task Prerequisites
[scheduler]
allow implicit tasks = True
[scheduling]
[[graph]]
R1 = """
Expand All @@ -214,7 +220,7 @@ Set Task Prerequisites
# set prereqs "1/b2:succeeded" and "1/c:succeeded" on 1/z1
# set prereqs "all" on 1/z2
"""
[runtime]
[[b1]]
script = sleep 600
Expand Down Expand Up @@ -274,10 +280,10 @@ Set a Switch Task
switch:normal? => normal
switch:alternate? => alternate
normal | alternate => end
end[-P1] => start
"""
[runtime]
[[start]]
script = """
Expand All @@ -298,23 +304,23 @@ Set a Switch Task
take a particular path ahead of time:

.. code-block:: cylc-graph
start => switch
# by default, the workflow follows the "normal" path
switch:normal? => normal
# but it can follow an alternate route if desired
switch:alternate? => alternate
normal | alternate => end
:Solution:
Set "succeeded" as well as the desired output(s) on the task and use the
``-wait`` option. Cylc will follow the desired path when it gets there.

.. note::

We set the "succeeded" output to prevent the task from being re-run when the
flow approaches it.

Expand Down
9 changes: 5 additions & 4 deletions src/user-guide/running-workflows/retrying-tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ state, with a new clock trigger to handle the configured retry delay.
Aborting a Retry Sequence
-------------------------

To prevent a waiting task from retrying, remove it from the scheduler's
To prevent a task from retrying, remove it from the scheduler's
:term:`active window`. For a task ``3/foo`` in workflow ``brew``:

.. code-block:: console
Expand All @@ -45,6 +45,7 @@ sequence, or remove it.
If you want trigger downstream tasks despite ``3/foo`` being removed before it
could succeed, use ``cylc set`` to artificially mark its ``succeeded``
output as complete (and with the ``--flow`` option, to make the :term:`flow`
continue on from there).
could succeed, use ``cylc set`` to artificially mark its
:term:`required outputs <required output>`
as complete (and with the ``--flow`` option, if needed to make a specific
:term:`flow` continue on from there).

0 comments on commit 347efa1

Please sign in to comment.