Skip to content

Commit cd64cd5

Browse files
UMDP guidance (#476)
Co-authored-by: James Bruten <109733895+james-bruten-mo@users.noreply.github.com>
1 parent 0a8528f commit cd64cd5

2 files changed

Lines changed: 123 additions & 0 deletions

File tree

source/Development/documentation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ alongside the code. This is then compiled using Sphinx into the webpages above.
2828
:maxdepth: 1
2929

3030
sphinx_docs
31+
um_docs
3132
jules_docs
3233

3334
.. admonition::

source/Development/um_docs.rst

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
Unified Model Documentation Papers (UMDPs)
2+
==========================================
3+
4+
The UM documentation papers and online training are maintained in the
5+
MetOffice/um_doc repository, separate from the UM code. Changes to the
6+
documentation will therefore require their own pull request.
7+
8+
The latest documentation gets automatically built by CI.
9+
The same action will run when a pull request is opened to ensure that the
10+
requested changes builds correctly. The build script is available in the
11+
repository and can be used to test that the finished documentation looks as you
12+
intend before submitting it for review.
13+
14+
.. admonition:: todo
15+
16+
update publishing and CI details
17+
18+
Standards
19+
---------
20+
21+
As there are standards for coding, similarly there are a few rules for the
22+
UM Document Papers.
23+
24+
#. Latex is the default file format.
25+
26+
#. A pair of UMDP document classes are supplied in the um_doc repository for
27+
use with all UMDPs to maintain a consistent style.
28+
29+
* You must use one of these two document classes, no exceptions.
30+
31+
* Unlike some other in-built Latex document classes the UMDP classes do not
32+
support pass-through of options to their parent class, this is intentional
33+
and will not be changed.
34+
35+
* The preamble requires the following setup commands to be present:
36+
37+
* **\\title** The title of the UMDP (Please avoid very long titles - use the
38+
optional subtitle command instead)
39+
40+
* **\\paperno** The UMDP identification number (3 characters, should match
41+
the directory name), if creating a new UMDP please request a new
42+
number (see below)
43+
44+
* **\\umversion** The version of the UM the document is valid for (e.g. "9.2"
45+
- This should ideally be the same as the documentation release as even
46+
UMDPs with no changes should be reviewed each release-cycle)
47+
48+
* **\\owner** The official owner and point of contact for the UMDP (This
49+
might be different to the contributing authors who may be listed by the
50+
optional command below)
51+
52+
* The preamble also supports the following optional commands:
53+
54+
* **\\subtitle** May be used to provide elaboration on the title (or a way of
55+
shortening it if required)
56+
57+
* **\\author** The list of contributing authors (which may or may not include
58+
the UMDP owner)
59+
60+
* **\\titlecontent** This is a flexible space which appears on the title page
61+
and is left to the author's discretion - it could be used to place a
62+
short abstract-style paragraph on the cover, to contain footnote
63+
references to the list of authors or any other purpose.
64+
65+
66+
#. Any package available in an unmodified TexLive (version 2018) installation
67+
is permitted, provided it doesn't alter the page layout and other
68+
presentational elements of the UMDP document class, or require source
69+
commands that are too complex/difficult to maintain or for other authors to
70+
understand (at the discretion of the Code Reviewer / UMDP Librarian/s).
71+
72+
#. Make sure all files required for build are in the repository. No dependency
73+
shall be stored outside the repository.
74+
75+
* To ensure the integrity of the UMDP repository it is essential that all
76+
the required files, source and diagrams to create the documentation are
77+
included.
78+
79+
* It is not acceptable to only provide a pdf or html link.
80+
81+
* It should be possible for our partners to build UMDPs and modify them l
82+
locally if we are to expect them to contribute to UM development.
83+
84+
* There is no need to write a Makefile or other code to build each UMDP,
85+
this is all handled by the build_umdoc.py script. However it identifies
86+
the top-level document by the presence of the \documentclass command, so
87+
you should never allow more than one file to contain this command. (See
88+
other UMDPs for examples; these should be standard across UMDPs.)
89+
90+
91+
Making Changes
92+
--------------
93+
94+
Making changes to the UMDPs follows the same process for setting up a fork,
95+
developing on a branch and reviewing through pull requests as outlined in the
96+
:ref:`working_practices_index`.
97+
98+
The source for the UMDP documents is in the ``source`` folder, in sub-directories
99+
named after the UMDP number of the each document. You should not need to edit
100+
anything outside of the ``source`` directory.
101+
102+
When changing a document the ``Last Updated`` version number must be updated
103+
to reflect the *upcoming* release. This is done by changing `\\umversion{}` in
104+
the documents pre-amble.
105+
106+
To test build the documentation:
107+
108+
.. code-block::
109+
110+
./build_umdoc.py XYZ
111+
112+
* XYZ is the UMDP number of your modified document (more that one can
113+
be specified if you wish)
114+
115+
* The PDF output will be in `output/papers/umdp_XYZ.pdf`
116+
117+
* Build stdout and stderr will be in `output/logs/umdp_XYX_stdout.log`.
118+
119+
120+
.. tip::
121+
Further details on the build script can by found by directing a browser
122+
to `web/build.html`

0 commit comments

Comments
 (0)