Working with Multiple Repositories#
The repositories covered by these working practices all interact with and have dependencies on each other. This means that changes that affect multiple repositories need handling with extra care.
LFRic Apps and the UM both act as child repositories to a number of parent repositories such as JULES, UKCA, SOCRATES and CASIM. These parent repositories work independently as well as being used by the child repositories. LFRic Apps also utilises the infrastructure in LFRic Core.
This means that changes to the science code in any of the parent repositories will need testing with both the UM and LFRic Apps to check for any interactions.
Note
From LFRic Apps vn2.1 and UM vn13.8 there are duplicate copies of the physics code in both the UM and LFRic Apps.
Consideration should be made as to whether changes to the physics schemes are best made in LFRic Apps, the UM or both. If in doubt then the copy in LFRic Apps is considered the master version.
Preparing Linked Pull Requests#
Every repository in a set of linked changes requires a PR. These PRs will be treated as a group with the same reviewers and committed at the same time.
- Do:
Make sure every PR has a cross reference to the others in the set. A section will exist in the PR template for this. Use the format
MetOffice/um#1234Use labels to show which other repositories are involved
Get the PRs ready for review at the same time
Ask for help testing if you don’t have access to all the codebases involved
Important
Code branches in linked PRs will require branching from compatible commit hashes to ensure they work together.
It is recommended to work with branches created from a specific release. These are guaranteed to work together.
For head of main branches make sure that all branches/hashes being
used are at least as recent as the commits associated with the hash in the
dependencies.yaml file.
If in doubt, please contact the Simulation Systems and Deployment Team for advice.
Multi-Repo Testing#
Please see this page for details on how to test multiple repositories together.