Summary: - Migrate backend to modules/rvw with v2 API routes (/api/v2/rvw) - Add new database fields: selectedAgents, editorialScore, methodologyStatus, picoExtract, isArchived - Create frontend module in frontend-v2/src/modules/rvw - Implement Dashboard with task list, filtering, batch operations - Implement ReportDetail with dual tabs (editorial/methodology) - Implement AgentModal for intelligent agent selection - Register RVW module in moduleRegistry.ts - Add navigation entry in TopNavigation - Update documentation for RVW module status (v3.0) - Update system status document (v2.9) Features: - User can select agents: editorial, methodology, or both - Support batch task execution - Task status filtering - Replace console.log with logger service - Maintain v1 API backward compatibility Tested: Frontend and backend verified locally Status: 85% complete (Phase 1-3 done)
72 lines
896 B
Python
72 lines
896 B
Python
"""测试dc_executor模块"""
|
|
print("测试dc_executor模块导入...")
|
|
try:
|
|
from services.dc_executor import validate_code, execute_pandas_code
|
|
print("✅ 模块导入成功")
|
|
|
|
# 测试验证功能
|
|
print("\n测试validate_code...")
|
|
result = validate_code("df['x'] = 1")
|
|
print(f"✅ validate_code成功: {result}")
|
|
|
|
# 测试执行功能
|
|
print("\n测试execute_pandas_code...")
|
|
test_data = [{"age": 25}, {"age": 65}]
|
|
result = execute_pandas_code(test_data, "df['old'] = df['age'] > 60")
|
|
print(f"✅ execute_pandas_code成功: success={result['success']}")
|
|
if result['success']:
|
|
print(f" 结果: {result['result_data']}")
|
|
|
|
print("\n🎉 所有模块测试通过!")
|
|
|
|
except Exception as e:
|
|
print(f"❌ 测试失败: {e}")
|
|
import traceback
|
|
traceback.print_exc()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|