Skip to content

ENH: Add REUSE specification and checks for compliance#1844

Merged
yarikoptic merged 2 commits intomasterfrom
enh/reuse-compliance
Apr 30, 2026
Merged

ENH: Add REUSE specification and checks for compliance#1844
yarikoptic merged 2 commits intomasterfrom
enh/reuse-compliance

Conversation

@yarikoptic
Copy link
Copy Markdown
Member

Adopt the REUSE specification (https://reuse.software/) so that every file in the repository carries machine-readable copyright and license information. reuse lint now reports 246/246 files compliant.

Changes:

  • LICENSES/ — full SPDX license texts (downloaded via reuse download):

    • Apache-2.0.txt — project license
    • Unlicense.txt — vendored python-versioneer
    • BSD-2-Clause.txt — vendored duecredit stub (dandi/due.py)
  • REUSE.toml — three annotation blocks:

    • default precedence = "aggregate" over **Apache-2.0, "2019-2026 DANDI developers team@dandiarchive.org"
    • precedence = "override" for versioneer.py and dandi/_version.pyUnlicense (public domain, per upstream)
    • precedence = "override" for dandi/due.pyBSD-2-Clause, "2015-2019 DueCredit developers" (matches the in-file header from upstream)
  • .gitignore — add .mypy_cache/, .pytest_cache/, .ruff_cache/, .venv*/ so transient build/test artifacts are not picked up by reuse lint (REUSE 3.x honors .gitignore; no .reuseignore is needed).

  • Build-system integration:

    • tox.ini — new [testenv:reuse] running reuse lint
    • .pre-commit-config.yaml — add fsfe/reuse-tool hook (v5.0.2)
    • .github/workflows/lint.yml — new reuse job using fsfe/reuse-action@v5

The existing root LICENSE file is left in place: it remains the canonical reference from pyproject.toml and is the file PyPI/GitHub display by default. LICENSES/Apache-2.0.txt is its REUSE-shaped counterpart.

This change was prepared with the reuse-compliance skill currently under review at

Adopt the REUSE specification (https://reuse.software/) so that every
file in the repository carries machine-readable copyright and license
information. `reuse lint` now reports 246/246 files compliant.

Changes:

* `LICENSES/` — full SPDX license texts (downloaded via `reuse download`):
  - `Apache-2.0.txt`  — project license
  - `Unlicense.txt`   — vendored python-versioneer
  - `BSD-2-Clause.txt` — vendored duecredit stub (`dandi/due.py`)

* `REUSE.toml` — three annotation blocks:
  - default `precedence = "aggregate"` over `**` →
    `Apache-2.0`, "2019-2026 DANDI developers <team@dandiarchive.org>"
  - `precedence = "override"` for `versioneer.py` and
    `dandi/_version.py` → `Unlicense` (public domain, per upstream)
  - `precedence = "override"` for `dandi/due.py` →
    `BSD-2-Clause`, "2015-2019 DueCredit developers" (matches the
    in-file header from upstream)

* `.gitignore` — add `.mypy_cache/`, `.pytest_cache/`, `.ruff_cache/`,
  `.venv*/` so transient build/test artifacts are not picked up by
  `reuse lint` (REUSE 3.x honors `.gitignore`; no `.reuseignore` is
  needed).

* Build-system integration:
  - `tox.ini` — new `[testenv:reuse]` running `reuse lint`
  - `.pre-commit-config.yaml` — add `fsfe/reuse-tool` hook (v5.0.2)
  - `.github/workflows/lint.yml` — new `reuse` job using
    `fsfe/reuse-action@v5`

The existing root `LICENSE` file is left in place: it remains the
canonical reference from `pyproject.toml` and is the file PyPI/GitHub
display by default. `LICENSES/Apache-2.0.txt` is its REUSE-shaped
counterpart.

This change was prepared with the `reuse-compliance` skill currently
under review at con/skills#3.

Co-Authored-By: Claude Code 2.1.123 / Claude Opus 4.7 <noreply@anthropic.com>
@yarikoptic yarikoptic added the internal Changes only affect the internal API label Apr 29, 2026
@yarikoptic yarikoptic changed the title ENH: Add REUSE specification compliance ENH: Add REUSE specification and checks for compliance Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.26%. Comparing base (8837d7a) to head (5ad8d8d).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1844   +/-   ##
=======================================
  Coverage   76.26%   76.26%           
=======================================
  Files          87       87           
  Lines       12486    12486           
=======================================
  Hits         9523     9523           
  Misses       2963     2963           
Flag Coverage Δ
unittests 76.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread REUSE.toml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What joy, 'one more' config file for the outer level 😆

Comment thread .pre-commit-config.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love to see this, but will you ever let me fully enable the pre-commit.ci bot so I can be absolutely positive this is passing without any extra steps?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do see https://github.com/dandi/dandi-cli/actions/runs/25110788921/job/73583956810?pr=1844 but now there's like at least 3 or 4 different action runs that could all be one single CI

Comment thread LICENSES/BSD-2-Clause.txt
Comment thread REUSE.toml
Comment thread LICENSES/Apache-2.0.txt
@CodyCBakerPhD
Copy link
Copy Markdown
Contributor

CodyCBakerPhD commented Apr 29, 2026

Some comments above

Only one blocking question if we should fill in that one placeholder on the BSD-2? Technically the .toml links in a roundabout way to the specific software that needs it, but it still reads oddly as a license (doesn't feel quite legally binding at that point)

@yarikoptic
Copy link
Copy Markdown
Member Author

as I commented on -- I would not bother expanding on copyright in "LICENSES/" folder.

@yarikoptic yarikoptic merged commit 0fe03cf into master Apr 30, 2026
47 of 48 checks passed
@yarikoptic yarikoptic deleted the enh/reuse-compliance branch April 30, 2026 14:05
@github-actions
Copy link
Copy Markdown

🚀 PR was released in 0.75.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes only affect the internal API released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants