Separate the code license from the data license - #261
Conversation
The hook ran unfiltered, so which files got an Apache header depended on addlicense's internal list of recognized extensions rather than on any stated intent. That list happens to exclude .md and .cff today, which is why README.md and CITATION.cff are unstamped -- but those files are CC-BY-SA-4.0 metadata describing the datasets, and "the tool does not recognize the extension" is not a guarantee worth resting a licensing boundary on. An allowlist states the boundary directly: code gets the code license, and anything else has to be added deliberately. Reported by Greptile on #261. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The hook ran unfiltered, so which files got an Apache header depended on addlicense's internal list of recognized extensions rather than on any stated intent. That list happens to exclude .md and .cff today, which is why README.md and CITATION.cff are unstamped -- but those files are CC-BY-SA-4.0 metadata describing the datasets, and "the tool does not recognize the extension" is not a guarantee worth resting a licensing boundary on. An allowlist states the boundary directly: code gets the code license, and anything else has to be added deliberately. Reported by Greptile on #261. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks — the specific claim does not reproduce, but it pointed at a real weakness, so I fixed the underlying issue.
The weakness is that this safety was incidental. Which files received the code license depended on Fixed in 4f29424 with an explicit allowlist: files: ^(scripts/.*\.py|\.github/.*\.ya?ml|\.pre-commit-config\.yaml)$Now code gets the code license and anything else has to be added deliberately. Verified by staging a probe Analysis performed with Claude Code (Claude Opus 5). |
The repository holds two different kinds of thing under one LICENSE. The datasets under data/ are CC-BY-SA-4.0, which is what CITATION.cff and the Hugging Face dataset card declare and what a data consumer needs. The code under scripts/ and .github/ had no license of its own, which left it implicitly under the same CC license -- a poor fit, since Creative Commons recommends against applying CC licenses to software, and the project's other code repositories are Apache-2.0. LICENSE stays CC-BY-SA-4.0 so GitHub keeps advertising the data license, which is the right headline for a data repository. LICENSE-CODE adds Apache-2.0 for the code, following the convention Microsoft uses for its docs and data repositories, and addlicense stamps per-file headers so a script copied out of the repository carries its license with it. This changes no code: the diff is 333 insertions and no deletions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The hook ran unfiltered, so which files got an Apache header depended on addlicense's internal list of recognized extensions rather than on any stated intent. That list happens to exclude .md and .cff today, which is why README.md and CITATION.cff are unstamped -- but those files are CC-BY-SA-4.0 metadata describing the datasets, and "the tool does not recognize the extension" is not a guarantee worth resting a licensing boundary on. An allowlist states the boundary directly: code gets the code license, and anything else has to be added deliberately. Reported by Greptile on #261. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This repository holds two different kinds of thing under a single
LICENSE, and only one of them is described correctly today.The datasets under
data/are CC-BY-SA-4.0. That is whatCITATION.cffand the Hugging Face dataset card declare, it is what a data consumer needs to know, and it does not change here. The code underscripts/and.github/has no license of its own, which leaves it implicitly under the same CC license — a poor fit, since Creative Commons recommends against applying CC licenses to software, and the project's other code repositories (including ord-schema) are Apache-2.0. This states the intent that already exists rather than changing direction.What this does
LICENSEstays CC-BY-SA-4.0 and is untouched, so GitHub's sidebar keeps advertising the data license — the right headline for a data repository.LICENSE-CODEadds Apache-2.0 for the code, and a new README section states the split in a table.addlicenseruns in pre-commit and stamps per-file headers, so a script copied out of the repository carries its license with it rather than depending on a reader finding the right root file.LICENSE/LICENSE-CODEis the convention Microsoft uses across its docs and data repositories, where the same split applies (content under CC, code samples under a permissive license). The alternative of a directory-scopedscripts/LICENSEwas considered and rejected because the code is not only inscripts/—.github/is code too, and per-directory copies drift.Scope
This changes no code: the diff is 333 insertions and no deletions. Every modification to an existing file is the 14-line Apache header and nothing else.
A follow-up PR adds Python tooling (uv, ruff, ty, pytest) on top of this branch.
🤖 Generated with Claude Code
Greptile Summary
Adds a distinct Apache-2.0 license for repository code while retaining CC-BY-SA-4.0 for datasets and metadata.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (3): Last reviewed commit: "Scope the addlicense hook to code files" | Re-trigger Greptile