Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aa2399d
Adding tabs to the introduction page showing each UI type. Spotted/f…
samuel-denton Feb 4, 2026
465f46e
Added tabs to the into and found some placeholder images to work on f…
samuel-denton Feb 4, 2026
13b6832
Added a note explaining why R1 was swapped for P1 here.
samuel-denton Feb 4, 2026
4016765
This tip no longer applies due to conda adopting the Libmamba depende…
samuel-denton Mar 17, 2026
f41651c
Slight wording changes on the install instructions.
samuel-denton Mar 17, 2026
af9a92c
Fixed the order of 'The Three Approaches' in Consolidating Configurat…
samuel-denton Mar 17, 2026
7c2e36f
Further reorder of approaches on consolidation to match toc.
samuel-denton Mar 17, 2026
fb49049
Added proper images for the introduction page tabs showing GUI, TUI a…
samuel-denton Mar 18, 2026
609cff9
Trying to clarify what packages need installing depending on method.
samuel-denton Mar 18, 2026
a8572f0
Apply suggestion from @oliver-sanders
samuel-denton Apr 27, 2026
c9d07d0
Apply suggestion from @samuel-denton
samuel-denton Apr 27, 2026
3a5972d
Started re-organizing tutorials so they make sense in order.
samuel-denton Apr 28, 2026
e7ad72c
small layout improvements to tutorial diffs
samuel-denton Apr 30, 2026
9a16acf
Update jinja2.rst
samuel-denton May 6, 2026
f6affb5
Altered the jinja2 tutorial so the variable is used more than once.
samuel-denton May 6, 2026
5f29081
Wording change to tutorial
samuel-denton May 6, 2026
d0af77a
Update src/tutorial/introduction.rst
samuel-denton May 11, 2026
9b6a004
Re-worked the consolidation tutorials.
samuel-denton May 13, 2026
7f25cfb
Removed extra quote
samuel-denton May 22, 2026
ec2f4df
Reverted help text.
samuel-denton May 22, 2026
fd8f02b
Delete cylc-tools.png
samuel-denton May 22, 2026
24fd350
Increased image width in introduction.
samuel-denton May 22, 2026
9cd0717
Update introduction.rst
samuel-denton May 22, 2026
2b6a4e9
new cylc-cli image.
samuel-denton May 22, 2026
33eea11
Added comment to example
samuel-denton May 27, 2026
9c2d534
Changed order of some diff text
samuel-denton May 27, 2026
e91c81b
Removed redundant example
samuel-denton May 27, 2026
be7c9ad
Improved wording on recurrence terms
samuel-denton May 27, 2026
9a71138
Removed Jinja2 from comments in diff text
samuel-denton May 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/img/cylc-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 6 additions & 18 deletions src/installation.rst

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of small wording changes to clarify what is and is not installed via pip vs conda.

Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ Cylc runs on Unix-like systems including Linux and Mac OS.
Via Conda (recommended)
^^^^^^^^^^^^^^^^^^^^^^^

.. tip::

We recommend using Mamba to install Cylc.
Mamba (or Micromamba) can be used as
`a faster, drop-in replacement for the conda command
<https://mamba.readthedocs.io/en/latest/index.html>`_.
If using Conda, make sure to use the libmamba-solver by updating to
Conda 23.10 or using the `conda-libmamba-solver plugin for conda
<https://conda.github.io/conda-libmamba-solver/getting-started/>`_.
The classic conda environment solver may be too slow for a complex package
like Cylc.
Comment on lines -22 to -32

@samuel-denton samuel-denton Mar 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#916 (comment)

This tip is no longer relevant thanks to conda adopting the Libmamba dependency resolver



.. code-block:: sub

$ conda install -c conda-forge cylc-flow
Expand Down Expand Up @@ -67,7 +54,7 @@ Via Pip (+npm)
$ pip install cylc-rose metomi-rose

There are also certain optional extra requirements which you may choose to
install:
install (already included if installing via Conda):

.. code-block:: sub

Expand All @@ -92,15 +79,16 @@ Non-Python Requirements
.. _Graphviz: https://graphviz.org/download/
.. _configurable-http-proxy: https://anaconda.org/conda-forge/configurable-http-proxy

These dependencies are not installed by Conda or pip:
These dependencies are not installed by Conda or pip and may not be available on your
system by default:

* ``bash``
* GNU `coreutils`_
* ``ssh``
* ``rsync``
* ``mail`` (optional - for automated email functionality)

These dependencies are installed by Conda but not by pip:
The following dependencies are installed automatically by Conda but not by pip:

* `Graphviz`_ (optional - used by ``cylc graph`` for displaying workflow
graphs)
Expand Down Expand Up @@ -290,8 +278,8 @@ can be found: :ref:`UI_Server_config`.
Bash Profile
^^^^^^^^^^^^

Cylc :term:`job scripts <job script>` are bash scripts, which is good for
manipulating files and processes, They invoke ``bash -l`` to allow environment
Cylc :term:`job scripts <job script>` are bash scripts, which are good for
manipulating files and processes. They invoke ``bash -l`` to allow environment
configuration in login scripts.

.. warning::
Expand Down
3 changes: 1 addition & 2 deletions src/tutorial/furthertopics/clock-triggered-tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Paste the following code into a ``flow.cylc`` file:
[[[events]]]
mail events = failed
[[bell]]
script = printf 'bong%.02d\n' $(seq 1 $(cylc cyclepoint --print-hour))
script = printf 'bong%.02d\n' $(seq 1 $(cylc cyclepoint --print-hour)); sleep 5

@samuel-denton samuel-denton Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added sleep 5 to tutorial to allow users time to see the workflow running. A previous update to cylc sped up the running of this workflow significantly.


Change the initial cycle point to 00:00 this morning (e.g. if it was
the first of January 2000 we would write ``2000-01-01T00Z``).
Expand All @@ -78,7 +78,6 @@ Stop the workflow after a few cycles using ``cylc stop --now --now clock-trigger
Notice how the tasks run as soon as possible rather than
waiting for the actual time to be equal to the cycle point.


Clock-Triggering Tasks
----------------------

Expand Down
23 changes: 20 additions & 3 deletions src/tutorial/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,27 @@ Cylc can automatically:

Cylc provides a variety of command line and GUI tools for visualising,
monitoring, and controlling workflows. The Cylc TUI (Terminal
User Interface), web GUI, and ``cylc scan`` (bottom left) are shown below.
User Interface), web GUI, and ``cylc scan`` are shown below.

.. image:: /tutorial/img/cylc-tools.png
:alt: A screenshot of several Cylc tools.
.. tab-set::

.. tab-item:: GUI

.. image:: ../../src/img/cylc-ui-dash.png
:alt: A screenshot of the Cylc GUI dashboard.
:width: 75%

.. tab-item:: Tui

.. image:: ../../src/img/tui-1.png
:alt: A screenshot of the Cylc TUI.
:width: 75%

.. tab-item:: CLI

.. image:: ../../src/img/cylc-cli.png
:alt: A screenshot of the Cylc CLI.
:width: 75%

.. nextslide::

Expand Down
23 changes: 12 additions & 11 deletions src/tutorial/runtime/configuration-consolidation/families.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ The ``root`` Family

.. practical::

.. rubric:: This practical continues on from the
:ref:`jinja2 practical <cylc-tutorial-jinja2-practical>`.
.. rubric:: In this practical we will consolidate the configuration of the
:ref:`weather-forecasting workflow <tutorial-cylc-runtime-forecasting-workflow>`
from the previous section.

1. **Create A New Workflow.**

Expand All @@ -251,7 +252,7 @@ The ``root`` Family

.. code-block:: none

RESOLUTION = {{ RESOLUTION }}
RESOLUTION = 0.2
DOMAIN = -12,46,12,61 # Do not change!

Rather than manually adding them to each task individually we could put
Expand All @@ -266,7 +267,7 @@ The ``root`` Family
+ [[root]]
+ [[[environment]]]
+ # The dimensions of each grid cell in degrees.
+ RESOLUTION = {{ RESOLUTION }}
+ RESOLUTION = 0.2
+ # The area to generate forecasts for (lng1, lat1, lng2, lat2).
+ DOMAIN = -12,46,12,61 # Do not change!

Expand All @@ -276,23 +277,23 @@ The ``root`` Family
script = consolidate-observations
- [[[environment]]]
- # The dimensions of each grid cell in degrees.
- RESOLUTION = {{ RESOLUTION }}
- RESOLUTION = 0.2
- # The area to generate forecasts for (lng1, lat1, lng2, lat2).
- DOMAIN = -12,46,12,61 # Do not change!

[[get_rainfall]]
script = get-rainfall
[[[environment]]]
- [[[environment]]]
- # The dimensions of each grid cell in degrees.
- RESOLUTION = {{ RESOLUTION }}
- RESOLUTION = 0.2
- # The area to generate forecasts for (lng1, lat1, lng2, lat2).
- DOMAIN = -12,46,12,61 # Do not change!

[[forecast]]
script = forecast 60 5 # Generate 5 forecasts at 60 minute intervals.
[[[environment]]]
- # The dimensions of each grid cell in degrees.
- RESOLUTION = {{ RESOLUTION }}
- RESOLUTION = 0.2
- # The area to generate forecasts for (lng1, lat1, lng2, lat2)
- DOMAIN = -12,46,12,61 # Do not change!
# The path to the files containing wind data (the {variables} will
Expand All @@ -309,11 +310,11 @@ The ``root`` Family
MAP_TEMPLATE = "$CYLC_WORKFLOW_RUN_DIR/lib/template/map.html"

[[post_process_exeter]]
# Generate a forecast for Exeter 60 minutes into the future.
script = post-process exeter 60
# Generate a forecast for Exeter 300 minutes into the future.
script = post-process exeter 300
Comment on lines +272 to +273

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to match the change in the Jinja2 tutorial.

- [[[environment]]]
- # The dimensions of each grid cell in degrees.
- RESOLUTION = {{ RESOLUTION }}
- RESOLUTION = 0.2
- # The area to generate forecasts for (lng1, lat1, lng2, lat2).
- DOMAIN = -12,46,12,61 # Do not change!

Expand Down
10 changes: 6 additions & 4 deletions src/tutorial/runtime/configuration-consolidation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ structure of a workflow and avoid duplication.
.. toctree::
:maxdepth: 1

jinja2
families
jinja2
parameters


Expand Down Expand Up @@ -139,10 +139,12 @@ The Three Approaches
could use them to simplify the workflow from the previous tutorial. *Work
through them in order!*

* :ref:`families <tutorial-cylc-families>`
* :ref:`jinja2 <tutorial-cylc-jinja2>`
* :ref:`parameters <tutorial-cylc-parameterization>`
.. toctree::
:maxdepth: 1

families
jinja2
parameters

.. _cylc-tutorial-consolidation-conclusion:

Expand Down
66 changes: 33 additions & 33 deletions src/tutorial/runtime/configuration-consolidation/jinja2.rst
Comment thread
samuel-denton marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -165,57 +165,57 @@ This would result in:

.. ifslides::

Next section: :ref:`tutorial-cylc-families`
Next section: :ref:`tutorial-cylc-parameters`



.. _cylc-tutorial-jinja2-practical:

.. practical::

.. rubric:: In this practical we will consolidate the configuration of the
:ref:`weather-forecasting workflow <tutorial-cylc-runtime-forecasting-workflow>`
from the previous section.
.. rubric:: This practical continues on from the
:ref:`Families practical <cylc-tutorial-families-practical>`.

3. **Use Jinja2 To Avoid Duplication.**

The ``RESOLUTION`` environment variable is used by multiple tasks.
Rather than writing it out multiple times we will use Jinja2
to centralise this configuration.
We have seen how families can be used to avoid duplication in task definitions.
They are, however, limited to definitions, and only where properties exactly match.
In contrast, Jinja2 can be used in any part of a workflow, and can be used
for simple programmatic logic. Here, we will make use of Jinja2 for some
maths and string manipulation.

At the top of the :cylc:conf:`flow.cylc` file add the Jinja2 shebang line. Then
copy the value of the ``RESOLUTION`` environment variable and use it to
define an ``RESOLUTION`` Jinja2 variable:
At the top of the :cylc:conf:`flow.cylc` file you should see the Jinja2
shebang line has been included for you. Create some new Jinja2 variables
for ``FORECAST_LENGTH`` and ``FORECAST_COUNT```:
Comment thread
samuel-denton marked this conversation as resolved.
Outdated

.. code-block:: cylc

#!Jinja2
#!Jinja2

{% set RESOLUTION = 0.2 %}
{% set FORECAST_LENGTH = 60 %}
{% set FORECAST_COUNT = 5 %}

Next replace the key, where it appears in the workflow, with
``{{ RESOLUTION }}``:
Next replace the parameters for the forecast script within the ``forecast``
task with these variables:

.. code-block:: diff

[[get_rainfall]]
script = get-rainfall
[[[environment]]]
- RESOLUTION = 0.2
+ RESOLUTION = {{ RESOLUTION }}

[[forecast]]
script = forecast 60 5 # Generate 5 forecasts at 60 minute intervals.
[[[environment]]]
- RESOLUTION = 0.2
+ RESOLUTION = {{ RESOLUTION }}

[[post_process_exeter]]
# Generate a forecast for Exeter 60 minutes in the future.
script = post-process exeter 60
[[[environment]]]
- RESOLUTION = 0.2
+ RESOLUTION = {{ RESOLUTION }}
[[forecast]]
- script = forecast 60 5
Comment thread
samuel-denton marked this conversation as resolved.
Outdated
+ script = forecast {{ FORECAST_LENGTH }} {{ FORECAST_COUNT }}

Then, in the ``post-processing`` task, replace the timestep parameter for the
post-processing script with the a simple multiplication of the two variables.
You can also use Jinja2 within a comment allowing it to match the dynamic value:

.. code-block:: diff

[[post_process_exeter]]
- # Generate a forecast for Exeter 300 minutes in the future.
- script = post-process exeter 300
+ # Generate a forecast {{ FORECAST_LENGTH * FORECAST_COUNT }} minutes in the future.
+ script = post-process exeter {{ FORECAST_LENGTH * FORECAST_COUNT }}

Check the result with ``cylc config``. The Jinja2 will be processed
so you should not see any difference after making these changes.
so you should not see any difference after making these changes, other than
the MAP_FILE filename now including the resolution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the filename change is no longer present in the PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep... I've changed this text so many times now I'm loosing track!

11 changes: 6 additions & 5 deletions src/tutorial/runtime/configuration-consolidation/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Parameters can be either strings or integers:
.. ifslides::

.. rubric:: This practical continues on from the
:ref:`Families practical <cylc-tutorial-families-practical>`.
:ref:`Jinja2 practical <cylc-tutorial-jinja2-practical>`.

Next section: :ref:`Which approach to use
<cylc-tutorial-consolidation-conclusion>`
Comment on lines 182 to 188

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's currently inconsistent which pages make use of the ifslides / ifnotslides blocks. Are these still used for anything? I understood they were previously used for allowing the docs to generate in other formats but not sure if anything still uses them @oliver-sanders ? I can make an effort to clean them up if not, or add any missing if they are need. The JinJa2 page for example is missing some compared to the parametrization or families pages.

Expand Down Expand Up @@ -314,7 +314,7 @@ Parameters can be either strings or integers:

[task parameters]
station = aldergrove, camborne, heathrow, shetland
+ site = exeter, edinburgh
+ site = exeter, edinburgh

Next we parameterize the task in the graph:

Expand All @@ -330,6 +330,7 @@ Parameters can be either strings or integers:

-[[post_process_exeter]]
+[[post_process<site>]]
# Generate a forecast for Exeter 60 minutes in the future.
- script = post-process exeter 60
+ script = post-process $CYLC_TASK_PARAM_site 60
- # Generate a forecast for Exeter 300 minutes in the future.
- script = post-process exeter 300
+ # Generate a forecast {{ FORECAST_LENGTH * FORECAST_COUNT }} minutes in the future for <site>
+ script = post-process $CYLC_TASK_PARAM_site {{ FORECAST_LENGTH * FORECAST_COUNT }}
Comment thread
samuel-denton marked this conversation as resolved.
Outdated
3 changes: 2 additions & 1 deletion src/tutorial/scheduling/integer-cycling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ To make a workflow repeat we must tell Cylc three things:
* ``initial cycle point = 1`` tells Cylc to start counting cycle points
from 1.
* ``P1`` is the :term:`recurrence`; a ``P1`` :term:`graph string`
repeats at every integer :term:`cycle point`.
tells Cylc to repeat at every integer :term:`cycle point`
Comment thread
MetRonnie marked this conversation as resolved.
Outdated
(whereas ``R1`` means "run once").
Comment thread
samuel-denton marked this conversation as resolved.
Outdated

The first three :term:`cycles<cycle>` look like this, with the entire
workflow repeated at each cycle point:
Expand Down
2 changes: 1 addition & 1 deletion src/user-guide/interventions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Re-Run Multiple Tasks
:width: 75%

.. tab-item:: CLI
:sync: gui
:sync: cli

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small mistake here caused tabs to sync incorrectly.


.. code-block:: console

Expand Down
Loading