Skip to content

Add GitHub action for checking copyright statements automatically in code#116

Merged
mo-tgeddes merged 21 commits intoMetOffice:mainfrom
mo-tgeddes:copyright_github_action
Feb 18, 2026
Merged

Add GitHub action for checking copyright statements automatically in code#116
mo-tgeddes merged 21 commits intoMetOffice:mainfrom
mo-tgeddes:copyright_github_action

Conversation

@mo-tgeddes
Copy link
Collaborator

@mo-tgeddes mo-tgeddes commented Feb 2, 2026

Description:
Fixes the existing copyright checker unittest to run in the command line, GitHub action and rose stem test, and check both python files and shell files.

To be completed prior to review request and updated as required during the review process.

If the answer to an item on the list is not applicable, feel free to replace the checkbox with 'N/A' to give extra clarity.

All developers are reminded to follow the ancil working practices


Branch

Related branches (e.g. contrib):

[please link any related branches here]

ANTS rose stem logs

dev-ants-core/run43

contrib rose stem logs

[please enter the workflow name here as it has been run e.g. ants-contrib/run1]


Testing

For core ANTS only tests, the bare minimum that will be accepted is the --group=unittests but many, if not most, changes will need to test other groups to ensure they meet reviewer expectations. In general, it should be possible and is advised to run the --group=all group prior to review submission as this will catch any consequential issues. Additionally you must run the contrib tests, pointing at your branch, with --group=all to capture any behaviour changes affecting Science codes.

If your change will alter existing science results, you will need to seek appropriate Scientific validation and confirm that the model has been initialised with your new development. Inspecting a change in xconv/pyplot/visualiser of choice is not sufficient to demonstrate the model can be initialised from your file.


Impact of change

  • This will maintain results for ANTS rose stem --group=all tests
  • This will this maintain results for contrib rose stem --group=all tests
  • If this change adds a new capability, evidence has been supplied to show testing of ancillary generation across different resolutions e.g. For global ancillary generation capabilities for use in NWP n1280e is expected to have been tested
  • This change has significantly impacted required resources (runtime and memory) in existing ancillary generation (if yes, give details)
  • This change alters existing ancils
Add further comments/details for your reviewers here on the impacts of the change......

Approvals for this change

  • I have approval from the ANTS core development team for these changes

New functionality further testing

  • If adding new functionality to existing codes, I confirm that the new code doesn't change results when it is switched off and ''works'' when switched on
  • Unittests have been added
  • Rose stem tests have been added for any new functionality
  • If adding new functionality please confirm that the new code compares across different standard decompositions.
  • I have not encountered any failures in my rose-stem output(s)
    These tasks must succeed for your ticket to pass review.
  • I have remembered to run the code style check tasks/tools
Add details of any further testing here.

Other

  • I read the Contributor Licence Agreement
  • I have added my name and affiliation to the Contributors list if I am not already on there.
  • The issue labels, milestones, etc. are correct
  • Links to all related issues have been provided in the pull request description
  • I have requested a code reviewer
  • Source data has been added or changed - please include a link to the license
I confirm that all code is my own and that my contributions are not subject to copyright or license restrictions (see Contributor Licence Agreement). Theo Geddes
I confirm I have not knowingly violated intellectual property rights (IPR) and have taken sensible measures to prevent doing so, including appropriate attribution for usage of Generative AI. I confirm that this work is my own, and I understand that it is my responsibility to ensure I am not violating others’ IPR. This includes taking reasonable steps to ensure that all tools used while creating this contribution did not infringe IPR. Theo Geddes
Please add any further notes here. If Generative AI tools have been used, a brief summary (e.g. "Github copilot used to add extra unittests") should be provided.

Rose stem logs

Please copy in the contents of your trac_status.log file(s) below (found in the cylc-run directory for your rose stem run) to your rose-stem testing here. Note: if your changes lead to a change in answers, you must run rose stem --group=all to help ensure all affected configurations has been flagged up.

on 9 Feb 12:48:20 GMT 2026 Git status: [ " M app/unittests/rose-app.conf", "?? ../boop", "?? ../boop.nc", "?? ../cubelist.nc", "?? ../cubey.nc", "?? ../cubey2.nc", "?? ../stuffy.attribution", "?? ../stuffy.license", "?? ../stuffy.restrictions" ] Commit: 22ef558

Test Results - Summary

tasks total
succeeded 65

Test Results - Detail

task status
install_cold succeeded
ancil_general_regrid_invert_mask_spiral_split1 succeeded
unittests succeeded
ancil_general_regrid_grid_to_grid_kdtree_split0 succeeded
ancil_general_regrid_invert_mask_latitude_weighted_kdtree_split0 succeeded
ancil_general_regrid_invert_mask_latitude_weighted_kdtree_split1 succeeded
ancil_general_regrid_3d_to_3d_split1 succeeded
ancil_general_regrid_grid_to_grid_spiral_split2 succeeded
ancil_general_regrid_grid_to_grid_latitude_weighted_kdtree_split0 succeeded
ancil_general_regrid_grid_to_variable_resolution_grid_split1 succeeded
ancil_general_regrid_grid_to_grid_latitude_weighted_kdtree_split2 succeeded
ancil_general_regrid_invert_mask_latitude_weighted_kdtree_split2 succeeded
black succeeded
ancil_general_regrid_grid_to_n48_namelist_split2 succeeded
ancil_general_regrid_grid_to_n48_namelist_split0 succeeded
ancil_general_regrid_grid_to_n48_namelist_split1 succeeded
ancil_fill_n_merge_invert_mask_spiral succeeded
ancil_2anc_split2 succeeded
ancil_general_regrid_grid_to_variable_resolution_grid_split0 succeeded
ancil_general_regrid_with_time_constraint_latitude_weighted_kdtree_split2 succeeded
ancil_general_regrid_grid_to_grid_spiral_split0 succeeded
ancil_general_regrid_grid_to_n48e_namelist_split1 succeeded
ancil_fill_n_merge_invert_mask_latitude_weighted_kdtree succeeded
ancil_general_regrid_invert_mask_spiral_split0 succeeded
ancil_general_regrid_3d_to_3d_split0 succeeded
ancil_general_regrid_with_time_constraint_spiral_split1 succeeded
ancil_general_regrid_invert_mask_kdtree_split1 succeeded
isort succeeded
ancil_general_regrid_invert_mask_kdtree_split2 succeeded
ancil_general_regrid_with_time_constraint_kdtree_split1 succeeded
ancil_2anc_split1 succeeded
ancil_create_ite_shapefile succeeded
ancil_general_regrid_3d_to_3d_with_extrapolation_split1 succeeded
ancil_general_regrid_grid_to_grid_kdtree_split2 succeeded
ancil_general_regrid_grid_to_grid_latitude_weighted_kdtree_split1 succeeded
ancil_general_regrid_with_time_constraint_spiral_split0 succeeded
ancil_general_regrid_with_time_constraint_latitude_weighted_kdtree_split1 succeeded
ancil_general_regrid_3d_to_3d_split2 succeeded
ancil_general_regrid_grid_to_grid_kdtree_split1 succeeded
ancil_general_regrid_grid_to_n48e_namelist_split2 succeeded
ancil_general_regrid_grid_to_variable_resolution_grid_split2 succeeded
ancil_general_regrid_with_time_constraint_latitude_weighted_kdtree_split0 succeeded
ancil_2anc_split0 succeeded
ancil_general_regrid_3d_to_3d_with_extrapolation_split2 succeeded
ancil_general_regrid_with_time_constraint_spiral_split2 succeeded
ancil_fill_n_merge_invert_mask_kdtree succeeded
ancil_general_regrid_3d_to_3d_with_extrapolation_split0 succeeded
ancil_general_regrid_invert_mask_kdtree_split0 succeeded
ancil_general_regrid_grid_to_grid_spiral_split1 succeeded
ancil_general_regrid_with_time_constraint_kdtree_split2 succeeded
ancil_general_regrid_invert_mask_spiral_split2 succeeded
flake8 succeeded
build_docs succeeded
ancil_general_regrid_with_time_constraint_kdtree_split0 succeeded
ancil_general_regrid_grid_to_n48e_namelist_split0 succeeded
ancil_fill_n_merge_land_cover_kdtree succeeded
ancil_fill_n_merge_land_cover_latitude_weighted_kdtree succeeded
ancil_fill_n_merge_land_cover_spiral succeeded
rose_ana_2anc succeeded
rose_ana_fill_n_merge succeeded
rose_ana_general_regrid succeeded
rose_ana_general_regrid_latitude_weighted_kdtree succeeded
rose_ana_general_regrid_spiral succeeded
rose_ana_general_regrid_kdtree succeeded
linkcheck succeeded

@mo-tgeddes mo-tgeddes marked this pull request as ready for review February 9, 2026 12:50
@hdyson hdyson self-requested a review February 10, 2026 09:48
Copy link
Contributor

@hdyson hdyson left a comment

Choose a reason for hiding this comment

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

One query about whether git enables us to do something better. If there isn't a better method, I'll approve.

I have tested this with a variety of copyright removals and breakages, and every issue was caught 👍

@mo-tgeddes mo-tgeddes requested a review from hdyson February 18, 2026 11:32
Copy link
Contributor

@hdyson hdyson left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me 👍

@mo-tgeddes mo-tgeddes merged commit 7b1c497 into MetOffice:main Feb 18, 2026
5 checks passed
@mo-tgeddes mo-tgeddes deleted the copyright_github_action branch February 18, 2026 11:55
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