prgenius-core 2.2.0__tar.gz → 2.2.2__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.2}/PKG-INFO +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/pyproject.toml +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/__init__.py +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/doctor.py +12 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/parser.py +22 -3
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius_core.egg-info/PKG-INFO +1 -1
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/README.md +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/setup.cfg +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/__main__.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/cli.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/contributor_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/issue_evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/maintainer_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/mcp.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/pr_metadata.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/py.typed +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/status.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/structural.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/triage.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius/utils.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius_core.egg-info/SOURCES.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius_core.egg-info/dependency_links.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius_core.egg-info/entry_points.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius_core.egg-info/requires.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/src/prgenius_core.egg-info/top_level.txt +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_cli.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_contributor_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_enrich_cases.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_evaluator_v163.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_extract_features.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_gh_fallback.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_issue_evaluator.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_maintainer_view.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_mcp.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_mcp_stdio.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_parser_smoke.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_pr_metadata.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_product_quality.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_review_case_evidence.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_score_merge.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_smoke_e2e.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_status.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_structural_checks.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_triage.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/tests/test_utils.py +0 -0
- {prgenius_core-2.2.0 → prgenius_core-2.2.2}/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.2
|
|
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.2"
|
|
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"
|
|
@@ -192,7 +192,18 @@ def run_doctor(repo_root: Optional[Path] = None) -> dict:
|
|
|
192
192
|
|
|
193
193
|
warnings: list[str] = []
|
|
194
194
|
if not kb["readable"]:
|
|
195
|
-
|
|
195
|
+
# 顺序重要: 先判**实际使用的 root**是否存在, 再谈"来源"。
|
|
196
|
+
# repo_root_source 说的是模块自解析的结果, 与 --repo-root 无关 ——
|
|
197
|
+
# 用户传了坏路径时若先看 source, 会把"你传的路径不存在"说成
|
|
198
|
+
# "wheel 只装代码", 并错指那个路径是安装位置 (2.2.1 就这么措辞失实过)。
|
|
199
|
+
if not root.exists():
|
|
200
|
+
warnings.append(
|
|
201
|
+
f"the knowledge-base path does not exist: {root} "
|
|
202
|
+
"(pass the pr-genius git clone to --repo-root, or drop --repo-root to use the default)"
|
|
203
|
+
)
|
|
204
|
+
elif not root.is_dir():
|
|
205
|
+
warnings.append(f"the knowledge-base path is not a directory: {root}")
|
|
206
|
+
elif kb["repo_root_source"] == "none":
|
|
196
207
|
# wheel 只装代码,知识库在仓库里 —— 新用户从 PyPI 装完就是这个状态。
|
|
197
208
|
warnings.append(
|
|
198
209
|
"knowledge base not found — the `prgenius-core` wheel ships code only, "
|
|
@@ -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.2
|
|
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
|