Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
"programmingLanguage": "Python 3",
"releaseNotes": "## What's Changed\n* Fix beta test feedbacks by @francoto in https://github.com/SoftwareUnderstanding/sw-metadata-bot/pull/7\n\n\n**Full Changelog**: https://github.com/SoftwareUnderstanding/sw-metadata-bot/compare/v0.1.0...v0.1.1",
"softwareRequirements": [
"metacheck>=0.2.0",
"requests>=2.32.5"
"click>=8.3.1",
"rsmetacheck>=0.2.1",
"python-dotenv>=1.0.0",
"requests>=2.32.5"
],
"version": "0.3.1",
"codemeta:contIntegration": {
Expand Down
6 changes: 3 additions & 3 deletions coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions interrogate_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ authors = [
]
dependencies = [
"click>=8.3.1",
"metacheck>=0.2.1",
"rsmetacheck>=0.2.1",
"python-dotenv>=1.0.0",
"requests>=2.32.5",
"setuptools[test]<82.0.0",
]

keywords = ["codemeta", "metadata", "bot", "quality software"]
Expand Down Expand Up @@ -66,8 +67,6 @@ packages = { find = { where = ["src"] } }
# Start year for copyright range (displayed as "YYYY–present" in docs)
copyright_year = "2026"

[tool.uv.sources]
metacheck = { git = "https://github.com/SoftwareUnderstanding/RsMetaCheck"}

[tool.pytest.ini_options]
testpaths = ["tests"]
Expand Down Expand Up @@ -109,4 +108,4 @@ color = true
omit-covered-files = false
# output file location
generate-badge = "."
badge-format = "svg"
badge-format = "svg"
4 changes: 2 additions & 2 deletions src/sw_metadata_bot/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
resolve_snapshot_tag,
sanitize_repo_name,
)
from .metacheck_wrapper import metacheck_command
from .rsmetacheck_wrapper import rsmetacheck_command

SNAPSHOT_TAG_PATTERN = re.compile(r"^(\d{8})(?:_(\d+))?$")
SNAPSHOT_INCREMENT_PATTERN = re.compile(r"^(.+?)_(\d+)$")
Expand Down Expand Up @@ -214,7 +214,7 @@ def run_pipeline(

if not reused_previous:
analysis_runtime.run_metacheck_for_repo(
repo_url, repo_folder, metacheck_command
repo_url, repo_folder, rsmetacheck_command
)

normalized_repo = analysis_runtime.normalize_repo_url(repo_url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
default=0.8,
help="SoMEF confidence threshold (default: 0.8).",
)
def metacheck_command(
def rsmetacheck_command(
input, skip_somef, somef_output, pitfalls_output, analysis_output, threshold
):
"""Run metacheck to detect metadata pitfalls in repositories."""
# Convert click arguments to sys.argv format for metacheck's argparse
argv = ["metacheck"]
"""Run rsmetacheck to detect metadata pitfalls in repositories."""
# Convert click arguments to sys.argv format for rsmetacheck's argparse
argv = ["rsmetacheck"]

# Add input files
argv.extend(["--input", input.strip()])
Expand Down
20 changes: 10 additions & 10 deletions tests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def test_run_pipeline_invokes_metacheck_and_writes_reports(monkeypatch, tmp_path
"""Invoke metacheck with expected args and write analysis reports per snapshot."""
calls: dict[str, dict] = {}

def fake_metacheck_main(*, args, standalone_mode):
def fake_rsmetacheck_main(*, args, standalone_mode):
"""Capture metacheck invocation arguments for assertions."""
calls["metacheck"] = {"args": args, "standalone_mode": standalone_mode}

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_rsmetacheck_main)

output_root = tmp_path / "outputs"
config = _write_config(
Expand Down Expand Up @@ -165,7 +165,7 @@ def fake_metacheck_main(*, args, standalone_mode):
"""Accept metacheck invocation without side effects."""
return None

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)

output_root = tmp_path / "outputs"
config = _write_config(
Expand Down Expand Up @@ -288,7 +288,7 @@ def fake_metacheck_main(*, args, standalone_mode):
"""Capture metacheck invocation to keep test side-effect free."""
calls["metacheck"] = {"args": args, "standalone_mode": standalone_mode}

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)

output_root = tmp_path / "outputs"
config = _write_config(
Expand Down Expand Up @@ -327,7 +327,7 @@ def fake_metacheck_main(*, args, standalone_mode):
"""Capture metacheck invocation arguments for assertions."""
calls["metacheck"] = {"args": args, "standalone_mode": standalone_mode}

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)

output_root = tmp_path / "outputs"
config = _write_config(
Expand Down Expand Up @@ -416,7 +416,7 @@ def fake_metacheck_main(*, args, standalone_mode):
"""Track unexpected metacheck invocation."""
called["metacheck"] = True

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(
commit_lookup, "get_repo_head_commit", lambda repo_url: "abc123"
)
Expand Down Expand Up @@ -512,7 +512,7 @@ def fake_metacheck_main(*, args, standalone_mode):
)
(repo_folder / "somef_output.json").write_text("{}")

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)

def fake_get_head(repo_url: str) -> str | None:
"""Return deterministic commit hash for unchanged repo."""
Expand Down Expand Up @@ -617,7 +617,7 @@ def fake_metacheck_main(*, args, standalone_mode):
"""Record the call arguments for metacheck."""
calls["metacheck"] = {"args": args, "standalone_mode": standalone_mode}

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)

output_root = tmp_path / "outputs"
config = _write_config(
Expand Down Expand Up @@ -654,7 +654,7 @@ def fake_metacheck_main(*, args, standalone_mode):
"""Mark metacheck as called."""
called["metacheck"] = True

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(
commit_lookup, "get_repo_head_commit", lambda repo_url: "abc123"
)
Expand Down Expand Up @@ -731,7 +731,7 @@ def fake_metacheck_main(*, args, standalone_mode):
"""Mark metacheck as called."""
called["metacheck"] = True

monkeypatch.setattr(pipeline.metacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(pipeline.rsmetacheck_command, "main", fake_metacheck_main)
monkeypatch.setattr(
commit_lookup, "get_repo_head_commit", lambda repo_url: "abc123"
)
Expand Down
Loading
Loading