Skip to content

Make check_existing function return whether a path exists - #250

Closed
James Frost (jfrost-mo) wants to merge 1 commit into
MetOffice:mainfrom
jfrost-mo:refactor_git_source_check_existing
Closed

Make check_existing function return whether a path exists#250
James Frost (jfrost-mo) wants to merge 1 commit into
MetOffice:mainfrom
jfrost-mo:refactor_git_source_check_existing

Conversation

@jfrost-mo

Copy link
Copy Markdown
Member

PR Summary

Make check_existing function return whether a path exists. This avoids the need to separately check this in other code.

This is a refactoring PR ahead of some modifications to the cloning function; I have split it into a separate PR for ease of review as it touches a couple places that are otherwise unaffected.

Sci/Tech Reviewer:
Code Reviewer:

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 (Docstring updated.)
  • 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)

I have run an existing workflow (u-dn674) with this change and observed no change in behaviour.

Security Considerations

  • I have reviewed my changes for potential security issues

No change in security properties. The same check happens, just within the function rather than outside it. This makes it harder to forget.

  • 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

This avoids the need to seperately check this in other code.
@github-actions github-actions Bot added the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Hello James Frost (@jfrost-mo)! 👋

Thank you for your contribution. Since this is your first time contributing to this repository, we ask that you sign our Contributor Licence Agreement (CLA).

📄 You can read the CLA here.

To agree to the CLA, please add your details (GitHub username, Real Name, Affiliation, and Date) to the CONTRIBUTORS.md file (create one, if required) in the development branch for this PR. After signing the CLA, you won't need to do this again for future PRs.

@jfrost-mo

Copy link
Copy Markdown
Member Author

Ack, stacked PRs don't work across forks! I'll open this as one PR then.

@jfrost-mo
James Frost (jfrost-mo) deleted the refactor_git_source_check_existing branch September 4, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-required The CLA has not yet been signed by the author of this PR - added by GA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants