good version for 算法注册

This commit is contained in:
2026-02-15 21:23:28 +08:00
parent 3c03777b97
commit 62ea5d36a5
115 changed files with 9566 additions and 1576 deletions

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env python3
"""检查算法数据"""
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from app.models.database import SessionLocal
from app.models.models import Algorithm
def check_algorithms():
"""检查算法数据"""
db = SessionLocal()
try:
algorithms = db.query(Algorithm).all()
print(f"数据库中共有 {len(algorithms)} 个算法:\n")
for algo in algorithms:
print(f"算法名称: {algo.name}")
print(f" ID: {algo.id}")
print(f" 类型: {algo.type}")
print(f" 技术分类: {algo.tech_category}")
print(f" 输出类型: {algo.output_type}")
print(f" 描述: {algo.description}")
print(f" 状态: {algo.status}")
print(f" 版本数: {len(algo.versions)}")
print()
except Exception as e:
print(f"检查算法数据失败: {e}")
sys.exit(1)
finally:
db.close()
if __name__ == "__main__":
check_algorithms()