prgenius-core 2.2.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/PKG-INFO +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/pyproject.toml +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/__init__.py +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/doctor.py +8 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/parser.py +22 -3
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius_core.egg-info/PKG-INFO +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/README.md +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/setup.cfg +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/__main__.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/cli.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/contributor_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/issue_evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/maintainer_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/mcp.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/pr_metadata.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/py.typed +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/status.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/structural.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/triage.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius/utils.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius_core.egg-info/SOURCES.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius_core.egg-info/dependency_links.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius_core.egg-info/entry_points.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius_core.egg-info/requires.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/src/prgenius_core.egg-info/top_level.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_cli.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_contributor_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_enrich_cases.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_evaluator_v163.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_extract_features.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_gh_fallback.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_issue_evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_maintainer_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_mcp.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_mcp_stdio.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_parser_smoke.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_pr_metadata.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_product_quality.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_review_case_evidence.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_score_merge.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_smoke_e2e.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_status.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_structural_checks.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_triage.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_utils.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.1}/tests/test_validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: prgenius-core
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Evidence-backed lookup for big-repo PR contributions. Local-only, zero-runtime, stdlib-first. Renamed from `prgenius` to avoid PyPI name collision with an unrelated 2024 GPT-3 PR-description tool. Distribution renamed again in v0.7.8: `prgenius-kb` → `prgenius-core` (aligned with `misakanet-core` convention).
|
|
5
5
|
Author: pr-genius contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "prgenius-core"
|
|
3
|
-
version = "2.2.
|
|
3
|
+
version = "2.2.1"
|
|
4
4
|
description = "Evidence-backed lookup for big-repo PR contributions. Local-only, zero-runtime, stdlib-first. Renamed from `prgenius` to avoid PyPI name collision with an unrelated 2024 GPT-3 PR-description tool. Distribution renamed again in v0.7.8: `prgenius-kb` → `prgenius-core` (aligned with `misakanet-core` convention)."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.9"
|
|
@@ -201,6 +201,14 @@ def run_doctor(repo_root: Optional[Path] = None) -> dict:
|
|
|
201
201
|
"(or export PRGENIUS_REPO_ROOT=<clone>). "
|
|
202
202
|
f"Looked near {root} (that path is not a repo root, just where the package is installed)"
|
|
203
203
|
)
|
|
204
|
+
elif not root.exists():
|
|
205
|
+
# 路径根本不存在 —— 说"anti-patterns/ missing"是误导, 用户会去找目录
|
|
206
|
+
warnings.append(
|
|
207
|
+
f"--repo-root points at a path that does not exist: {root} "
|
|
208
|
+
"(pass the pr-genius git clone, or drop --repo-root to use the default)"
|
|
209
|
+
)
|
|
210
|
+
elif not root.is_dir():
|
|
211
|
+
warnings.append(f"--repo-root is not a directory: {root}")
|
|
204
212
|
else:
|
|
205
213
|
warnings.append(f"knowledge base not readable at {root} (anti-patterns/ missing)")
|
|
206
214
|
missing_kw = anti_total - anti_with_kw - anti_json
|
|
@@ -304,6 +304,21 @@ def parse_frontmatter(text: str) -> dict:
|
|
|
304
304
|
|
|
305
305
|
# ---------- higher-level iterators ----------
|
|
306
306
|
|
|
307
|
+
def _iter_dir(path: Path) -> list[Path]:
|
|
308
|
+
"""列出目录条目; 目录不存在或不可读时返回空表, 不抛.
|
|
309
|
+
|
|
310
|
+
为什么: `--repo-root` 传了不存在的路径时, `root.iterdir()` 直接
|
|
311
|
+
FileNotFoundError 冒成 traceback —— 用户只想要一句"这个路径不对"。
|
|
312
|
+
取数函数不该因为输入不存在就崩; 它们返回空, 由调用方决定怎么报
|
|
313
|
+
(doctor 会说 knowledge base not readable, 这才是用户该看到的)。
|
|
314
|
+
"""
|
|
315
|
+
try:
|
|
316
|
+
return sorted(path.iterdir())
|
|
317
|
+
except (FileNotFoundError, NotADirectoryError, PermissionError, OSError):
|
|
318
|
+
return []
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
307
322
|
def iter_profiles(repo_root: str | Path) -> Iterator[dict]:
|
|
308
323
|
"""Yield each Repo Profile dict under `<repo_root>/<folder>/index.md` or `<repo_root>/profiles/<folder>/index.md`."""
|
|
309
324
|
root = Path(repo_root)
|
|
@@ -317,7 +332,7 @@ def iter_profiles(repo_root: str | Path) -> Iterator[dict]:
|
|
|
317
332
|
}
|
|
318
333
|
|
|
319
334
|
# Scan root-level profile dirs
|
|
320
|
-
for sub in
|
|
335
|
+
for sub in _iter_dir(root):
|
|
321
336
|
if not sub.is_dir() or sub.name in skip or sub.name.startswith("."):
|
|
322
337
|
continue
|
|
323
338
|
idx = sub / "index.md"
|
|
@@ -331,7 +346,7 @@ def iter_profiles(repo_root: str | Path) -> Iterator[dict]:
|
|
|
331
346
|
# Scan profiles/ subdirectory
|
|
332
347
|
profiles_dir = root / "profiles"
|
|
333
348
|
if profiles_dir.is_dir():
|
|
334
|
-
for sub in
|
|
349
|
+
for sub in _iter_dir(profiles_dir):
|
|
335
350
|
if not sub.is_dir() or sub.name.startswith("."):
|
|
336
351
|
continue
|
|
337
352
|
idx = sub / "index.md"
|
|
@@ -346,7 +361,11 @@ def iter_profiles(repo_root: str | Path) -> Iterator[dict]:
|
|
|
346
361
|
def iter_case_studies(repo_root: str | Path) -> Iterator[dict]:
|
|
347
362
|
"""Yield each PR Case Study dict under repo root."""
|
|
348
363
|
root = Path(repo_root)
|
|
349
|
-
|
|
364
|
+
try:
|
|
365
|
+
_case_paths = sorted(root.rglob("pr-*.md"))
|
|
366
|
+
except (FileNotFoundError, NotADirectoryError, PermissionError, OSError):
|
|
367
|
+
_case_paths = []
|
|
368
|
+
for path in _case_paths:
|
|
350
369
|
try:
|
|
351
370
|
loaded = load(path)
|
|
352
371
|
except Exception:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: prgenius-core
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Evidence-backed lookup for big-repo PR contributions. Local-only, zero-runtime, stdlib-first. Renamed from `prgenius` to avoid PyPI name collision with an unrelated 2024 GPT-3 PR-description tool. Distribution renamed again in v0.7.8: `prgenius-kb` → `prgenius-core` (aligned with `misakanet-core` convention).
|
|
5
5
|
Author: pr-genius contributors
|
|
6
6
|
License-Expression: MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|