- Update ASR, face, OCR, pose processors - Add release pre-flight check script - Add synonym generation, chunk processing scripts - Add face recognition, stamp search utilities
86 lines
2.5 KiB
Python
86 lines
2.5 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
架構文檔完整檢查腳本 - Phase 1 整合成果
|
|
|
|
整合以下檢查:
|
|
1. 文檔一致性檢查 (check_architecture_docs.py)
|
|
2. 代碼與文檔一致性檢查 (check_code_document_consistency.py)
|
|
|
|
使用方法:
|
|
python3 scripts/check_architecture_all.py
|
|
"""
|
|
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def run_check_script(script_name, description):
|
|
"""運行指定的檢查腳本"""
|
|
print(f"\n{'=' * 60}")
|
|
print(f"📋 開始: {description}")
|
|
print(f"{'=' * 60}")
|
|
|
|
script_path = Path(__file__).parent / script_name
|
|
if not script_path.exists():
|
|
print(f"❌ 腳本不存在: {script_name}")
|
|
return False
|
|
|
|
try:
|
|
result = subprocess.run(
|
|
[sys.executable, str(script_path)],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
)
|
|
|
|
print(result.stdout)
|
|
if result.stderr:
|
|
print(f"⚠️ 錯誤輸出: {result.stderr}")
|
|
|
|
return result.returncode == 0
|
|
except Exception as e:
|
|
print(f"❌ 運行腳本時出錯: {e}")
|
|
return False
|
|
|
|
|
|
def main():
|
|
print("🚀 架構文檔完整檢查 - Phase 1 整合")
|
|
print("版本: 2026-04-22")
|
|
print("=" * 60)
|
|
|
|
# 運行文檔一致性檢查
|
|
doc_check_success = run_check_script("check_architecture_docs.py", "文檔一致性檢查")
|
|
|
|
# 運行代碼與文檔一致性檢查
|
|
code_doc_check_success = run_check_script(
|
|
"check_code_document_consistency.py", "代碼與文檔一致性檢查"
|
|
)
|
|
|
|
# 顯示總結
|
|
print(f"\n{'=' * 60}")
|
|
print("📊 檢查總結")
|
|
print(f"{'=' * 60}")
|
|
|
|
print(f"文檔一致性檢查: {'✅ 通過' if doc_check_success else '❌ 失敗'}")
|
|
print(f"代碼與文檔一致性檢查: {'✅ 通過' if code_doc_check_success else '❌ 失敗'}")
|
|
|
|
all_passed = doc_check_success and code_doc_check_success
|
|
if all_passed:
|
|
print(f"\n🎉 所有檢查通過!")
|
|
print("架構文檔符合 Phase 1 標準化要求。")
|
|
else:
|
|
print(f"\n⚠️ 發現問題,請參考檢查結果進行修復。")
|
|
print("提示:")
|
|
print(" 1. 使用 TERMINOLOGY_MAPPING.md 作為術語標準參考")
|
|
print(" 2. 確保設計與實現差異在 DESIGN_IMPLEMENTATION_GAP.md 中記錄")
|
|
print(" 3. 所有文檔應引用 TERMINOLOGY_MAPPING.md")
|
|
|
|
print(f"\n{'=' * 60}")
|
|
print("✅ 完整檢查完成")
|
|
print(f"{'=' * 60}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|