# plesty license Maintain and verify [REUSE](https://reuse.software/) licensing for a project. Python sources carry inline SPDX headers — a collective `SPDX-FileCopyrightText` holder (the first `[project].authors` entry) plus one `SPDX-FileContributor` line per individual author. Non-code files (docs, assets, the root `LICENSE`, lockfiles) are covered centrally by `REUSE.toml`. ## update ```bash plesty license update ``` Reads the copyright holder and contributors from `[project].authors` and the SPDX license identifier from `[project].license`, downloads the license text into `LICENSES/` if it is missing, then runs `reuse annotate --skip-existing` over the project's Python files. Only files **without** a header are annotated; curated headers (for example multi-author files) are left untouched. ### Prerequisites The `pyproject.toml` must declare `[project].license` as an SPDX identifier and at least one `[project].authors` entry: ```toml # pyproject.toml [project] license = "LGPL-3.0-or-later" authors = [ { name = "Plesty Development Team" }, # collective copyright holder { name = "Jane Doe" }, # contributor ] ``` The first author is used as the collective `SPDX-FileCopyrightText`; the rest become `SPDX-FileContributor` entries. ## author ```bash plesty license author ``` Adds the authors of your **unpushed** commits as `SPDX-FileContributor` entries on the Python files they changed (keeping all existing contributors), resolving identities through `.mailmap`. Run it, review the changes, and commit them before pushing. This is the fix when the **Authorship Currency** check blocks a push. Authorship Currency is part of the Licensing gate (`plesty check`): it compares your commits against the base branch (`@{u}`, else `origin/exp`/`origin/main`) and fails if a commit author is not yet credited on a Python file they changed. It runs locally only — it is skipped in CI and when no base branch is available. ## lint ```bash plesty license lint ``` Runs `reuse lint` and reports whether the project is compliant with the REUSE specification. ### Example ```bash # from another directory plesty --project-dir ../my-device license update ```