Update method_api_depth.sql
cp .env.example.yml .env.yml
打开 .env.yml 文件,添加你的 GitHub Token:
.env.yml
# GitHub Configuration github_tokens: - ghp_your_first_github_token_here - ghp_your_second_github_token_here
使用 uv 工具创建虚拟环境,并指定 Python 版本为 3.13.9:
uv venv -p 3.13.9
Windows:
.venv\Scripts\activate
Linux/macOS:
source .venv/bin/activate
使用 uv 安装项目依赖:
uv pip install -r requirements.txt
爬取项目 python springf_project.py
项目三方包集合 python third_library_set.py
获取并存储methods表数据 mvn clean compile mvn dependency:build-classpath | Out-File -Encoding UTF8 classpath.txt Get-Content classpath.txt | Select-String "mysql-connector-j" java -cp "$cp;target/classes" JavaParser "E:\repo_examole" "..\src\main\java\db_config.properties"
获取并存储method_call表数据 mvn -q exec:java -Dexec.mainClass="UnifiedCallParser" -Dexec.args="..\db_config.properties"
获取并存储api表数据 mvn exec:java -Dexec.mainClass="ApiParser" -Dexec.args="<project-path> ..\config\db_config.properties"
获取并存储api_call表数据 运行qpi_call.sql内的内容
获取并存储method_api_depth表数据 运行method_api_depth.sql内的内容
github_tokens
base_url
min_stars
request_interval
max_retry_5xx
clone_retry
clone_timeout
该脚本用于:
data/
logs/
.db_config.properties
.llm_config.properties
.env.example.yml
requirements.txt
springf_preject.py
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
benchmark
开发模式
1. 复制环境变量文件
2. 编辑环境变量文件
打开
.env.yml文件,添加你的 GitHub Token:3. 创建虚拟环境
使用 uv 工具创建虚拟环境,并指定 Python 版本为 3.13.9:
4. 激活虚拟环境
Windows:
Linux/macOS:
5. 安装依赖
使用 uv 安装项目依赖:
6. 运行脚本
流程图
配置说明
github_tokens:GitHub Token 列表,用于轮训提高请求速率base_url:GitHub API 基础 URLmin_stars:最小星星数筛选条件request_interval:请求间隔时间(秒)max_retry_5xx:5xx 错误最大重试次数clone_retry:克隆仓库最大重试次数clone_timeout:克隆仓库超时时间(秒)功能说明
该脚本用于:
目录结构
data/:存放收集的数据和克隆的仓库logs/:存放日志文件.env.yml:本地配置文件(不提交到 git).db_config.properties:数据库配置文件(不提交到 git).llm_config.properties:模型调用配置文件(不提交到 git).env.example.yml:示例配置文件requirements.txt:项目依赖列表springf_preject.py:主脚本文件