Skip to content

Commit 00af69a

Browse files
Merge branch 'main' into git_bdiff
2 parents 521adf7 + 30cc67a commit 00af69a

File tree

7 files changed

+57
-29
lines changed

7 files changed

+57
-29
lines changed

git-migration/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
This project is aimed to migrate the Met Office simulation systems repositories
44
to Git ecosystem. See MetOffice/simulation-systems/discussions/337 for details.
55

6-
7-
> [!IMPORTANT] Pre-requisites to run the migration script
8-
> - Read access to the Met Office Science Repository [MOSRS](https://code.metoffice.gov.uk/trac/home) or the Met Office internal mirror (`svn://fcm1`).
6+
> [!NOTE] Pre-requisites to run the migration script
7+
>
8+
> - Read access to the Met Office Science Repository [MOSRS](https://code.metoffice.gov.uk/trac/home) or the Met Office internal mirror (~~`svn://fcm1`~~ `https://metomi/svn`).
99
> - Optional Write access to the [Met Office GitHub organisation](https://github.com/MetOffice) for push to remote (usually, an admin).
1010
> - Tools: [`fcm`](https://metomi.github.io/fcm/doc/user_guide/introduction.html), [`git`](https://git-scm.com), [`gitlify`](https://github.com/MetOffice/gitlify), [`jq`](https://jqlang.org), and [`gh`](https://cli.github.com) available on the system.
1111
@@ -28,7 +28,7 @@ to Git ecosystem. See MetOffice/simulation-systems/discussions/337 for details.
2828
- [x] Contact [metomi](https://github.com/metomi/mule) owner to deprecate their repository.
2929
- [x] `svn:gcom/main` (@trunk) → [gcom](https://github.com/MetOffice/gcom) (@trunk)
3030
- [x] `svn:jules/main` (@trunk) → [jules](https://github.com/MetOffice/jules) (@trunk)
31-
- [ ] Check licence agreements, if going public.
31+
- [ ] Check licence agreements, if going public. (_in progress..._)
3232
- [ ] Plan to migrate JULES documentation here.
3333
- [x] `svn:socrates/main` (@trunk) → [socrates](https://github.com/MetOffice/socrates) (@trunk)
3434
- [x] `svn:utils/shumlib` (@trunk) → [shumlib](https://github.com/MetOffice/shumlib) (@trunk)
@@ -38,7 +38,7 @@ to Git ecosystem. See MetOffice/simulation-systems/discussions/337 for details.
3838
- [x] `svn:moci/main` (@trunk) → [moci](https://github.com/MetOffice/moci) (@trunk)
3939
- [x] `svn:lfric/LFRic` (@trunk) → [lfric_core](https://github.com/MetOffice/lfric_core) (@trunk)
4040
- [x] Repository already exists: ask for admin access to the repository.
41-
- [x] `svn:lfric/GPL-utilities` (@trunk) → [lfri_gpl_utils](https://github.com/MetOffice/lfri_gpl_utils) (@trunk)
41+
- [x] `svn:lfric/GPL-utilities` (@trunk) → [rose_picker](https://github.com/MetOffice/rose_picker) (@trunk)
4242
- [x] `svn:lfric_apps/main` (@trunk) → [lfric_apps](https://github.com/MetOffice/lfric_apps) (@trunk)
4343
- [ ] Propose `lfric_core` as a submodule in this repository?
4444
- [x] Check `config.json` is correct and up-to-date with MOSRS revisions.
@@ -50,24 +50,24 @@ to Git ecosystem. See MetOffice/simulation-systems/discussions/337 for details.
5050
- [ ] `LICENCE`
5151
- [ ] `CONTRIBUTING.md` (CLA)
5252
- [ ] Correct Copyright statements, particularly in planned open-source repositories. (_in progress..._)
53-
- [ ] Map SRS to GitHub username, where possible. (_in progress..._)
53+
- [ ] ~~Map SRS to GitHub username, where possible.~~
5454

5555
4. Testbed
5656
- [ ] Create additional `main` branches.
5757
- [ ] Test Fab (build tool) integration. (_in progress..._)
5858
- [ ] Test Simulation System workflows with GitHub.
59-
- [ ] Make sure tags/releases are still functional.
60-
- [ ] Update Working practices.
59+
- [x] Make sure tags/releases are still functional.
60+
- [ ] Update Working practices. (_in progress..._)
6161
- [ ] Allow limited number of developers to test their workflows.
62-
- [ ] Add/update Templates.
62+
- [ ] Add/update Templates. (_in progress..._)
6363

6464
5. During SRS freeze
65+
- [x] Test `trunk` and `main` are able to merge with different history.
6566
- [ ] Merge `trunk` in _future_ default (`main`) and delete `trunk`
6667

6768
6. Update communication plan
68-
- [ ] Update [Simulation Systems Discussion](https://github.com/MetOffice/simulation-systems/discussions/337)
69-
- [ ] Engage in [Simulation Systems Q&A](https://github.com/MetOffice/simulation-systems/discussions/categories/questions-and-answers)
70-
69+
- [x] Update [Simulation Systems Discussion](https://github.com/MetOffice/simulation-systems/discussions/337)
70+
- [x] Engage in [Simulation Systems Q&A](https://github.com/MetOffice/simulation-systems/discussions/categories/questions-and-answers)
7171

7272
## FAQ
7373

git-migration/config.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@
173173
{ "vn7.5": 28091 },
174174
{ "vn7.6": 28692 },
175175
{ "vn7.7": 29181 },
176-
{ "vn7.8": 29791 }
176+
{ "vn7.8": 29791 },
177+
{ "vn7.9": 30414 }
177178
]
178179
},
179180
{
@@ -214,7 +215,8 @@
214215
{ "um13.5": 1563 },
215216
{ "um13.6": 1642 },
216217
{ "um13.7": 1673 },
217-
{ "um13.8": 1741 }
218+
{ "um13.8": 1741 },
219+
{ "um13.9": 1831 }
218220
]
219221
},
220222
{
@@ -232,7 +234,8 @@
232234
{ "um13.5": 3314 },
233235
{ "um13.6": 4075 },
234236
{ "um13.7": 4898 },
235-
{ "um13.8": 5509 }
237+
{ "um13.8": 5509 },
238+
{ "um13.9": 6356 }
236239
]
237240
},
238241
{
@@ -266,6 +269,7 @@
266269
{ "um13.6": 7464 },
267270
{ "um13.7": 7655 },
268271
{ "um13.8": 7655 },
272+
{ "um13.9": 7859 },
269273
{ "2017.06.1": 874 },
270274
{ "2017.10.1": 1223 },
271275
{ "2018.01.1": 1552 },
@@ -332,7 +336,8 @@
332336
{ "vn1.21": 110005 },
333337
{ "vn1.22": 118501 },
334338
{ "vn1.23": 122041 },
335-
{ "vn1.24": 126461 }
339+
{ "vn1.24": 126461 },
340+
{ "vn1.25": 130034 }
336341
]
337342
},
338343
{
@@ -371,7 +376,8 @@
371376
{ "vn13.4": 120793 },
372377
{ "vn13.5": 123441 },
373378
{ "vn13.6": 125228 },
374-
{ "vn13.7": 127063 }
379+
{ "vn13.7": 127063 },
380+
{ "vn13.8": 128862 }
375381
]
376382
},
377383
{
@@ -424,7 +430,8 @@
424430
{ "vn13.5": 123226 },
425431
{ "vn13.6": 124981 },
426432
{ "vn13.7": 127030 },
427-
{ "vn13.8": 128625 }
433+
{ "vn13.8": 128625 },
434+
{ "vn13.9": 130128 }
428435
]
429436
},
430437
{
@@ -510,7 +517,7 @@
510517
]
511518
},
512519
{
513-
"name": "lfric_gpl_utils",
520+
"name": "rose_picker",
514521
"description": "LFRic GPL Tools",
515522
"trunk": "lfric/GPL-utilities",
516523
"tags": []

git-migration/ssd_svn2git.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,16 @@ process_repositories() {
142142
max_jobs=${BATCH:-$(nproc)}
143143
TIMESTAMP=$(date +'%Y%m%dT%H%M%S')
144144
LOG_DIR="${WORKDIR}/logs/${TIMESTAMP}"
145-
mkdir -p "$LOG_DIR"
145+
(( DRY_RUN )) || mkdir -p "$LOG_DIR"
146146
while read -r repo; do
147147
local repo_name trunk svn_url
148148
repo_name=$(jq -r '.name' <<<"$repo")
149149
[[ -z "$REPO_NAME" || "$REPO_NAME" == "$repo_name" ]] || continue
150150
trunk=$(jq -r '.trunk' <<<"$repo")
151151
svn_url="${SVN_PREFIX}/${trunk}"
152152
if (( FROM_MIRROR )); then
153-
svn_url="svn://fcm1/${trunk////.xm_svn/}"
153+
# svn_url="svn://fcm1/${trunk////.xm_svn/}" # dropped in June 2025
154+
svn_url="https://metomi/svn/${trunk////.xm/}"
154155
fi
155156
if (( DRY_RUN )); then
156157
printf "%-.56s %s\n" \

kgo_updates/meto_update_kgo.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ if [[ $platforms == *"ex1a"* ]]; then
7171
break
7272
fi
7373
done
74+
else
75+
ex_kgo_host="unset"
7476
fi
7577
read -rp "Suite Name: " suite_name
7678
read -rp "Enter the path to the merged trunk WC (top directory): " wc_path

lfric_macros/release_lfric.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,18 @@ def set_dependency_path(args):
9999
f.write("".join(x for x in lines))
100100

101101

102-
def find_meta_dirs(paths):
102+
def find_meta_dirs(paths, exclude_dirs=()):
103103
"""
104104
Return a set of rose-metadata directories that can be found in the apps and
105105
core sources. Done by seaching for rose-meta.conf files. Records the parent
106106
directory of the current one, as rose-meta.conf files end up in HEAD/vnX.Y
107107
directories.
108108
"""
109109

110-
print("[INFO] Finding rose metadata directories")
111-
112110
dirs = set()
113111
for path in paths:
112+
print("[INFO] Finding rose metadata directories in", path)
114113
for dirpath, dirnames, filenames in os.walk(path):
115-
exclude_dirs = [".svn", "rose-stem", "integration-test"]
116114
dirnames[:] = [d for d in dirnames if d not in exclude_dirs]
117115
if "rose-meta.conf" in filenames:
118116
dirs.add(os.path.dirname(dirpath))
@@ -407,7 +405,22 @@ def main():
407405

408406
set_dependency_path(args)
409407

410-
meta_dirs = find_meta_dirs([args.apps, args.core])
408+
# Find all metadata directories, excluing jules shared and lfric inputs as these have metadata but no macros.
409+
exclude_dirs = (
410+
".svn",
411+
"rose-stem",
412+
"integration-test",
413+
"lfric-jules-shared",
414+
"lfricinputs",
415+
)
416+
meta_dirs = find_meta_dirs([args.apps, args.core], exclude_dirs)
417+
418+
# Find JULES shared metadata directories and combine with all other metadirs for where they are handled differently
419+
jules_meta_path = os.path.join(
420+
args.apps, "interfaces", "jules_interface", "rose-meta", "lfric-jules-shared"
421+
)
422+
jules_shared_meta_dirs = find_meta_dirs([jules_meta_path])
423+
meta_dirs_plus_jules = meta_dirs.union(jules_shared_meta_dirs)
411424

412425
update_version_number(args)
413426

@@ -426,7 +439,7 @@ def main():
426439
)
427440
print("\n[INFO] Successfully upgraded apps")
428441

429-
copy_head_meta(meta_dirs, args)
442+
copy_head_meta(meta_dirs_plus_jules, args)
430443

431444
update_meta_import_path(meta_dirs, args)
432445

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
! *****************************COPYRIGHT*******************************
2+
3+
! (c) [Bureau of Meteorology]. All rights reserved.
4+
5+
! *****************************COPYRIGHT*******************************

suite_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,13 +479,13 @@ def __init__(
479479
# Final attempt to ensure the links have revision numbers and not
480480
# keywords which aren't evaluated in the browser.
481481
if proj_dict["repo link"] is not None and re.search(
482-
r"rev=[a-zA-z]", proj_dict["repo link"]
482+
r"rev=[a-zA-Z]", proj_dict["repo link"]
483483
):
484484
revision = self.revision_from_loc_layout(
485485
proj_dict["repo mirror"], fcm_exec
486486
)
487487
proj_dict["repo link"] = re.sub(
488-
r"rev=[a-zA-z0-9.]+",
488+
r"rev=[a-zA-Z0-9.]+",
489489
"rev=" + revision,
490490
proj_dict["repo link"],
491491
)

0 commit comments

Comments
 (0)