提交
This commit is contained in:
1 parent
be4fab78e1
commit
15ed25e33b
31 files changed
+146177
-1826
No files matched your search
@@ -96,12 +96,8 @@ from graphify.report import generate
|
||||
from graphify.export import to_json, to_html
|
||||
from pathlib import Path
|
||||
|
||||
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text()) if Path('graphify-out/.graphify_extract.json').exists() else None
|
||||
if extraction is None:
|
||||
print('ERROR: No existing extraction found. Run full build first.')
|
||||
sys.exit(1)
|
||||
|
||||
# Re-extract AST for all code files (fast, deterministic)
|
||||
# 注:不依赖旧的 .graphify_extract.json;缺失时从头提取即可
|
||||
from graphify.detect import detect
|
||||
detection = detect(Path('${src_dir}'))
|
||||
Path('graphify-out/.graphify_detect.json').write_text(json.dumps(detection))
|
||||
@@ -166,8 +162,8 @@ print(f'Report: graphify-out/GRAPH_REPORT.md')
|
||||
return 1
|
||||
}
|
||||
|
||||
# Cleanup temp files
|
||||
rm -f graphify-out/.graphify_detect.json graphify-out/.graphify_extract.json graphify-out/.graphify_ast.json graphify-out/.graphify_incremental.json graphify-out/.graphify_analysis.json graphify-out/.graphify_labels.json
|
||||
# Cleanup temp files(保留 .graphify_extract.json 供下次增量更新)
|
||||
rm -f graphify-out/.graphify_detect.json graphify-out/.graphify_ast.json graphify-out/.graphify_incremental.json
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
echo "[graphify] ${label} 图谱更新完成 ✓"
|
||||
|
||||
Reference in new issue
Block a user