-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathquick_start.py
More file actions
executable file
·70 lines (59 loc) · 1.81 KB
/
quick_start.py
File metadata and controls
executable file
·70 lines (59 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python3
"""
RopeDP 快速启动脚本
"""
import os
import sys
from pathlib import Path
# 添加src目录到Python路径
sys.path.insert(0, str(Path(__file__).parent / 'src'))
def main():
"""主函数"""
print("🚀 RopeDP - 代码仓数据处理工具")
print("=" * 50)
# 检查Python版本
if sys.version_info < (3, 8):
print("❌ 需要Python 3.8或更高版本")
sys.exit(1)
print(f"✅ Python版本: {sys.version}")
# 检查依赖
try:
import click
import git
import pandas
import numpy
import tqdm
import yaml
print("✅ 所有依赖已安装")
except ImportError as e:
print(f"❌ 缺少依赖: {e}")
print("请运行: pip install -r requirements.txt")
sys.exit(1)
# 创建必要目录
directories = ['data', 'data/repos', 'data/reports', 'data/backups', 'data/extracted', 'data/logs']
for directory in directories:
Path(directory).mkdir(parents=True, exist_ok=True)
print("✅ 目录结构已创建")
# 显示使用说明
print("\n📖 使用说明:")
print("1. 添加代码仓库:")
print(" python -m repodp add-repo <仓库URL> <仓库名称>")
print()
print("2. 提取文件内容:")
print(" python -m repodp extract <仓库名称>")
print()
print("3. 清洗文件:")
print(" python -m repodp clean <仓库名称>")
print()
print("4. 去重分析:")
print(" python -m repodp deduplicate <仓库名称>")
print()
print("5. 数据分析:")
print(" python -m repodp analyze <仓库名称>")
print()
print("6. 查看帮助:")
print(" python -m repodp --help")
print()
print("🎉 RopeDP 已准备就绪!")
if __name__ == '__main__':
main()