Skip to content

Commit 3d63733

Browse files
committed
fix(verify): keep cli's own changed-path helper (tests patch cli.DATA_DIR)
1 parent 516b308 commit 3d63733

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

‎app/verify/cli.py‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313

1414
import argparse
1515
import json
16+
import subprocess
1617
from collections import Counter, defaultdict
1718
from collections.abc import Iterator
1819
from datetime import UTC, datetime
1920
from pathlib import Path
2021
from typing import Any
2122

22-
from app.validate import changed_paths
23+
from app.validate import DATA_DIR
2324

2425
from . import crossref, http_check, ledger, offline, promote, wikidata
2526
from .common import (
@@ -43,7 +44,17 @@ def _now_iso() -> str:
4344

4445
def _changed_data_slugs(base: str = "origin/main") -> set[str]:
4546
"""Changed seed paths against the PR merge base; git errors must stay visible."""
46-
return changed_paths(base)
47+
out = subprocess.run(
48+
["git", "diff", "--name-only", f"{base}...HEAD", "--", "data/"],
49+
capture_output=True, text=True, check=True, cwd=DATA_DIR.parent,
50+
).stdout
51+
# strip leading "data/" so it matches Record.path
52+
paths = set()
53+
for line in out.splitlines():
54+
line = line.strip()
55+
if line.startswith("data/") and line.endswith(".json"):
56+
paths.add(line[len("data/"):])
57+
return paths
4758

4859

4960
def _iter_selected(

0 commit comments

Comments
 (0)