Skip to content

Conversation

@james-bruten-mo
Copy link
Collaborator

@james-bruten-mo james-bruten-mo commented Jan 27, 2026

PR Summary

Sci/Tech Reviewer: @t00sa
Code Reviewer: @cameronbateman-mo

Initial attempt at a script to merge different git branches for use in suites. The changes have been tested with the LFRic suites and with the lfric_apps rose-stem at vn3.0. If we think this is a good idea I'll also modify the UM suites to use this extraction method to maintain consistency.

These changes allow the dependencies.yaml file to specify multiple branches to merge together. This can be done by:

lfric_apps:
    - source: [email protected]:MetOffice/lfric_apps.git
      ref: 2025.12.1
    - source: [email protected]:james-bruten-mo/lfric_apps.git
      ref: test_merge_branch
    - source: [email protected]:james-bruten-mo/lfric_apps.git
      ref: test_branch2
    - source: [email protected]:james-bruten-mo/lfric_apps.git
      ref: conflic_apps

which will clone the first source and then merge each subsequent source into this. It's currently setup to ignore merge conflicts in rose-stem and dependencies.yaml as these files aren't important for running scientific suites.

Code Quality Checklist

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • This change has been tested appropriately (please describe)

LFRic standalone suites and lfric_apps rose-stem at vn3.0

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Security considerations have been addressed
  • Performance impact is acceptable

@james-bruten-mo james-bruten-mo marked this pull request as ready for review January 28, 2026 08:54
@github-actions github-actions bot requested a review from t00sa January 28, 2026 08:54
Copy link
Contributor

@t00sa t00sa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A handful of suggestions

Comment on lines 73 to 76
print(
f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Cloning "
f"{repo} from {mirror_loc} at ref {ref}"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered using the logging module for these instead of printing?

@james-bruten-mo james-bruten-mo requested a review from t00sa January 28, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants