Skip to content

Commit

Permalink
added note about PYTHONPATH & CYLC_PYTHONPATH (#665)
Browse files Browse the repository at this point in the history
added note about PYTHONPATH & CYLC_PYTHONPATH

---------

Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
  • Loading branch information
wxtim and MetRonnie authored Nov 15, 2023
1 parent 6d2e882 commit 83d8b53
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/reference/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ Cylc 8.3.0
:cylc-uiserver: `1.4 <https://github.com/cylc/cylc-uiserver/blob/1.4.x/CHANGES.md>`__
:cylc-rose: `1.4 <https://github.com/cylc/cylc-rose/blob/1.4.x/CHANGES.md>`__

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``.


Upgrade To The Latest Jupyter Releases
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -156,11 +164,11 @@ Combined Commands

Two new commands have been added as short-cuts for common working patterns:

``cylc vip``
``cylc vip``
Validate, install and plays a workflow, equivalent to:

.. code-block:: bash
cylc validate <path>
cylc install <path>
cylc play <id>
Expand Down
2 changes: 1 addition & 1 deletion src/user-guide/writing-workflows/external-triggers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ properties:
- they can be located either:

- in ``<workflow-dir>/lib/python/``;
- or anywhere in your Python library path.
- or anywhere in your ``$CYLC_PYTHONPATH``.

- they can take arbitrary positional and keyword arguments
- workflow and task identity, and cycle point, can be passed to trigger
Expand Down
2 changes: 1 addition & 1 deletion src/user-guide/writing-workflows/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ 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).
to ``$PYTHONPATH`` (before the top-level ``lib/python/`` in the run dir).

.. note::

Expand Down
6 changes: 6 additions & 0 deletions src/user-guide/writing-workflows/scheduler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ when a workflow is started:
[[events]]
startup handlers = my-handler %(workflow)s %(host) %(port)
.. note::

If you wish to use custom Python Libraries in an event handler you
need to add these to ``CYLC_PYTHONPATH`` rather than ``PYTHONPATH``.

.. _workflow_event_template_variables:

Workflow Event Template Variables
Expand Down

0 comments on commit 83d8b53

Please sign in to comment.