Skip to content

Commit

Permalink
Merge pull request #776 from oliver-sanders/empy
Browse files Browse the repository at this point in the history
remove empy support
  • Loading branch information
wxtim authored Dec 3, 2024
2 parents f003d16 + c2de328 commit 9107fdb
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 137 deletions.
2 changes: 1 addition & 1 deletion src/7-to-8/major-changes/compatibility-mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ See :ref:`below <compat.eg.c7val>` for an example.

``cylc validate`` operates on the processed ``suite.rc``, which
means it will not detect any deprecated syntax that is inside a
currently-unused Jinja2/EmPy ``if...else`` branch.
currently-unused Jinja2 ``if...else`` branch.

Some workflows may require modifications to either upgrade to Cylc 8 or make
interoperable with Cylc 8 backward compatibility mode. Read on for more details.
Expand Down
2 changes: 1 addition & 1 deletion src/7-to-8/major-changes/config-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The old configurations are now deprecated, but still supported.
These will be highlighted upon ``cylc validate`` after renaming ``suite.rc``
to ``flow.cylc``.

Because some workflows use Jinja2 or EmPy branches which may not be switched on at
Because some workflows use Jinja2 branches which may not be switched on at
the time of the initial ``cylc validate`` we have also provided
a script, :ref:`cylc lint -r 728 <cylc_lint_script>` to check for Cylc 7
syntax which may be deprecated.
Expand Down
8 changes: 4 additions & 4 deletions src/7-to-8/major-changes/template-vars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Template Variables
Read this section if you set Cylc template variables on the command line
using the ``-s``, ``--set`` or ``-set-file`` options.

This does *not* affect the Rose ``jinja2:suite.rc`` and
``empy:suite.rc`` variables set using the ``-S`` option to the
This does *not* affect the Rose ``jinja2:suite.rc``
variables set using the ``-S`` option to the
``rose suite-run`` command.


Overview
--------

Template variables are passed to :ref:`Jinja2 <Jinja>` or
:ref:`EmPy <User Guide EmPy>` for parsing the workflow definition in the
Template variables are passed to :ref:`Jinja2 <Jinja>`
for parsing the workflow definition in the
:cylc:conf:`flow.cylc` file.

In Cylc 7 template variables could only be strings, in Cylc 8 they can be any
Expand Down
2 changes: 0 additions & 2 deletions src/dictionaries/proper_nouns
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Conda
Cylc
cylc
Datapoint
Empy
EmPy
Exeter
Gantt
Gedit
Expand Down
3 changes: 1 addition & 2 deletions src/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1266,8 +1266,7 @@ Glossary
tasks.

Other ways of consolidating configuration include :term:`runtime
inheritance` and templating with :ref:`Jinja2 <Jinja>` or :ref:`Empy
<User Guide Empy>`.
inheritance` and templating with :ref:`Jinja2 <Jinja>`.

.. code-block:: cylc
Expand Down
1 change: 0 additions & 1 deletion src/hyperlinks.rst.include
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
.. _Cylc Discourse Forum (7-to-8 topic): https://cylc.discourse.group/c/cylc/7-to-8/13
.. _DataPoint: https://www.metoffice.gov.uk/services/data/datapoint
.. _Discourse: https://cylc.discourse.group/
.. _EmPy: https://pypi.org/project/empy/
.. _FCM User Guide: http://metomi.github.io/fcm/doc/user_guide/
.. _FCM: https://metomi.github.io/fcm/doc/
.. _INI: https://en.wikipedia.org/wiki/INI_file
Expand Down
3 changes: 0 additions & 3 deletions src/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ install:

.. code-block:: sub
# EmPy support
$ pip install 'cylc-flow[empy]'
# Support for running the tutorial workflows
$ pip install 'cylc-flow[tutorial]'
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ following keys:
A dictionary of environment variables to be exported to the scheduler
environment.
``template_variables``
A dictionary of template variables to be used by Jinja2 or EmPy when
A dictionary of template variables to be used by Jinja2 when
templating the workflow configuration files.
``templating_detected``
``jinja2`` | ``empy`` to be used when templating. N.b: This will result in
``jinja2`` to be used when templating. N.b: This will result in
failure if the templating language set does not match the shebang line of
the ``flow.cylc`` file.

Expand Down
22 changes: 22 additions & 0 deletions src/reference/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@ For more detail see the component changelogs:

----------


Cylc 8.4
--------

.. TODO - fix before release
.. admonition:: Cylc Components
:class: hint
:cylc-flow: `8.3 <https://github.com/cylc/cylc-flow/blob/master/CHANGES.md>`__
:cylc-ui: `2.5 <https://github.com/cylc/cylc-ui/blob/master/CHANGES.md>`__
:cylc-uiserver: `1.5 <https://github.com/cylc/cylc-uiserver/blob/master/CHANGES.md>`__
:cylc-rose: `1.4 <https://github.com/cylc/cylc-rose/blob/master/CHANGES.md>`__
:rose: `2.3 <https://github.com/metomi/rose/blob/master/CHANGES.md>`__
EmPy Support Removed
^^^^^^^^^^^^^^^^^^^^

Support for the EmPy template processor (an alternative to Jinja2) has been
removed.


Cylc 8.3
--------

Expand Down
2 changes: 1 addition & 1 deletion src/user-guide/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ workflows:
``cylc view``
Prints workflow configurations before full parsing by Cylc. This
can include :ref:`Jinja2 <troubleshooting.jinja2>` (use ``-j``)
or Empy template processing.
processing.

Include files can be inlined (use ``-i``).

Expand Down
11 changes: 5 additions & 6 deletions src/user-guide/writing-workflows/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ The configurations you can use are documented in :ref:`workflow-configuration`.

.. _template processors: https://en.wikipedia.org/wiki/Template_processor

Cylc also supports two `template processors`_ for use in the ``flow.cylc`` file:

* `Jinja2`_
* `EmPy`_
Cylc also supports the `Jinja2`_
`template processor <https://en.wikipedia.org/wiki/Template_processor>`_
for use in the `flow.cylc` file.


.. _WorkflowDefinitionDirectories:
Expand Down Expand Up @@ -70,12 +69,12 @@ Understanding Code in Workflow Configurations
A workflow configuration is not executable code. It configures the scheduler
program to run your workflow. A `flow.cylc` file may contain:

- Embedded Python-like Jinja2 or EmPy templating code, such as
- Embedded Python-like Jinja2 templating code, such as
``{% set PLANET = "earth" %}``
- Bash shell variable assignments and scripting, such as
``script = "run-model.exe /path/to/data"``

Jinja2 (or EmPy) templating code gets executed as a preprocessing step, to
Jinja2 templating code gets executed as a preprocessing step, to
programmatically generate the workflow configuration for the scheduler.
To see the result after template processing:

Expand Down
58 changes: 0 additions & 58 deletions src/user-guide/writing-workflows/empy.rst

This file was deleted.

1 change: 0 additions & 1 deletion src/user-guide/writing-workflows/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Writing Workflows
runtime
parameterized-tasks
jinja2
empy
external-triggers
suicide-triggers
scheduler
4 changes: 2 additions & 2 deletions src/user-guide/writing-workflows/parameterized-tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ values. Uses for this include:

.. note::

Cylc supports use of :ref:`Jinja2 <User Guide Jinja2>` and :ref:`Empy
<User Guide Empy>` templating for programmatic generation of workflow
Cylc supports use of :ref:`Jinja2 <User Guide Jinja2>`
templating for programmatic generation of workflow
configurations. The built-in parameterization system described here
is a cleaner and easier alternative *for generating tasks and families
over a range of parameters*, but unlike general templating it can only be
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 @@ -105,7 +105,7 @@ task-specific settings.
.. note::

:ref:`Task parameters <User Guide Param>` or template processing (see
:ref:`User Guide Jinja2` and :ref:`User Guide EmPy`) can be used to
:ref:`User Guide Jinja2`) can be used to
programmatically generate family members and associated dependencies.


Expand Down
52 changes: 0 additions & 52 deletions src/workflows/empy/cities/flow.cylc

This file was deleted.

0 comments on commit 9107fdb

Please sign in to comment.