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

Add how to add a recipe documentation #3614

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1f52310
#3074: First draft of adding recipe documentation.
mo-gill May 23, 2024
cbe5a9c
#3074: Add process resource instructions.
mo-gill May 24, 2024
3c6bc26
#3074: Fix project title due to visual overlap.
mo-gill May 24, 2024
06f79f2
#3074: Corrections to documentation.
mo-gill May 27, 2024
8c82530
#3074: Add pydata sphinx theme to environment.
mo-gill May 27, 2024
fd81290
Merge branch 'recipe_test_workflow_prototype' into 3074_create_how_to…
mo-gill May 28, 2024
b0ad4cc
#3074: Remove criteria and specify naming convention.
mo-gill May 28, 2024
d3f1c3f
#3074: Correction to please note section.
mo-gill May 28, 2024
829f3da
#3074: Correction of run folder and formatting directions.
mo-gill May 28, 2024
8aa23fa
#3074: Correction to docs on adding recipes to tested_recipes.rst
mo-gill May 28, 2024
936368c
#3074: Change unordered to ordered list.
mo-gill May 28, 2024
047a480
#3074: Changing order of steps.
mo-gill May 29, 2024
1f0f27e
#3074: Attempting to amend steps of docs.
mo-gill May 29, 2024
b0ea76e
#3074: Recorrect order.
mo-gill May 29, 2024
36be254
#3074: Re-add please note section and alter last points.
mo-gill May 29, 2024
c3902e4
:3074: Improve formatting.
mo-gill May 29, 2024
9af34bf
#3074: further adjustments to docs.
mo-gill May 29, 2024
c4ad8d3
#3074: Add details about mem/time usage in docs.
mo-gill Jun 4, 2024
9f8d5da
#3074: Reword and reformat docs.
mo-gill Jun 4, 2024
13db053
#3074: correction of example command.
mo-gill Jun 4, 2024
8cc5e53
#3074: Amend docs.
mo-gill Jun 4, 2024
0cd3f91
#3074: Change some commands in docs into a sub-list.
mo-gill Jun 4, 2024
d236a32
#3074: Improve docs.
mo-gill Jun 4, 2024
f89dc7e
#3074: Resole merge conflicts by removing rtw env files.
mo-gill Jun 18, 2024
d01a94f
#3074: Documentation amendments.
mo-gill Jun 18, 2024
2be0d9c
#3074: Add to docs regarding execution limits.
mo-gill Jun 18, 2024
8c9f0e1
#3074: Correction of formatting in docs.
mo-gill Jun 18, 2024
f341fe1
#3074: Correct indentation.
mo-gill Jun 18, 2024
615b4a2
#3074: Move adding_a_recipe out of user guide.
mo-gill Jun 18, 2024
7e4c985
#3074: Make wording more specific.
mo-gill Jun 18, 2024
59991c3
#3074: Fix failing doc build.
mo-gill Jun 18, 2024
d29e76c
#3074: Add step to create branch and open issue.
mo-gill Jun 18, 2024
5569fb0
#3074: Add guidance on recipe names in flow.cylc.
mo-gill Jun 19, 2024
ac585d2
#3074: Add command to run RTW to docs.
mo-gill Jun 19, 2024
7b466c9
#3074: Attempt to correct indentation.
mo-gill Jun 19, 2024
404b0f8
#3074: Another attempt to fix indentation.
mo-gill Jun 19, 2024
a648f6a
#3074: Fixed sub bullet points.
mo-gill Jun 19, 2024
cd4d187
#3074: Correction to run RTW sentence.
mo-gill Jun 19, 2024
d9c4fc2
#3074: Add KGO documentation.
mo-gill Jun 19, 2024
0c4c284
#3074: Fix quotation of bullets.
mo-gill Jun 20, 2024
f707f0d
#3074: Use rst admonition.
mo-gill Jun 21, 2024
43c65f0
#3074: Add more admonitions.
mo-gill Jun 21, 2024
407017b
#3074: Correct cylc stop commands.
mo-gill Jun 21, 2024
18837ab
#3074: Add link to quick start guide.
mo-gill Jun 21, 2024
e26261b
#3074: Amend copy output instructions.
mo-gill Jun 21, 2024
a2d7dab
#3074: Consolidate enable write permissions instruction.
mo-gill Jun 21, 2024
2758b15
#3074: Add another link to quick start guide.
mo-gill Jun 21, 2024
90f970c
#3074: Add two sub-bullets.
mo-gill Jun 21, 2024
f14ea6c
#3074: amend KGO section in glossary.
mo-gill Jun 21, 2024
d302e86
#3074: Add example issue links.
mo-gill Jun 24, 2024
8863f6b
#3074: Restore compare task sentence.
mo-gill Jun 24, 2024
4cd1e16
#3074: Fix sentence.
mo-gill Jun 24, 2024
91384c9
#3074: Use reference-style links and add comment.
mo-gill Jun 24, 2024
63b93a1
#3074: Add to final instruction.
mo-gill Jun 24, 2024
50a6ecc
#3074: Rename referenced links.
mo-gill Jun 24, 2024
e9aae27
#3074: Remove comment about URLs.
mo-gill Jun 25, 2024
433e0b6
#3074: Hopefully final formatting changes to documentation
ehogan Jun 25, 2024
545ff13
#3074: Rename rst file
ehogan Jun 25, 2024
db84f25
#3074: Update index.rst to use the newly named rst file
ehogan Jun 25, 2024
23ce8d0
Merge branch 'recipe_test_workflow_prototype' into 3074_create_how_to…
ehogan Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/rtw-env/rtw-env.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://conda.anaconda.org/conda-forge/noarch/font-ttf-dejavu-sans-mono-2.37-hab
https://conda.anaconda.org/conda-forge/noarch/font-ttf-inconsolata-3.000-h77eed37_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-source-code-pro-2.038-h77eed37_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/font-ttf-ubuntu-0.83-h77eed37_2.conda
https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h55db66e_0.conda
https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-hf3520f5_1.conda
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-hc0a3c3a_7.conda
https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.11-4_cp311.conda
https://conda.anaconda.org/conda-forge/noarch/tzdata-2024a-h0c530f3_0.conda
Expand Down Expand Up @@ -38,7 +38,7 @@ https://conda.anaconda.org/conda-forge/linux-64/libwebp-base-1.4.0-hd590300_0.co
https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda
https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda
https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-h59595ed_0.conda
https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-hd590300_0.conda
https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-h4ab18f5_3.conda
https://conda.anaconda.org/conda-forge/linux-64/pixman-0.43.2-h59595ed_0.conda
https://conda.anaconda.org/conda-forge/linux-64/pthread-stubs-0.4-h36c2ea0_1001.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/xorg-kbproto-1.0.7-h7f98852_1002.tar.bz2
Expand Down Expand Up @@ -83,7 +83,7 @@ https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1a
https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/cycler-0.12.1-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/linux-64/dbus-1.13.6-h5008d03_3.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/docutils-0.20.1-py311h38be061_3.conda
https://conda.anaconda.org/conda-forge/noarch/docutils-0.21.2-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/empy-3.3.4-pyh9f0ad1d_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/fontconfig-2.14.2-h14ed4e7_0.conda
https://conda.anaconda.org/conda-forge/linux-64/gdk-pixbuf-2.42.12-hb9ae30d_0.conda
Expand All @@ -110,9 +110,10 @@ https://conda.anaconda.org/conda-forge/noarch/pyparsing-3.1.2-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/pytz-2024.1-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/rx-3.2.0-pyhd8ed1ab_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/setuptools-69.5.1-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/setuptools-70.0.0-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-jsmath-1.0.1-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.11.0-pyha770c72_0.conda
Expand All @@ -122,11 +123,13 @@ https://conda.anaconda.org/conda-forge/linux-64/xorg-libxext-1.3.4-h0b41bf4_2.co
https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrender-0.9.11-hd590300_0.conda
https://conda.anaconda.org/conda-forge/linux-64/zeromq-4.3.5-h75354e8_4.conda
https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/accessible-pygments-0.0.4-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/ansimarkup-1.5.0-pyh44b312d_0.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/babel-2.14.0-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/beautifulsoup4-4.12.3-pyha770c72_0.conda
https://conda.anaconda.org/conda-forge/linux-64/cairo-1.18.0-h3faef2a_0.conda
https://conda.anaconda.org/conda-forge/linux-64/cffi-1.16.0-py311hb3a22ac_0.conda
https://conda.anaconda.org/conda-forge/linux-64/fonttools-4.51.0-py311h459d7ec_0.conda
https://conda.anaconda.org/conda-forge/linux-64/fonttools-4.52.1-py311h331c9d8_0.conda
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.1.0-pyha770c72_0.conda
https://conda.anaconda.org/conda-forge/noarch/jaraco.classes-3.4.0-pyhd8ed1ab_1.conda
https://conda.anaconda.org/conda-forge/noarch/jinja2-3.0.3-pyhd8ed1ab_0.tar.bz2
Expand All @@ -150,7 +153,7 @@ https://conda.anaconda.org/conda-forge/noarch/graphql-core-2.2-py_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/harfbuzz-8.5.0-hfac3d4d_0.conda
https://conda.anaconda.org/conda-forge/noarch/importlib_metadata-7.1.0-hd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/linux-64/numpy-1.26.4-py311h64a7726_0.conda
https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/requests-2.32.2-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/linux-64/urwid-2.6.12-py311h331c9d8_0.conda
https://conda.anaconda.org/conda-forge/linux-64/contourpy-1.2.1-py311h9547e67_0.conda
https://conda.anaconda.org/conda-forge/noarch/graphql-relay-2.0.1-py_0.tar.bz2
Expand All @@ -161,19 +164,18 @@ https://conda.anaconda.org/conda-forge/noarch/graphene-2.1.9-pyhd8ed1ab_0.tar.bz
https://conda.anaconda.org/conda-forge/linux-64/gtk2-2.24.33-h280cfa0_4.conda
https://conda.anaconda.org/conda-forge/linux-64/keyring-23.13.1-py311h38be061_0.conda
https://conda.anaconda.org/conda-forge/linux-64/librsvg-2.58.0-hadf69e7_1.conda
https://conda.anaconda.org/conda-forge/linux-64/matplotlib-base-3.8.4-py311h54ef318_0.conda
https://conda.anaconda.org/conda-forge/linux-64/matplotlib-base-3.8.4-py311ha4ca890_2.conda
https://conda.anaconda.org/conda-forge/noarch/cylc-flow-base-8.2.7-pyh707e725_0.conda
https://conda.anaconda.org/conda-forge/linux-64/graphviz-9.0.0-h78e8752_1.conda
https://conda.anaconda.org/conda-forge/noarch/metomi-rose-base-2.2.0-pyh707e725_0.conda
https://conda.anaconda.org/conda-forge/noarch/cylc-flow-8.2.7-pyh48b6436_0.conda
https://conda.anaconda.org/conda-forge/noarch/cylc-rose-1.3.4-pyh707e725_0.conda
https://conda.anaconda.org/conda-forge/linux-64/pygraphviz-1.12-py311hbf5cbc9_0.conda
https://conda.anaconda.org/conda-forge/linux-64/pygraphviz-1.13-py311hf355b97_0.conda
https://conda.anaconda.org/conda-forge/noarch/metomi-rose-2.2.0-pyh707e725_0.conda
https://conda.anaconda.org/conda-forge/noarch/pydata-sphinx-theme-0.15.2-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-1.0.8-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-devhelp-1.0.6-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-htmlhelp-2.0.5-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-jquery-4.1-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinx_rtd_theme-2.0.0-pyha770c72_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-qthelp-1.0.7-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinx-7.3.7-pyhd8ed1ab_0.conda
https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-serializinghtml-1.1.10-pyhd8ed1ab_0.conda
2 changes: 1 addition & 1 deletion .github/workflows/rtw-env/rtw-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dependencies:
- cylc-rose
- metomi-rose
- sphinx
- sphinx_rtd_theme
- pydata-sphinx-theme
4 changes: 2 additions & 2 deletions esmvaltool/utils/recipe_test_workflow/doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# -- Project information -----------------------------------------------------

project = 'Recipe Test Workflow (RTW)'
project = 'RTW'
version = "0.1.0"

# -- General configuration ---------------------------------------------------
Expand All @@ -39,7 +39,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = 'pydata_sphinx_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Adding a recipe to the Recipe Test Workflow (|RTW|)
ehogan marked this conversation as resolved.
Show resolved Hide resolved
===================================================

.. include:: ../common.txt

chrisbillowsMO marked this conversation as resolved.
Show resolved Hide resolved
**Please note:** Before you follow these steps to add your recipe, you must be
able to successfully run it with ESMValtool without error.
chrisbillowsMO marked this conversation as resolved.
Show resolved Hide resolved

* Run ESMValTool locally with your recipe, make sure to take note of the memory
and time expenditure provided by the terminal output::

esmvaltool run <your_recipe_name.yml>

ehogan marked this conversation as resolved.
Show resolved Hide resolved
* Run the same recipe on JASMIN, again taking note of the memory and time
expenditure printed to the terminal.

* Stop any running recipe_test_workflow workflows::

cylc stop "a_running_recipe_test_workflow"

* Add the recipe to the ``[task parameters]`` section of the |RTW| ``flow.cylc``
workflow file, make sure your recipe name fits the formatting of ``recipe_new_
recipe \\``.

* Run the workflow. The process task for the new recipe should succeed, but its
ehogan marked this conversation as resolved.
Show resolved Hide resolved
compare task should fail with an error that the reference data (KGO) does
not exist::

cylc vip -O <your_site_name>

* Locate the workflow run folder of the workflow you just completed.

* Copy the output files from the "cycle" folder (run/share/bin/cycle) of the
chrisbillowsMO marked this conversation as resolved.
Show resolved Hide resolved
workflow you just ran, to your site specific KGO rootpath folder
(this folder should be set as the value for the variable "KGO_ROOT_PATH="
in your rose-suite<your_site>.conf file)::
chrisbillowsMO marked this conversation as resolved.
Show resolved Hide resolved

cp -r <directory_of_recipe_output_cycle_folder> <KGO_rootpath_folder>

* Change directory to the rootpath KGO directory::

cd <KGO_rootpath_directory>

* Allow write permissions for all users on the directory and it's
subdirectories of the recipe you've added to the KGO folder::

chmod a+w <the_directory_of_the_recipe_you_have_copied_into_the_KGO_folder>

* Run the RTW again::

cylc vip -O <your_site_name>

* The workflow should now succeed.

* Take note of how long the run took to complete on cylc. This can be found in the `job.time` section of the task listed as `process_<your_recipe>`.

* Locate your local <site>.cylc file, found in (recipe_test_workflow/site).
chrisbillowsMO marked this conversation as resolved.
Show resolved Hide resolved

* Open it in your preferred code editor.

* Locate the `COMPUTE` section, it should look something like this::

[[COMPUTE]]
platform = <your_platform_here>
execution time limit = PT2M
[[[directives]]]
--wckey = RTW
--ntasks = {{ MAX_PARALLEL_TASKS }}
--mem = 2G

* Compare the `execution time limit` and --mem (memory) units here with the
readings you took locally. If your local readings do not exceed these, then
you have successfully added the recipe to the workflow, and can now commit
and push your changes.


* If either of the time/memory readings from your local run are larger than the
values specified in the `COMPUTE` section, you need to add your recipe as
another `process` similar to::

[[process<fast=recipe_albedolandcover>]]
# Actual: 0m31s, 2.5 GB on 2024-04-08.
execution time limit = PT2M
[[[directives]]]
--mem = 3G

ehogan marked this conversation as resolved.
Show resolved Hide resolved
* Variable (fast, medium) must be consistent with flow.cylc.
ehogan marked this conversation as resolved.
Show resolved Hide resolved

* The commented "Actual" reading should be the time/memory
reading you recorded from cylc review.

* Adjust the values for `execution_time` and `--mem` to be larger than the
values you recorded from cylc review.

* Stop any running workflows.

* Run the recipe test workflow again.

* If the workflow succeeds then your recipe has successfully been added to the
workflow. You can now commit your changes and push them onto GitHub.
chrisbillowsMO marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ User Guide

quick_start
workflow
adding_a_recipe
ehogan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
UTC mode = True

[task parameters]
# `fast` recipes are those taking less than 10 mins.
# Other recipes should be included in `medium`.
ehogan marked this conversation as resolved.
Show resolved Hide resolved
# Recipe paths are specified relative to esmvaltool/recipes. For recipes in
# subdirectories, `--` stands for `/` since the latter is an illegal char.
fast = recipe_radiation_budget, \
Expand Down
Loading