diff --git a/CITATION.cff b/CITATION.cff index c767f0f..5bb0417 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -22,8 +22,8 @@ authors: email: jaehoon.seo@inha.ac.kr affiliation: "Marine Structural Mechanics and Integrity Lab (SMI Lab), Inha University" orcid: "https://orcid.org/0000-0003-1047-2119" -version: 1.10.0 -date-released: "2026-05-22" +version: 1.14.1 +date-released: "2026-05-23" license: Apache-2.0 repository-code: "https://github.com/SMI-Lab-Inha/pyBModes" url: "https://github.com/SMI-Lab-Inha/pyBModes" diff --git a/docs/release_checklist.rst b/docs/release_checklist.rst index a0c5f91..78245f4 100644 --- a/docs/release_checklist.rst +++ b/docs/release_checklist.rst @@ -191,13 +191,17 @@ should be obvious from the per-case error message. tag's value. - ``src/pybmodes/__init__.py``: bump the dev fallback string ``__version__ = "X.Y.Z-dev"``. +- ``CITATION.cff``: bump the software ``version:`` to ``X.Y.Z`` and + ``date-released:`` to the release date (this is the ``version:`` + field, not the ``cff-version:`` schema field). ``tests/test_version.py`` + gates this against ``pyproject`` so a forgotten bump fails CI. - ``CHANGELOG.md``: promote the ``## [Unreleased]`` block to ``## [X.Y.Z] — YYYY-MM-DD``; reset ``[Unreleased]`` to ``(nothing yet)``. Commit with a stand-alone message like ``chore: bump version to X.Y.Z, promote CHANGELOG``. Verify the -commit's stat shows only those three files changed. +commit's stat shows only those four files changed. 9. Tag + push ------------- diff --git a/tests/test_version.py b/tests/test_version.py index 114324b..9edc1b3 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -4,6 +4,12 @@ available and otherwise falls back to a literal in ``__init__.py`` (for an uninstalled source tree). That literal silently drifted behind ``pyproject.toml`` once already, so this test pins the two together. + +``CITATION.cff`` carries its own ``version:`` field, maintained by hand, +which had drifted several releases behind (1.10.0 while the package was +1.14.x). This test also pins the citation version to ``pyproject`` so a +release that forgets to bump it fails CI rather than shipping a stale +citation. """ from __future__ import annotations @@ -28,5 +34,18 @@ def _init_fallback_version() -> str: return matches[-1] +def _citation_version() -> str: + src = (REPO_ROOT / "CITATION.cff").read_text(encoding="utf-8") + # The software ``version:`` field, distinct from the ``cff-version:`` + # schema field. Match a line that starts with ``version:`` exactly. + m = re.search(r'^version:\s*"?([^"\s]+)"?\s*$', src, re.MULTILINE) + assert m, "no software version: field found in CITATION.cff" + return m.group(1) + + def test_init_fallback_matches_pyproject() -> None: assert _init_fallback_version() == _pyproject_version() + + +def test_citation_version_matches_pyproject() -> None: + assert _citation_version() == _pyproject_version()