From 23cc17f272e8685b49e4cb6ac99c0c32d6fca277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Fri, 29 May 2026 17:40:57 +0200 Subject: [PATCH 1/4] update rsmetacheck version and also bump to 0.5.0 for package as the configuration file has breaking changes --- README.md | 2 +- codemeta.json | 4 ++-- pyproject.toml | 4 ++-- uv.lock | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a897c9a..f3fa5da 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19468976.svg)](https://doi.org/10.5281/zenodo.19468976) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -[![Version](https://img.shields.io/badge/version-0.4.3-blue.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases) +[![Version](https://img.shields.io/badge/version-0.5.0-blue.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases) [![Python 3.11--3.12](https://img.shields.io/badge/python-3.11--3.12-blue.svg)](https://www.python.org/downloads/) [![CI (build)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/actions/workflows/ci.yml/badge.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/actions/workflows/ci.yml) [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff) diff --git a/codemeta.json b/codemeta.json index 3ea15eb..f85a558 100644 --- a/codemeta.json +++ b/codemeta.json @@ -18,7 +18,7 @@ ], "codeRepository": "https://github.com/SoftwareUnderstanding/sw-metadata-bot", "dateCreated": "2025-12-15", - "dateModified": "2026-05-05", + "dateModified": "2026-05-29", "datePublished": "2026-01-16", "description": "A repository to keep the code of the RSMetaCheck bot for pushing issues with existing repository metadata", "downloadUrl": "https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases", @@ -45,7 +45,7 @@ "python-dotenv>=1.0.0", "requests>=2.32.5" ], - "version": "0.4.3", + "version": "0.5.0", "codemeta:contIntegration": { "@id": "https://raw.githubusercontent.com/SoftwareUnderstanding/sw-metadata-bot/main/.github/workflows/ci.yml" }, diff --git a/pyproject.toml b/pyproject.toml index eea69d7..b4f08f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "sw-metadata-bot" -version = "0.4.3" +version = "0.5.0" description = "Metadata quality bot for software repositories, leveraging metacheck for analysis and GitHub/GitLab APIs for issue management." readme = "README.md" requires-python = ">=3.11,<3.13" @@ -14,7 +14,7 @@ authors = [ ] dependencies = [ "click>=8.3.1", - "rsmetacheck>=0.3.1", + "rsmetacheck>=0.3.2", "python-dotenv>=1.0.0", "requests>=2.32.5", "setuptools[test]<83.0.0", diff --git a/uv.lock b/uv.lock index 3297bdc..8f3e1af 100644 --- a/uv.lock +++ b/uv.lock @@ -4628,15 +4628,15 @@ wheels = [ [[package]] name = "rsmetacheck" -version = "0.3.1" +version = "0.3.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "requests" }, { name = "somef" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c8/0b/a268565797fe046402da6a451a7c0eb6dec7f0aec1645e8e9cd17d5cd484/rsmetacheck-0.3.1.tar.gz", hash = "sha256:211236ee44af252f7d401ffa8e18e6923d22e1b7a556e6441434f7b3e5213888", size = 38426, upload-time = "2026-04-30T10:13:01.523Z" } +sdist = { url = "https://files.pythonhosted.org/packages/91/40/04410691dd8e9f46a14ed809fab8f1fea975659bda28d00d116c92f94a90/rsmetacheck-0.3.2.tar.gz", hash = "sha256:f594dc5c1151fb8b0e1c622d907f4182ebc7f6ecd185b8a744d6001299276dda", size = 39909, upload-time = "2026-05-06T09:40:53.61Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/aa/5a/6fecc685133a6fa7c3ef922e70025a13eb04a9a2a60ce01c120769d16858/rsmetacheck-0.3.1-py3-none-any.whl", hash = "sha256:2ed82973dcae3e7f30ff338e65ceaa9f2beb2b153047e076e7cb73239ae64c4a", size = 57547, upload-time = "2026-04-30T10:13:02.489Z" }, + { url = "https://files.pythonhosted.org/packages/8f/09/95f8af85964781cf80de937767571f2e2de10d1a0096a69f2e5309cfa15d/rsmetacheck-0.3.2-py3-none-any.whl", hash = "sha256:0ee31e3c95028dba6ad581d49c000f4a74533101a4373ffa4726adbaf3f044a3", size = 58790, upload-time = "2026-05-06T09:40:54.539Z" }, ] [[package]] @@ -5053,7 +5053,7 @@ wheels = [ [[package]] name = "sw-metadata-bot" -version = "0.4.3" +version = "0.5.0" source = { editable = "." } dependencies = [ { name = "click" }, @@ -5096,7 +5096,7 @@ requires-dist = [ { name = "pytest-cov", marker = "extra == 'test'" }, { name = "python-dotenv", specifier = ">=1.0.0" }, { name = "requests", specifier = ">=2.32.5" }, - { name = "rsmetacheck", specifier = ">=0.3.1" }, + { name = "rsmetacheck", specifier = ">=0.3.2" }, { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.14.13" }, { name = "setuptools", marker = "extra == 'test'", specifier = "<83.0.0" }, { name = "setuptools", extras = ["test"], specifier = "<83.0.0" }, From d87064fb93c99ce30f7e13ea21b133386661aebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Tue, 2 Jun 2026 17:20:56 +0200 Subject: [PATCH 2/4] doc: update author name --- codemeta.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codemeta.json b/codemeta.json index f85a558..cb117de 100644 --- a/codemeta.json +++ b/codemeta.json @@ -13,6 +13,8 @@ }, "email": "tom.francois@lapp.in2p3.fr", "@id": "https://orcid.org/0000-0001-5226-3089", + "givenName": "Tom", + "familyName": "François", "@type": "Person" } ], From 184527e248c58e5cddeb3f8e0254347880d6a399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Wed, 3 Jun 2026 10:34:10 +0200 Subject: [PATCH 3/4] doc: add missing doc to get 100% on interrogate --- interrogate_badge.svg | 6 +++--- src/sw_metadata_bot/config/schemas.py | 5 ++++- src/sw_metadata_bot/publish.py | 8 ++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/interrogate_badge.svg b/interrogate_badge.svg index c0b839c..bc91d28 100644 --- a/interrogate_badge.svg +++ b/interrogate_badge.svg @@ -1,5 +1,5 @@ - interrogate: 96.1% + interrogate: 100% @@ -12,8 +12,8 @@ interrogate interrogate - 96.1% - 96.1% + 100% + 100% diff --git a/src/sw_metadata_bot/config/schemas.py b/src/sw_metadata_bot/config/schemas.py index 9617bdb..81aecef 100644 --- a/src/sw_metadata_bot/config/schemas.py +++ b/src/sw_metadata_bot/config/schemas.py @@ -1,3 +1,5 @@ +"""configurations schemas for the bot, defined using Pydantic models for validation and parsing of config files.""" + import json from datetime import datetime, timezone from pathlib import Path @@ -15,11 +17,12 @@ class AnalysisConfig(BaseModel): """ repositories: list[str] - generate_codemeta_if_missing: Optional[bool] = True + generate_codemeta_if_missing: bool = True @field_validator("repositories", mode="after") @classmethod def validate_repositories(cls, v): + """Check that repositories list is not empty""" if not v: raise ValueError("Repositories list cannot be empty") return v diff --git a/src/sw_metadata_bot/publish.py b/src/sw_metadata_bot/publish.py index 61018b9..4e678b3 100644 --- a/src/sw_metadata_bot/publish.py +++ b/src/sw_metadata_bot/publish.py @@ -23,25 +23,33 @@ class FakeIssueClient: """Issue client used only for local publish simulation.""" def __init__(self, comments_for=None): + """ + Initialize the fake issue client. + """ self._comments_for = comments_for or (lambda url: []) self.created: list[tuple[str, str, str]] = [] self.commented: list[str] = [] self.closed: list[str] = [] def create_issue(self, repo_url: str, title: str, body: str) -> str: + """Create an issue and return a simulated issue URL.""" self.created.append((repo_url, title, body)) return f"{repo_url}/issues/99" def get_issue(self, issue_url: str) -> dict[str, object]: + """return simulated issue data, with state 'open' by default (can be overridden by test setup)""" return {"state": "open"} def get_issue_comments(self, issue_url: str) -> list[str]: + """get simulated comments for the issue URL, as provided by the comments_for function""" return self._comments_for(issue_url) def add_issue_comment(self, issue_url: str, body: str) -> None: + """add a comment to the issue URL (recording the action for test verification)""" self.commented.append(issue_url) def close_issue(self, issue_url: str) -> None: + """simulate closing the issue at the given URL (recording the action for test verification)""" self.closed.append(issue_url) From b9a11142027354244e8ab12ae1f98cc2fc5b9c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Wed, 3 Jun 2026 10:34:26 +0200 Subject: [PATCH 4/4] doc: update modification date to today --- codemeta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemeta.json b/codemeta.json index cb117de..73f27aa 100644 --- a/codemeta.json +++ b/codemeta.json @@ -20,7 +20,7 @@ ], "codeRepository": "https://github.com/SoftwareUnderstanding/sw-metadata-bot", "dateCreated": "2025-12-15", - "dateModified": "2026-05-29", + "dateModified": "2026-06-03", "datePublished": "2026-01-16", "description": "A repository to keep the code of the RSMetaCheck bot for pushing issues with existing repository metadata", "downloadUrl": "https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases",