Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/7-to-8/cheat-sheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ Datetime operations in task scripts:
# equivalent to:
isodatetime "$CYLC_TASK_CYCLE_POINT"


Rose Stem
---------

Expand Down
10 changes: 5 additions & 5 deletions src/7-to-8/major-changes/compatibility-mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ You might have a task script that calls a Cylc command like so:
The ``cylc hold`` command has changed in Cylc 8. It is now used for holding
tasks only; use ``cylc pause`` for entire workflows.
(Additionally, ``$CYLC_SUITE_NAME`` is deprecated in favour of
``$CYLC_WORKFLOW_ID``, though still supported.)
:envvar:`CYLC_WORKFLOW_ID`, though still supported.)

In order to make this interoperable, so that you can run it with both Cylc 7
and Cylc 8 backward compatibility mode, you could do something like this
Expand All @@ -205,8 +205,8 @@ in the bash script:
fi
"""

Note this logic (and the ``$CYLC_VERSION`` environment variable) is executed
at runtime on the :term:`job host`.
Note this logic (and the :envvar:`CYLC_VERSION` environment variable) is
executed at runtime on the :term:`job host`.

Alternatively, you could use :ref:`Jinja` like so:

Expand All @@ -220,8 +220,8 @@ Alternatively, you could use :ref:`Jinja` like so:
script = cylc hold "$CYLC_SUITE_NAME"
{% endif %}

Note this logic (and the ``CYLC_VERSION`` Jinja2 variable) is executed locally
prior to Cylc parsing the workflow configuration.
Note this logic (and the :envvar:`CYLC_VERSION` Jinja2 variable) is executed
locally prior to Cylc parsing the workflow configuration.


Renaming to ``flow.cylc``
Expand Down
18 changes: 9 additions & 9 deletions src/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Glossary
state>` once the final try fails.

The task try number increments with every automatic retry, and is
passed to the job environment as ``$CYLC_TASK_TRY_NUMBER``.
passed to the job environment as :envvar:`CYLC_TASK_TRY_NUMBER`.

.. seealso::

Expand All @@ -63,7 +63,7 @@ Glossary
task submit number
Every time a task re-runs, whether by automatic :term:`retry` or manual
triggering, its submit number increments. It is passed to
the job environment as ``$CYLC_TASK_SUBMIT_NUMBER``.
the job environment as :envvar:`CYLC_TASK_SUBMIT_NUMBER`.

Submit number also appears in the job log path so that job log files
don't get overwritten.
Expand Down Expand Up @@ -159,8 +159,8 @@ Glossary
The workflow name is a path relative to the cylc-run directory which
contains one or more workflow :term:`run directories <run directory>`.

Tasks can get the workflow name from ``$CYLC_WORKFLOW_NAME`` in their
runtime environment.
Tasks can get the workflow name from :envvar:`CYLC_WORKFLOW_NAME` in
their runtime environment.

Unlike :term:`workflow id` the name is not always a unique identifier. In
the example below ``run1`` and ``run2`` would both have the same name,
Expand Down Expand Up @@ -742,8 +742,8 @@ Glossary
<run-directory>/work/<cycle-point>/<task-name>

Tasks can get their own work directory path at runtime from
the ``CYLC_TASK_WORK_DIR`` environment variable or the Posix ``pwd``
command.
the :envvar:`CYLC_TASK_WORK_DIR` environment variable or the Posix
``pwd`` command.

.. seealso::

Expand All @@ -761,7 +761,7 @@ Glossary
<run-directory>/share

Tasks can get their own share directory path at runtime from
the ``CYLC_WORKFLOW_SHARE_DIR`` environment variable.
the :envvar:`CYLC_WORKFLOW_SHARE_DIR` environment variable.

In cycling workflows files are typically stored in cycle point
sub-directories of the share directory.
Expand Down Expand Up @@ -1122,7 +1122,7 @@ Glossary
:term:`installed <install>` configuration used to run a :term:`workflow`.

At runtime, task :term:`jobs <job>` can get their workflow run
directory from the environment variable ``CYLC_WORKFLOW_RUN_DIR``.
directory from the environment variable :envvar:`CYLC_WORKFLOW_RUN_DIR`.

.. seealso::

Expand Down Expand Up @@ -1702,7 +1702,7 @@ Glossary
Flow numbers are integers passed down from parent task to child task in
the :term:`graph` as a flow progresses, to identify which :term:`flow`
(or flows) the tasks belong to. They are passed to job environments as
``$CYLC_TASK_FLOW_NUMBERS``.
:envvar:`CYLC_TASK_FLOW_NUMBERS`.


flow front
Expand Down
10 changes: 7 additions & 3 deletions src/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,19 @@ You may need to modify this file for your local installation e.g:

.. note::

Developers can set ``$CYLC_HOME_ROOT_ALT`` to point
Developers can set :envvar:`CYLC_HOME_ROOT_ALT` to point
to their development environments. For example:

.. code-block:: bash

CYLC_HOME_ROOT_ALT=${HOME}/.conda/envs

You may wish to use the same approach for the ``isodatetime`` command, and, if using
`Rose`_ for the ``rose`` and ``rosie`` commands.
.. seealso::

:ref:`reference.wrapper_script_environment_variables`

You may wish to use the same approach for the ``isodatetime`` command, and, if
using `Rose`_ for the ``rose`` and ``rosie`` commands.

To do so create a symbolic link to the wrapper, for each of these commands:

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/xtriggers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Xtrigger Plugins

Xtrigger plugins allow you to install and use
:ref:`xtriggers <Section External Triggers>` without them being
in ``<workflow-dir>/lib/python/`` or ``$CYLC_PYTHONPATH``.
in ``<workflow-dir>/lib/python/`` or :envvar:`CYLC_PYTHONPATH`.

.. seealso::

Expand Down
4 changes: 3 additions & 1 deletion src/reference/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -759,13 +759,15 @@ from that workflow. Note that this only applies per browser session.
.. image:: changes/ui-workspace-tabs.gif
:width: 100%

.. _changes.CYLC_PYTHONPATH:

Cylc ignores ``$PYTHONPATH``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Cylc now ignores ``$PYTHONPATH`` to make it more robust to task
environments which set this value. If you want to add to the Cylc
environment itself, e.g. to install a Cylc extension,
use a custom xtrigger, or event handler use ``$CYLC_PYTHONPATH``.
use a custom xtrigger, or event handler use :envvar:`CYLC_PYTHONPATH`.

Upgrade To The Latest Jupyter Releases
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion src/reference/config/ui-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Cylc UI Server can be configured using a ``jupyter_config.py``.

Site level configuration, such as ``c.CylcUIServer.site_authorization`` should
be defined in ``/etc/cylc/uiserver/jupyter_config.py``, or, alternatively, the
environment variable ``CYLC_SITE_CONF_PATH``.
environment variable :envvar:`CYLC_SITE_CONF_PATH`.
User level configuration should be located in ``~/.cylc/uiserver/jupyter_config.py``.

.. automodule:: cylc.uiserver.app
Expand Down
Loading
Loading