From 32e94844ff0fd91e2886b5b6e9d10f26f349384f Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 19 Dec 2024 08:56:50 +0000 Subject: [PATCH 1/4] macros and core rose-stem --- source/Reviewers/howtocommit.rst | 6 ++++- .../TestSuites/lfric_core.rst | 24 +++++-------------- source/WorkingPractices/macros.rst | 6 +++++ 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/source/Reviewers/howtocommit.rst b/source/Reviewers/howtocommit.rst index f868b32..6ac6fdb 100644 --- a/source/Reviewers/howtocommit.rst +++ b/source/Reviewers/howtocommit.rst @@ -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 .. tab-item:: UM docs diff --git a/source/WorkingPractices/TestSuites/lfric_core.rst b/source/WorkingPractices/TestSuites/lfric_core.rst index 2127771..9cc294f 100644 --- a/source/WorkingPractices/TestSuites/lfric_core.rst +++ b/source/WorkingPractices/TestSuites/lfric_core.rst @@ -3,11 +3,12 @@ Testing LFRic Core ================== -LFRic testing is run with the following command from a working copy: +LFRic testing is now Cylc8 only and launched with rose-stem commands: .. code-block:: - make test-suite + rose stem --group=developer + cylc play ----- @@ -16,24 +17,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. +only some applications. This can be done by changing the group you run, eg ``--group=simple_diffusion``. -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: +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). -.. code-block:: - - 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:: - - 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``. .. tip:: diff --git a/source/WorkingPractices/macros.rst b/source/WorkingPractices/macros.rst index a7174dc..62b00c4 100644 --- a/source/WorkingPractices/macros.rst +++ b/source/WorkingPractices/macros.rst @@ -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. + 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. @@ -114,6 +118,8 @@ To add upgrade macros to LFRic the following steps can be followed: .. code-block:: + export CYLC_VERSION=8 # (if required) + SimSys_Scripts/lfric_macros/apply_macros.py vnXX.Y_tTTTT -a Apps -c Core -j Jules .. important:: From 0a7cd0ce3188365715fec1f14b97f11b3eb43eb3 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:41:11 +0000 Subject: [PATCH 2/4] Update source/WorkingPractices/macros.rst Co-authored-by: Jenny Hickson <61183013+jennyhickson@users.noreply.github.com> --- source/WorkingPractices/macros.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WorkingPractices/macros.rst b/source/WorkingPractices/macros.rst index 62b00c4..f438350 100644 --- a/source/WorkingPractices/macros.rst +++ b/source/WorkingPractices/macros.rst @@ -118,7 +118,7 @@ To add upgrade macros to LFRic the following steps can be followed: .. code-block:: - export CYLC_VERSION=8 # (if required) + export CYLC_VERSION=8 SimSys_Scripts/lfric_macros/apply_macros.py vnXX.Y_tTTTT -a Apps -c Core -j Jules From 2c2afa4d7df1fa6b114f7a861851cb65dd1e2caa Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 19 Dec 2024 09:41:53 +0000 Subject: [PATCH 3/4] review changes --- source/WorkingPractices/TestSuites/lfric_core.rst | 7 ++++++- source/WorkingPractices/macros.rst | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/WorkingPractices/TestSuites/lfric_core.rst b/source/WorkingPractices/TestSuites/lfric_core.rst index 9cc294f..550ecbb 100644 --- a/source/WorkingPractices/TestSuites/lfric_core.rst +++ b/source/WorkingPractices/TestSuites/lfric_core.rst @@ -3,10 +3,15 @@ Testing LFRic Core ================== -LFRic testing is now Cylc8 only and launched with rose-stem commands: +.. tip:: + + 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:: + export CYLC_VERSION=8 rose stem --group=developer cylc play diff --git a/source/WorkingPractices/macros.rst b/source/WorkingPractices/macros.rst index 62b00c4..92546ad 100644 --- a/source/WorkingPractices/macros.rst +++ b/source/WorkingPractices/macros.rst @@ -94,7 +94,7 @@ To solve this, macros in LFRic Apps are applied using a wrapper script which wil .. 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. + 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. From b89899787f838a449b499ec04fbb69c9c2bf79ed Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 19 Dec 2024 09:42:45 +0000 Subject: [PATCH 4/4] change tip to note --- source/WorkingPractices/TestSuites/lfric_core.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WorkingPractices/TestSuites/lfric_core.rst b/source/WorkingPractices/TestSuites/lfric_core.rst index 550ecbb..c750838 100644 --- a/source/WorkingPractices/TestSuites/lfric_core.rst +++ b/source/WorkingPractices/TestSuites/lfric_core.rst @@ -3,7 +3,7 @@ Testing LFRic Core ================== -.. tip:: +.. 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.