Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include a description of WORKFLOW_SHARE_DIR/bin and lib/python #609

Merged
merged 13 commits into from
Jun 6, 2023
Merged
6 changes: 6 additions & 0 deletions src/user-guide/installing-workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,12 @@ The run directory now looks as follows:
│ └── <time-stamp>-reinstall.log
└── .service

.. note::

wxtim marked this conversation as resolved.
Show resolved Hide resolved
If your workflow needs to create or install scripts or executables at runtime
and you don't want Cylc to delete them on re-installation, you can use
``bin`` and ``lib/python`` directories in the :ref:` workflow share directory <workflow_share_directories>`.


Expected Errors
---------------
Expand Down
6 changes: 6 additions & 0 deletions src/user-guide/writing-workflows/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ Other files and folders may be placed in the :term:`source directory` too:
documentation, configuration files, etc. When the workflow is :ref:`installed
<Installing-workflows>` these will be copied over to the :term:`run directory`.

.. note::

If your workflow needs to create or install scripts or executables at runtime
and you don't want Cylc to delete them on re-installation, you can use
equivalent directories in the :ref:`workflow_share_directories`.


.. _SyntaxHighlighting:

Expand Down
18 changes: 18 additions & 0 deletions src/user-guide/writing-workflows/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ exported to subshells:
# relative to the workflow work directory


.. _workflow_share_directories:

Workflow Share Directories
^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -317,6 +319,22 @@ output files are typically held in cycle point sub-directories of this.
The top level share directory location can be changed, e.g. to a large data
area, by global config settings under :cylc:conf:`global.cylc[install][symlink dirs]`.

If your workflow creates or installs executables or Python libraries
as it is running, these can be placed in:

* ``share/bin/`` - for executables. This location is automatically added to ``PATH``
(before the top-level ``bin/`` in the run dir).
* ``share/lib/python/`` - for Python modules. This location is automatically added
to ``PYTHONPATH`` (before the top-level ``lib/python/`` in the run dir).

.. note::

Cylc will not create these folders.

.. seealso::

:ref:`Top level "bin/" and "lib/python/" directories <WorkflowDefinitionDirectories>`.


Task Work Directories
^^^^^^^^^^^^^^^^^^^^^
Expand Down