Skip to content

Commit 7d83bc2

Browse files
authored
Bump rsmetacheck version (#133)
* update rsmetacheck version and also bump to 0.5.0 for package as the configuration file has breaking changes * doc: update author name * doc: add missing doc to get 100% on interrogate * doc: update modification date to today
1 parent 22fbbb3 commit 7d83bc2

7 files changed

Lines changed: 27 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19468976.svg)](https://doi.org/10.5281/zenodo.19468976)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5-
[![Version](https://img.shields.io/badge/version-0.4.3-blue.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases)
5+
[![Version](https://img.shields.io/badge/version-0.5.0-blue.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases)
66
[![Python 3.11--3.12](https://img.shields.io/badge/python-3.11--3.12-blue.svg)](https://www.python.org/downloads/)
77
[![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)
88
[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)

codemeta.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
},
1414
"email": "tom.francois@lapp.in2p3.fr",
1515
"@id": "https://orcid.org/0000-0001-5226-3089",
16+
"givenName": "Tom",
17+
"familyName": "François",
1618
"@type": "Person"
1719
}
1820
],
1921
"codeRepository": "https://github.com/SoftwareUnderstanding/sw-metadata-bot",
2022
"dateCreated": "2025-12-15",
21-
"dateModified": "2026-05-05",
23+
"dateModified": "2026-06-03",
2224
"datePublished": "2026-01-16",
2325
"description": "A repository to keep the code of the RSMetaCheck bot for pushing issues with existing repository metadata",
2426
"downloadUrl": "https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases",
@@ -45,7 +47,7 @@
4547
"python-dotenv>=1.0.0",
4648
"requests>=2.32.5"
4749
],
48-
"version": "0.4.3",
50+
"version": "0.5.0",
4951
"codemeta:contIntegration": {
5052
"@id": "https://raw.githubusercontent.com/SoftwareUnderstanding/sw-metadata-bot/main/.github/workflows/ci.yml"
5153
},

interrogate_badge.svg

Lines changed: 3 additions & 3 deletions
Loading

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "sw-metadata-bot"
7-
version = "0.4.3"
7+
version = "0.5.0"
88
description = "Metadata quality bot for software repositories, leveraging metacheck for analysis and GitHub/GitLab APIs for issue management."
99
readme = "README.md"
1010
requires-python = ">=3.11,<3.13"
@@ -14,7 +14,7 @@ authors = [
1414
]
1515
dependencies = [
1616
"click>=8.3.1",
17-
"rsmetacheck>=0.3.1",
17+
"rsmetacheck>=0.3.2",
1818
"python-dotenv>=1.0.0",
1919
"requests>=2.32.5",
2020
"setuptools[test]<83.0.0",

src/sw_metadata_bot/config/schemas.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""configurations schemas for the bot, defined using Pydantic models for validation and parsing of config files."""
2+
13
import json
24
from datetime import datetime, timezone
35
from pathlib import Path
@@ -15,11 +17,12 @@ class AnalysisConfig(BaseModel):
1517
"""
1618

1719
repositories: list[str]
18-
generate_codemeta_if_missing: Optional[bool] = True
20+
generate_codemeta_if_missing: bool = True
1921

2022
@field_validator("repositories", mode="after")
2123
@classmethod
2224
def validate_repositories(cls, v):
25+
"""Check that repositories list is not empty"""
2326
if not v:
2427
raise ValueError("Repositories list cannot be empty")
2528
return v

src/sw_metadata_bot/publish.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,33 @@ class FakeIssueClient:
2323
"""Issue client used only for local publish simulation."""
2424

2525
def __init__(self, comments_for=None):
26+
"""
27+
Initialize the fake issue client.
28+
"""
2629
self._comments_for = comments_for or (lambda url: [])
2730
self.created: list[tuple[str, str, str]] = []
2831
self.commented: list[str] = []
2932
self.closed: list[str] = []
3033

3134
def create_issue(self, repo_url: str, title: str, body: str) -> str:
35+
"""Create an issue and return a simulated issue URL."""
3236
self.created.append((repo_url, title, body))
3337
return f"{repo_url}/issues/99"
3438

3539
def get_issue(self, issue_url: str) -> dict[str, object]:
40+
"""return simulated issue data, with state 'open' by default (can be overridden by test setup)"""
3641
return {"state": "open"}
3742

3843
def get_issue_comments(self, issue_url: str) -> list[str]:
44+
"""get simulated comments for the issue URL, as provided by the comments_for function"""
3945
return self._comments_for(issue_url)
4046

4147
def add_issue_comment(self, issue_url: str, body: str) -> None:
48+
"""add a comment to the issue URL (recording the action for test verification)"""
4249
self.commented.append(issue_url)
4350

4451
def close_issue(self, issue_url: str) -> None:
52+
"""simulate closing the issue at the given URL (recording the action for test verification)"""
4553
self.closed.append(issue_url)
4654

4755

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)