Skip to content

Commit

Permalink
macros and core rose-stem (#291)
Browse files Browse the repository at this point in the history
Co-authored-by: Jenny Hickson <61183013+jennyhickson@users.noreply.github.com>
  • Loading branch information
james-bruten-mo and jennyhickson authored Dec 19, 2024
1 parent 647988c commit 79451cd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
6 changes: 5 additions & 1 deletion source/Reviewers/howtocommit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ are no clashes with what else has gone on trunk.

.. code-block::
make test-suite
export CYLC_VERSION=8
rose stem --group=developer
cylc play <working copy name>
.. tab-item:: UM docs

Expand Down
29 changes: 11 additions & 18 deletions source/WorkingPractices/TestSuites/lfric_core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
Testing LFRic Core
==================

LFRic testing is run with the following command from a working copy:
.. note::

At the LFRic Apps vn2.0 release, the cylc7 LFRic Core suite was deprecated and the make test-suite functionality removed. Only the cylc8 suite is now maintained.

LFRic testing is launched with Cylc8 rose-stem commands (as in eg. LFRic Apps):

.. code-block::
make test-suite
export CYLC_VERSION=8
rose stem --group=developer
cylc play <NAME-OF-SUITE>
-----

Expand All @@ -16,24 +22,11 @@ that the system level developer tests pass on all the applications. These are
launched from make and utilise rose and cylc.

While developing your change, for expediency you may want to run the tests for
only some applications. This can be done by going into the directory of the
application before running the above command.

By default the command will run the develop test; other test groups exist.
In particular, you need to be confident that the nightly tests pass. These can
be run as follows:

.. code-block::
only some applications. This can be done by changing the group you run, eg ``--group=simple_diffusion``.

make test-suite SUITE_GROUP=nightly
It is also possible to select the platform to run on. Available options include
``meto-spice``, ``meto-xc40`` and ``meto-xcs``.

.. code-block::
The command above will launch the developer suite. You can include slightly more testing if required by running ``--group=all`` instead (this includes the developer suite).

make test-suite TEST_SUITE_TARGETS="meto-spice meto-xcs"
It is also possible to run on a single platform, eg. ``--group=ex1a``. To select which meto EX machine is used, add ``-S USE_EX<AB/CD/Z>``.

.. tip::

Expand Down
6 changes: 6 additions & 0 deletions source/WorkingPractices/macros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ The organisation of LFRic metadata is different from other repositories (UM + Ju

To solve this, macros in LFRic Apps are applied using a wrapper script which will read the added macros and combine them into the versions.py files for the apps where that metadata is imported. Therefore when adding macros, the macro should be added in the versions.py file in the same metadata directory as the metadata change being made. It will then be shared as appropriate by the ``apply_macros.py`` script.

.. tip::

The macro will only end up in versions.py files for metadata that is directly imported by a rose-stem app. Therefore if adding to eg. Science/gungho, the macro will be deleted from that file by the script. In this case ensure you are ready for the macros to be deleted, eg. commit all changes.

For example, if a change to metadata is made in ``science/gungho/rose-meta/lfric-gungho``, the macro should be added to the ``versions.py`` file in that directory. This will then be copied to other ``versions.py`` files that import gungho metadata, eg. lfric_atm, transport etc.

It is expected that all metadata changes in LFRic Core will require change to the rose-apps in LFRic Apps, but changes to Apps must not affect Core. Therefore, the apply_macros script requires a working copy of LFRic Apps to work, but will source it's own copy of Core if required. If your only changes are to LFRic Core metadata, then you will require a linked LFRic Apps ticket and test branch, but potentially not a development branch.
Expand All @@ -114,6 +118,8 @@ To add upgrade macros to LFRic the following steps can be followed:

.. code-block::
export CYLC_VERSION=8
SimSys_Scripts/lfric_macros/apply_macros.py vnXX.Y_tTTTT -a Apps -c Core -j Jules
.. important::
Expand Down

0 comments on commit 79451cd

Please sign in to comment.