Skip to content

Updating Copyright Year

Bill Sacks edited this page Jan 14, 2026 · 3 revisions

At the start of each year, we need to update the copyright year in the copyright notices that appear in the header of each source code file. This involves doing a project-wide search-and-replace in the following repositories:

Nearly all instances can be found by searching for the string, "Copyright (c) 2002-2023" (where 2023 should be replaced by the previous year) and replacing it with a similar string with the end year updated to the current year.

One additional change is needed in the esmf repository: in the file src/addon/esmpy/doc/conf.py, the end year needs to be changed on the line starting with copyright = .

Various methods can be used to do the project-wide search-and-replace (command-line tools, editor functionality, etc.). For example, this is straightforward using project-wide search and replace in VSCode.

As of February, 2023, the above instructions seem to capture all of the copyright notices that we want to change, but if you are concerned that you might have missed some files that have copyright notices in different formats, here are some ideas for grep commands you can use after doing the above replacements:

  • git grep -l '\- *2023' (where 2023 should be replaced by the previous year): finds any potential copyright notices that went up to the previous year but in a different format. To be safe, do this with the previous 2-3 years in case some older copyright notices have been introduced (e.g., at the start of 2027, do this search with 2026, 2025 and 2024).
  • git grep -i -l -e 'copyright.*20' --and --not -e 'Copyright (c) 2002-2023' (where 2023 should be replaced by the previous year): finds copyrights in a different format or ones that hadn't been updated correctly in the previous year. However, note that this turns up a lot of files in the main esmf repository that should not be changed, because they are either in eps files or in files from third-party packages with different copyright notices. So, if you do this search, you should just skim through the results with an eye towards files that should truly be updated; this may not be worth doing.

Clone this wiki locally