Skip to content

Fix bug in pathnames when using --fullcheck#201

Open
r-sharp wants to merge 12 commits intoMetOffice:mainfrom
r-sharp:path_bugfix
Open

Fix bug in pathnames when using --fullcheck#201
r-sharp wants to merge 12 commits intoMetOffice:mainfrom
r-sharp:path_bugfix

Conversation

@r-sharp
Copy link
Contributor

@r-sharp r-sharp commented Mar 3, 2026

PR Summary

Sci/Tech Reviewer:
Code Reviewer: @james-bruten-mo

The TLD was being repeated when using --fullcheck option. Not sure how this crept in, but I discovered it when trying to work on some optimisations.

Whilst the propesed 'fix' might look a bit clunky (generating relative paths to the TLD in get_files_to_check only to add the TLD once the list is returned). This is to accomodate planned changes to only add the TLD at the point the file is opened and always use just the relative path when reporting on the success/failure of a particular file.
I'm fixing the bug here - no implementing the future change.

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)

On the command line, this change allows the script to run on a specified directory in both 'cms' and fullcheck modes.
It also passes all the pytest tests.

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)

AI only used for "line completion" where it matched what I was going to type.

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

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.

1 participant