Skip to content

Commit 9ce6ca9

Browse files
authored
Misc updates (#470)
1 parent 1d19ec5 commit 9ce6ca9

File tree

6 files changed

+62
-20
lines changed

6 files changed

+62
-20
lines changed

source/Development/documentation.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ alongside the code. This is then compiled using Sphinx into the webpages above.
3535

3636
The UM documentation papers are written in LaTeX and stored in a separate
3737
repository. Guidelines for editing the UM documentation papers are available
38-
here `https://code.metoffice.gov.uk/trac/um/wiki/WorkingPractices/Documentation
39-
/UpdatingUMDPs`_.
38+
`here <umdp>`_
39+
40+
.._ umdp: https://code.metoffice.gov.uk/trac/um/wiki/WorkingPractices/Documentation/UpdatingUMDPs
4041

4142
LFRic Apps and Core also use doxygen to document the code and all changes
4243
should include appropriate doxygen changes to go with them. Doxygen guidelines

source/Development/planning_your_change.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,18 @@ The following are some general hints and tips in planning code changes successfu
3333

3434
General Considerations
3535
----------------------
36+
**Smaller is better.** Submit a separate pull request per bug fix or feature.
37+
Avoid refactoring or reformating code that is not related to your change.
38+
Multiple small pull requests are easier to review and more likely to be accepted
39+
promptly.
3640

37-
**How complex is your change likely to be?** (e.g. roughly how many subroutines
38-
or lines of code do you expect to alter or add?) This is an important
39-
consideration as the more complex a change is, the more time will be required
40-
in development, the more code owners will need to approve it and so forth. If a
41-
change is overly complex, the developer should consider breaking it up into
42-
smaller, more manageable and, where possible, "self contained" tickets.
41+
**Consider the complexity of your change.** For larger or more complex changes,
42+
start by opening an issue and discussing your approach with the relevant people.
43+
This helps avoid unnecessary work and ensures alignment with project goals.
44+
45+
**Prioritise clarity over cleverness.** Code is read more often than it is
46+
written, so make it easy to understand and maintain. If the logic is not
47+
immediately obvious then include comments to explain your reasoning.
4348

4449
**How does your proposed change fit in with the structure of the model?** Try
4550
and make your code changes in-scope and no larger than they need to be. If you
@@ -54,7 +59,7 @@ aware of these.
5459
* `UMDP3 (UM and JULES FORTRAN)
5560
<https://code.metoffice.gov.uk/doc/um/latest/umdp.html#003>`__
5661
* `LFRic Coding Styles
57-
<https://code.metoffice.gov.uk/trac/lfric/wiki/LFRicTechnical/CodingStandards>`__
62+
<https://metoffice.github.io/lfric_core/how_to_contribute/index.html#how-to-contribute-index>`__
5863
* `PEP 8 (Python) <https://legacy.python.org/dev/peps/pep-0008/>`__
5964

6065
**Who will SciTech review the change?** This is a useful consideration as not
@@ -78,6 +83,9 @@ linked tickets. See :ref:`multirepo` for further details.
7883
idea **not** to re-invent the wheel or have code duplication! Speaking to code
7984
owners of the appropriate sections can help in this instance.
8085

86+
**How will your change be tested?** Include unit or integration tests, and update
87+
any example or demo repositories to exercise new functionality.
88+
8189
Specific Tips for Scientific changes
8290
------------------------------------
8391

source/Reviewers/codereview.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Fundamentally this review is to ensure that the change is well thought-out and
2020
that no system aspects have been missed. The review should be an active one
2121
and should question anything that is poorly coded.
2222

23+
Focus on the code, not the contributor; providing constructive, respectful and
24+
actionable feedback. Critique the implementation, not the individual and always
25+
explain the reasoning behind your suggestions.
26+
2327
Reviewer responsibilities and checkpoints
2428
-----------------------------------------
2529

source/Reviewers/scitechreview.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Purpose of the review
1616
The purpose of code review is to ensure that the code does the job it says it
1717
performs, is standards compliant and well documented.
1818

19+
Focus on the code, not the contributor; providing constructive, respectful and
20+
actionable feedback. Critique the implementation, not the individual and always
21+
explain the reasoning behind your suggestions.
22+
23+
1924
Reviewer responsibilities and checkpoints
2025
-----------------------------------------
2126

source/WorkingPractices/gh_dev_init.rst

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,40 @@ created a fork (:ref:`forking`).
1212
Create an Issue
1313
---------------
1414

15+
An issue in github can be used to document a new feature, bug, or other problem
16+
in the codebase. There are issue templates provided to help capture all the
17+
relevant information in each case.
18+
19+
They are also the main place to document the development process of a change.
20+
Sub-issues can be created if a large piece of work wants breaking down into
21+
smaller sections. If you are working on an issue, then assign yourself to it so
22+
that others know that you are working on it. Issues are created in the upstream
23+
repository.
24+
25+
.. admonition:: Before Opening an Issue
26+
27+
**Are you using the latest version?** If not, please update to the latest
28+
stable release and verify the issue persists.
29+
30+
**Is this a security issue?** Please do not file a public issue for
31+
security vulnerabilities, but get in touch with the :ref:`SSD team <ssd>`
32+
directly.
33+
34+
**Is this a duplicate?** Add a comment or an emoji reaction to the original
35+
issue rather than opening a new one.
36+
37+
**Is this a support request?** Questions should be asked via the
38+
`simulation-systems discussion boards`_ where we'll be happy to try and help.
39+
40+
.. _simulation-systems discussion boards: https://github.com/MetOffice/simulation-systems/discussions
41+
1542
.. important::
1643

1744
It is not guaranteed that opening an issue will result in action or even
1845
visibility by the relevant maintainers or code owners. If you think a team
1946
or individual should be aware of an issue, then contact them directly in
2047
addition to opening an issue.
2148

22-
An issue in github can be used to document a problem in the codebase or as
23-
somewhere to document the development process for a new feature. Sub-issues
24-
can also be created if a large piece of work wants breaking down into smaller
25-
sections. If you are working on an issue, then assign yourself to it so that
26-
others know that you are working on it. Issues are created in the upstream
27-
repository.
2849

2950
.. tab-set::
3051

@@ -198,7 +219,9 @@ And then commit the change,
198219
information see the relevant man page, ``man git add``.
199220

200221
Finally, you may want to push any commits stored in your local clone back to
201-
the remote source.
222+
the remote source. This allows you to share code with someone else during the
223+
development process, or prepare to open a pull request once you're ready for a
224+
review.
202225

203226
.. code-block::
204227

source/WorkingPractices/pull_requests.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ Trivial pull requests are an exception and do not require a SciTech review.
1717

1818
:ref:`Linked pull requests <linked>` will move through the review states together.
1919

20-
.. tip::
21-
22-
Some things to consider when getting ready for review:
20+
.. admonition:: Getting Ready for Review
2321

2422
* If your development changes answers then make sure you have followed the
25-
steps on :ref:`preparing a KGO ticket for review.<kgo>`
23+
steps on :ref:`preparing a KGO pull request for review.<kgo>`
2624

2725
* Get in touch with your SciTech Reviewer before you feel ready for review.
2826
They will have valuable insights into the code and, particularly for larger
@@ -40,6 +38,9 @@ Trivial pull requests are an exception and do not require a SciTech review.
4038
close that part of the review. The developer should **not** resolve
4139
conversations themselves.
4240

41+
* Feedback on code is not a refection of personal ability. All code can be
42+
improved and reviews are an opportunity for shared learning and collaboration.
43+
4344

4445
Opening a Pull Request
4546
----------------------

0 commit comments

Comments
 (0)