docs: add CITATION.cff and bring the copyright notice up to date - #615
Conversation
54c3e84 to
3345798
Compare
Requested by the owner, who is happy for anyone to use the project as long as credit is clearly stated and honoured. BSD-3-Clause already delivers that, so the licence is deliberately unchanged -- still BSD-3-Clause, no NOTICE file and no change to its terms. * Add CITATION.cff in Citation File Format 1.2.0, which GitHub renders as the "Cite this repository" button and which citation managers and dependency inventories read directly. Validated with `cffconvert --validate` and against the published 1.2.0 schema; `doi` and `orcid` are omitted rather than invented, since neither exists for this project today. * Bump the LICENSE copyright line from 2018-2023 to 2018-2026. That was its only occurrence in the tree -- docs/source/conf.py already derives its own from the current year. * Drop a stray `s` after the closing `DAMAGE.` of the licence text, present since the Mozilla-to-BSD relicence, so the wording now matches canonical BSD-3-Clause. The PEP 639 licence-metadata modernisation was considered and deliberately not made; the PR description carries the measurement that ruled it out. `python -m build` and `twine check` both pass on the sdist and the wheel.
3345798 to
6783504
Compare
|
✅ GOOD TO MERGE — head |
Cross-review appendix — PR #615Reviewer: Sonnet; PR authored on Opus 5. Reviewed at head The assigned diff base was wrong — corrected before judging scope
True scope, from the real merge-base
PEP 639 drop — all three legs reproduced(a) SPDX (b) setuptools ≥77 excludes Python 3.8. (c) The decisive claim — no wheel for 3.6–3.9, so So on 3.8 CITATION.cff — validated, not merely parsedStructural check of my own: parses under Real schema validation, independently of the author's run: fetched the live schema (
LICENSE typo fix — provenance checkedThe canonical SPDX Disagreement logPEP 639 drop: agree, and the earlier recommendation to do it was wrong. All three legs reproduced above, including one detail the brief stated incorrectly (77.0.0 never shipped; 77.0.1 is the boundary). Dropping it was right. LICENSE typo fix bundled with the year bump: agree with shipping it here. It is a single character deletion after the final full stop, proven against the canonical template with named provenance, in the same three-line region of the same 30-line file already being edited, and the PR body already offers the maintainer a one-hunk opt-out. The general principle that One dispute, aimed at the review brief rather than the PR: using |
Requested by the owner; no issue is open for it. * `LICENSE:3` began the term at 2018, a year after the work it covers. The repository's first commit is `c57f7d0b7` "Initial commit", dated 2017-11-07, so the notice understated the term and disagreed with `docs/source/conf.py`, which already computes its Sphinx footer from 2017. * That start year survived four hand edits to the same line -- `2018-2020`, then `2018-2022`, `2018-2023` and `2018-2026` (#615) -- because every one of them corrected the end year and copied `2018` forward untouched. * The end year is dropped rather than automated. The notice ships inside the sdist and the wheel, so it cannot be computed at read time the way the docs footer is; copyright subsists from creation regardless of the notice; and BSD-3-Clause's canonical form carries a single year. No workflow, hook or script is added in its place -- that was considered and rejected. * `docs/source/conf.py` is untouched: already self-maintaining, already starting at 2017, and a docs footer showing a range is conventional. * Changelog bullet added; `CHANGELOG.md` regenerated with `util/changelog_md.py`, and `--check` exits 0. The licence body is unaltered -- the whole-file diff is one hunk at line 3, and the remaining 28 lines match the SPDX BSD-3-Clause text word for word. No tests were run: one line of legal prose, nothing under `pcapkit/`.
Requested by the owner; no issue is open for it. * `MANIFEST.in` had `include` lines for `README.md`, `LICENSE` and `CHANGELOG.md` but none for `CITATION.cff`, and its two `global-include` patterns are `*.rst` and `*.py`, neither of which matches a `.cff`. The file was therefore in the repository and in no source distribution. * The gap is invisible from the web UI, since GitHub renders the "Cite this repository" button from the repository. Citation managers, Zenodo and dependency inventories read the published artifact, which is the surface that was missing it. * It matters now because #625 has just taught `util/bump_version.py` to keep that file's `version` and `date-released` in step with the bump, so a release exercising that path would publish an sdist omitting the artefact under test. #615 flagged the omission when it added the file; #619 did not address it. * The new line carries a comment, as its neighbours do, saying why it is load-bearing rather than belt-and-braces. * Changelog bullet added; `CHANGELOG.md` regenerated with `util/changelog_md.py`, and `--check` exits 0. Measured both ways with `python -m build --sdist`: `tar tzf | grep -i citation` found nothing before and `pypcapkit-1.5.0b4/CITATION.cff` after; the two archive listings differ by that one entry and nothing else, 860 against 861; the shipped copy is byte-identical to the repository's; and `twine check --strict` reports PASSED on both. No tests were run -- one line of packaging configuration, nothing under `pcapkit/`.
Requested by the owner; no issue is open for it. * `LICENSE:3` began the term at 2018, a year after the work it covers. The repository's first commit is `c57f7d0b7` "Initial commit", dated 2017-11-07, so the notice understated the term and disagreed with `docs/source/conf.py`, which already computes its Sphinx footer from 2017. * That start year was wrong from the moment it was first written. `bc836cfa2` (2020-05-31) introduced `2018-2020` when the BSD-3-Clause text replaced MPL 2.0 -- the file until then was stock MPL carrying no author notice at all -- and the range was then bumped by hand three times, to `2018-2022`, `2018-2023` and `2018-2026` (#615), each bump correcting the end year and copying `2018` forward untouched. * The end year is dropped rather than automated. The notice ships inside the sdist and the wheel, so it cannot be computed at read time the way the docs footer is; copyright subsists from creation regardless of the notice; and BSD-3-Clause's canonical form carries a single year. No workflow, hook or script is added in its place -- that was considered and rejected. * `docs/source/conf.py` is untouched: already self-maintaining, already starting at 2017, and a docs footer showing a range is conventional. * Changelog bullet added; `CHANGELOG.md` regenerated with `util/changelog_md.py`, and `--check` exits 0. The licence body is unaltered -- the whole-file diff is one hunk at line 3, and the remaining 28 lines carry the canonical BSD-3-Clause wording verbatim. Three things distinguish the file from SPDX's bare `licenseText`, all of them pre-existing: the `BSD 3-Clause License` title line, the `*` bullets in place of `1.`/`2.`/`3.`, and the extra `All rights reserved.` line. No tests were run: one line of legal prose, nothing under `pcapkit/`.
Requested by the owner; no issue is open for it. * `MANIFEST.in` had `include` lines for `README.md`, `LICENSE` and `CHANGELOG.md` but none for `CITATION.cff`, and its two `global-include` patterns are `*.rst` and `*.py`, neither of which matches a `.cff`. The file was therefore in the repository and in no source distribution. * Nor was there a default to fall back on. Removing all three `include` lines and rebuilding shows `README.md` and `LICENSE` shipping regardless -- setuptools adds the latter from `license_files`, logging `adding license file 'LICENSE'` and recording `License-File: LICENSE` in `PKG-INFO` -- while `CHANGELOG.md` disappears. Of the three only `CHANGELOG.md` is load-bearing, and a citation file, which nothing outside `MANIFEST.in` knows about, is in the same position. * The gap is invisible from the web UI, since GitHub renders the "Cite this repository" button from the repository. Citation managers, Zenodo and dependency inventories read the published artifact, which is the surface that was missing it. * It matters now because #625 has just taught `util/bump_version.py` to keep that file's `version` and `date-released` in step with the bump, so a release exercising that path would publish an sdist omitting the artefact under test. #615 flagged the omission when it added the file; #619 did not address it. * Changelog bullet added; `CHANGELOG.md` regenerated with `util/changelog_md.py`, and `--check` exits 0. Measured both ways with `python -m build --sdist`: `tar tzf | grep -i citation` found nothing before and `pypcapkit-1.5.0b4/CITATION.cff` after; the two archive listings differ by that one entry and nothing else, 860 against 861; the shipped copy is byte-identical to the repository's; and `twine check --strict` reports PASSED on both. No tests were run -- one line of packaging configuration, nothing under `pcapkit/`.
Requested by the owner; no issue is open for it. * `MANIFEST.in` had `include` lines for `README.md`, `LICENSE` and `CHANGELOG.md` but none for `CITATION.cff`, and its two `global-include` patterns are `*.rst` and `*.py`, neither of which matches a `.cff`. The file was therefore in the repository and in no source distribution. * Nor was there a default to fall back on. Removing all three `include` lines and rebuilding shows `README.md` and `LICENSE` shipping regardless -- setuptools adds the latter from `license_files`, logging `adding license file 'LICENSE'` and recording `License-File: LICENSE` in `PKG-INFO` -- while `CHANGELOG.md` disappears. Of the three only `CHANGELOG.md` is load-bearing, and a citation file, which no packaging default covers at all, is in the same position. * The gap is invisible from the web UI, since GitHub renders the "Cite this repository" button from the repository. Citation managers, Zenodo and dependency inventories read the published artifact, which is the surface that was missing it. * It matters now because #625 has just taught `util/bump_version.py` to keep that file's `version` and `date-released` in step with the bump, so a release exercising that path would publish an sdist omitting the artefact under test. #615 flagged the omission when it added the file; #619 did not address it. * It also lets `RepositoryCitationTests` in `tests/project/test_bump_version.py` -- the gate #625 added for the hand-authored bumps that never run the script -- execute against an unpacked sdist, where today it skips itself with "CITATION.cff is not shipped in the source distribution". * Changelog bullet added; `CHANGELOG.md` regenerated with `util/changelog_md.py`, and `--check` exits 0. Rebased onto `cfb81d3f6` after #630 merged; the changelog conflict was resolved keeping both bullets and regenerating `CHANGELOG.md` rather than merging it. Measured both ways with `python -m build --sdist` against that base: `tar tzf | grep -i citation` found nothing before and `pypcapkit-1.5.0b4/CITATION.cff` after; the listings differ by that one entry and nothing else, 860 against 861; the shipped copy is byte-identical to the repository's; and `twine check --strict` reports PASSED on both. No tests were run -- one line of packaging configuration, nothing under `pcapkit/`.
Requested by the owner, on the licence question: "fine it being used by anyone as long as my credits are being clearly stated and honoured", then "LISCENSE-wise, let's keep BSD and use your recommendations".
The licence is deliberately unchanged. It stays BSD-3-Clause. No switch to Apache-2.0 or MIT, no
NOTICEfile, and no change to the licence's terms. BSD-3-Clause already requires that the copyright notice be retained and forbids using the author's name to endorse derived products, which is what was asked for. What was missing was not permission language but discoverability of the credit.What changed
1.
CITATION.cff(new)Citation File Format 1.2.0. GitHub renders it as the repository's Cite this repository button, and citation managers, Zenodo and dependency inventories read it directly — so credit carries into a paper or a bill of materials instead of depending on a reader opening
LICENSE.Every value is taken from the repository rather than invented:
version1.5.0b4pcapkit/__init__.py:132date-released2026-09-201.5.0b4sdistauthors[0].emailjarryshaw@icloud.compyproject.toml:16licenseBSD-3-ClauseLICENSEabstractREADME.rstkeywordsnetwork,pcap,packetpyproject.toml:51doiandorcidare omitted, not guessed. Neither exists for this project or its author today, and both are checked formats — an invented value would pass validation and still be wrong.Validated three ways:
plus an independent
jsonschemarun against the published 1.2.0 schema (every top-level key and every author key checked against the schema's real property list, not from memory), and a render to prove the fields are actually consumable:2. Copyright year,
2018-2023→2018-2026LICENSE:3was the only occurrence in the tree.git grep -n "2018-20"and a case-insensitive sweep forcopyrightboth confirm it;docs/source/conf.py:51builds its own fromdatetime.date.today().yearand needs no edit.3. A stray character in the licence text
LICENSE:29ended...POSSIBILITY OF SUCH DAMAGE.s— a straysafter the final full stop, present since the Mozilla-to-BSD relicence inbc836cfa2. Removed. This changes no term; it makes the text match the canonical SPDX BSD-3-Clause wording, which matters for automated licence detection. Diffed against the SPDX template: after the fix the only remaining differences are the optionalAll rights reserved.line and bulleted rather than numbered clauses, both accepted variants. Before the fix there was a third difference, atdamage.vsdamage.s.If you would rather the licence file not be touched beyond the year, this is the one hunk to drop.
What was deliberately NOT changed: PEP 639
pyproject.toml:21still carries the deprecated table formlicense = { text="BSD 3-Clause License" }, and:62still carries"License :: OSI Approved :: BSD License". The modern form would belicense = "BSD-3-Clause"+license-files = ["LICENSE"]with the classifier removed.Not done, because it would break installs on Python 3.8. The evidence, measured rather than assumed:
The SPDX string form requires setuptools ≥ 77. Confirmed by running the real build backend at both ends of the boundary:
ValueError: invalid pyproject.toml config: 'project.license'. configuration error: 'project.license' must be valid exactly by one definition (2 matches found)— a hard failure, not a warning.Metadata-Version: 2.4,License-Expression: BSD-3-Clause,License-File: LICENSE.setuptools ≥ 77 cannot be installed on Python 3.8. From a real 3.8.20 interpreter:
The candidate list stops at
75.3.4. The currentsetuptools>=61.0.0floor is satisfiable there.And Python 3.6–3.9 have no wheel to fall back on. The lowest published wheel tag is
cp310/pp310— verified against PyPI's file list for1.5.0a1through1.5.0b4, and explained byutil/wheel_rename.py, which rewrites the tag to the building interpreter'scp{major}{minor}, and bycreate-release.yml, whose matrix floors at 3.10. So on 3.8,pip install pypcapkitmust build the sdist, which means it must resolve[build-system] requires.Putting those together:
setuptools>=61.0.0(today)setuptools>=77.0.0SyntaxErrorat import from the documentedbpc-poseurbug (already broken)pyproject.toml:27nobpcconversion is even needed at 3.8So the change would break exactly one configuration that works today —
pip install pypcapkiton Python 3.8 — for an interpreter still named inclassifiersand insiderequires-python = ">=3.6, <4". Modernising a metadata field is not worth an install regression, and the owner asked for better credit, not a narrower support matrix. There is no conditional escape either: an environment marker can vary the setuptools floor per interpreter, but the SPDXlicensevalue is rejected outright by every setuptools below 77, so the build fails on 3.8 regardless of how the requirement is written.Worth knowing for whenever this is revisited: setuptools 83.0.0+ requires Python ≥ 3.10, so the floor question will recur, and dropping the
>=3.6declaration is the change that actually unblocks PEP 639.Verification
LICENSEstill ships in both:pypcapkit-1.5.0b4/LICENSEin the sdist, andpypcapkit-1.5.0b4.dist-info/licenses/LICENSEin the wheel.MANIFEST.inis untouched.Changelog regenerated;
python util/changelog_md.py --checkexits 0.Two things found and not changed
CITATION.cffis not in the sdist.MANIFEST.inmatches*.rst,*.py,README.rst,LICENSEandCHANGELOG.md, so a.cfffile is picked up by nothing — confirmed by listing the built tarball. This does not affect the GitHub button, which reads the file from the repository, but a one-lineinclude CITATION.cffwould ship it for tools that read installed sources. Left alone becauseMANIFEST.inis owned by a concurrent branch this wave.docs/source/conf.py:51starts its copyright at 2017, whereLICENSEstarts at 2018. One of the two is wrong; picking which is the owner's call, andconf.pywas outside this change.No issue exists for this work, so there is no
Fixesline.