contributing: Use SPDX copyright tags in unlabeled file headers#7756
Open
wenzeslaus wants to merge 1 commit into
Open
contributing: Use SPDX copyright tags in unlabeled file headers#7756wenzeslaus wants to merge 1 commit into
wenzeslaus wants to merge 1 commit into
Conversation
Convert the 1030 files whose copyright notice does not use the labeled COPYRIGHT field: Doxygen file blocks in the C libraries, Python module docstrings in the GUI and the Python packages, and assorted headers. Names and years stay verbatim; each holder gets its own line; the collective line and the license identifier follow the same rules as the earlier conversions. Files whose notice carries no license text at all get the identifier when the notice is team-held, covered by the repository-wide grant in COPYING, or when all its years fall in the CERL era, in or before 1992. Individual-held notices from 1993 on with no license text are left alone and reported. Vendored code is excluded by directory and by the holder named in the notice. Translation catalogs under locale are excluded as a standing decision: their gettext headers already state the license and are rewritten by the translation platform sync. Notices naming several holders, and notices whose license text is separated from them by an author list, are left for reviewed one-off replacements in a follow-up. One file the pinned ruff hook rewrites on the unmodified base is left out so that an unrelated lint fix does not ride along. Files half-converted earlier, carrying an identifier but a legacy notice, are completed without duplicating the identifier. The conversion was performed by a deterministic script, not by a language model. The script and its report are attached to the pull request. The script was extended for this corpus with AI assistance (Claude Code with Opus 4.8 and Fable 5); the decisions are the author's.
cwhite911
requested changes
Jul 20, 2026
| Copyright (C) 2000-2007 by the GRASS Development Team | ||
| SPDX-FileCopyrightText: 2000-2007 Other GRASS authors | ||
| SPDX-License-Identifier: GPL-2.0-or-later | ||
| Author: Jan-Oliver Wagner <jan intevation.de> |
Comment on lines
12
to
13
| @author Michael Barton (Arizona State University) | ||
| @author Jachym Cepicky (Mendel University of Agriculture) |
Contributor
There was a problem hiding this comment.
Should these authors be picked up?
| @@ -3,10 +3,9 @@ | |||
| Purpose: Tests i.pca. | |||
|
|
|||
| Author: Hamed Elgizery - hamedashraf2004@gmail.com | |||
Contributor
There was a problem hiding this comment.
Here is an example of the author getting picked up by the script.
Comment on lines
11
to
12
| * \author Original author Julienne Walker 2003, 2008 | ||
| * GRASS implementation Markus Metz, 2009 |
| @@ -11,7 +11,8 @@ | |||
| \author Thematic mapping enabled by Martin Landa <landa.martin gmail.com) | |||
Contributor
There was a problem hiding this comment.
Another type of missed author
Comment on lines
11
to
12
| * \author Original author Julienne Walker 2003, 2008 | ||
| * GRASS implementation Markus Metz, 2009 |
Contributor
|
@wenzeslaus overall, the conversion worked well but I found a few examples that were not properly picked up. I didn't comment on every instance where I found an issue, but if you look at the comments they should capture the 3-4 variants that need to be addressed. I'm on my phone otherwise I would have added the patterns myself here. Some of these may have been picked up in the other PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts the 1030 files whose copyright notice does not use the labeled
COPYRIGHTfield: Doxygen file blocks in the C libraries, Python module docstrings in the GUI and the Python packages, and assorted headers. Together with #7743 this covers the whole tree apart from vendored code and the cases listed below.localeexcluded as a standing decision.A typical replacement:
The policy decisions were made during GRASS Community Meeting 2026 in San Michele all'Adige.
Like #7743, this should technically merge after #7749, which defines "Other GRASS authors", but it does not have to.
The conversion was performed by a deterministic script, not by a language model. The script was extended for this corpus and this description drafted with AI assistance (Claude Code with Opus 4.8 and Fable 5); the decisions are the author's.
Details: scope, rules, decisions, deferred cases, and how it was checked (AI generated)
Decisions beyond #7743
COPYING, or when all its years fall in the CERL era, in or before 1992. Individual-held notices from 1993 on with no license text are left alone and reported.locale/poexclusion is a standing decision: the gettext headers already state the license, distributed under the same license as the GRASS package, and they are rewritten by the translation platform sync, so an edit there would not survive.Licence:-labeled text (imagery testsuites) or mark it with a Doxygen\copyrighttag (lib/rst); both are recognized as the same GPL paragraph and converted.Scope
locale/pocatalogs, standing exclusionCOPYRIGHTfieldRules
Same as #7743: one holder per
SPDX-FileCopyrightTextline, named holders first, the collective line last, the identifier after all copyright lines, years and names verbatim, the collective line carries years only where it is the sole copyright line, and neitherAUTHOR(S)nor the git history was consulted. Author tags (\author,@author) and all other header text outside the notice and license paragraph are untouched. Files half-converted earlier, carrying an identifier but a legacy notice, are completed without duplicating the identifier.Checked
Every added line is one of the two SPDX shapes and every removed line is a known notice or license-paragraph form (2246 added, 4649 removed, none unclassifiable). No byte outside the replaced span changed, trailing bytes are identical, the four-digit years on notice lines are conserved exactly, no emitted C line exceeds 78 columns, and a second run converts nothing.
pre-commitover all 1030 files passes with nothing reformatted. All C compiles; all 399 converted Python files parse. 43 tests cover the script, including the wrapped-holder,\copyright-tag, and interposed-author-list cases.One file,
man/build_check.py, is deferred because the pinned ruff hook rewrites it on the unmodified base already, so converting it would pull an unrelated lint fix into the diff.The script (
spdx_headers.py.txt), its tests (spdx_headers_test.py.txt), and the full deferred report (deferred-bare.md) are attached.deferred-bare.md
spdx_headers_test.py.txt
deferred-cases.md