From e520a886953eacbf60d2d70d7e824e0df34d2f2e Mon Sep 17 00:00:00 2001 From: Max Shad <31811010+mmshad@users.noreply.github.com> Date: Wed, 5 Aug 2026 22:30:02 -0400 Subject: [PATCH] Add a citation file Names the Research Engineering Team as author, carries the version being cited, and validates against schema 1.2.0. A test keeps that version and pyproject in step, and the release steps say to raise both. --- CITATION.cff | 22 ++++++++++++++++++++++ CONTRIBUTING.md | 3 ++- tests/test_citation.py | 27 +++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 CITATION.cff create mode 100644 tests/test_citation.py diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..4eca967 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,22 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +title: "ClusterTool: Single Umbrella CLI Centralizing HPC/AI Cluster Tools" +abstract: >- + A single umbrella CLI that centralizes the Slurm cluster scripts used by + researchers and admins, so common tasks live in one place with consistent help + and behavior, and adapts to other clusters through a site config. +type: software +authors: + - name: "Research Engineering Team, Kempner Institute, Harvard University" + website: "https://kempnerinstitute.harvard.edu" +version: 0.1.1 +date-released: "2026-08-05" +license: MIT +repository-code: "https://github.com/KempnerInstitute/clustertool" +url: "https://pypi.org/project/clustertool/" +keywords: + - slurm + - hpc + - gpu + - cluster + - command-line tool diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eea8561..6a85051 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -213,7 +213,8 @@ behavior, help text, and tests before merging. Uploads to PyPI are manual. -1. Raise `version` in `pyproject.toml`, run `uv lock`, and merge that. +1. Raise `version` in `pyproject.toml` and `CITATION.cff`, run `uv lock`, and + merge that. 2. Draft a GitHub release with tag `vX.Y.Z` targeting `main`, and publish it. The release check verifies the tag against the version, runs the tests, builds, and attaches both artifacts to the release. diff --git a/tests/test_citation.py b/tests/test_citation.py new file mode 100644 index 0000000..ac4cf02 --- /dev/null +++ b/tests/test_citation.py @@ -0,0 +1,27 @@ +"""Tests for the citation file.""" + +import pathlib +import re + +ROOT = pathlib.Path(__file__).resolve().parent.parent +CITATION = ROOT / "CITATION.cff" +PYPROJECT = ROOT / "pyproject.toml" + + +def _cited_version() -> str: + return re.search(r"^version: (\S+)$", CITATION.read_text(), re.M).group(1) + + +def _package_version() -> str: + return re.search(r'^version = "(\S+)"$', PYPROJECT.read_text(), re.M).group(1) + + +def test_the_cited_version_is_the_package_version(): + """A release raises both, since the citation names the version it is for.""" + assert _cited_version() == _package_version() + + +def test_the_citation_names_the_author_and_the_license(): + text = CITATION.read_text() + assert "Research Engineering Team, Kempner Institute, Harvard University" in text + assert "license: MIT" in text