File tree Expand file tree Collapse file tree 4 files changed +104
-15
lines changed Expand file tree Collapse file tree 4 files changed +104
-15
lines changed Original file line number Diff line number Diff line change 1+ name : CodeQL Security Analysis
2+
3+ on :
4+ push :
5+ paths-ignore :
6+ - ' **/*.md'
7+ - ' **/*.txt'
8+ - ' **/.gitignore'
9+ - ' **/LICENSE*'
10+ - ' **/README*'
11+ branches-ignore :
12+ - ' dependabot/**'
13+ pull_request :
14+ paths-ignore :
15+ - ' **/*.md'
16+ - ' **/*.txt'
17+ - ' **/.gitignore'
18+ - ' **/LICENSE*'
19+ - ' **/README*'
20+ branches-ignore :
21+ - ' dependabot/**'
22+ schedule :
23+ - cron : ' 0 0 1 * *' # 每月1号运行
24+ workflow_dispatch :
25+
26+ jobs :
27+ analyze :
28+ name : CodeQL Analysis
29+ runs-on : ubuntu-latest
30+ permissions :
31+ security-events : write
32+ actions : read
33+ contents : read
34+
35+ steps :
36+ - name : Checkout repository
37+ uses : actions/checkout@v5
38+ with :
39+ fetch-depth : 1
40+
41+ - name : Setup Python
42+ uses : actions/setup-python@v6
43+
44+ - name : Install uv and dependencies
45+ run : |
46+ pip install uv
47+ uv sync --dev
48+
49+ - name : Initialize CodeQL
50+ uses : github/codeql-action/init@v4
51+ with :
52+ languages : python
53+
54+ - name : Autobuild
55+ uses : github/codeql-action/autobuild@v4
56+
57+ - name : Perform CodeQL Analysis
58+ uses : github/codeql-action/analyze@v4
Original file line number Diff line number Diff line change 1414 steps :
1515 - uses : actions/checkout@v5
1616 - name : Setup Node.js
17- uses : actions/setup-node@v5
17+ uses : actions/setup-node@v6
1818 # ISO Langusge Codes: https://cloud.google.com/translate/docs/languages
1919 - name : Adding README - English
2020 uses : dephraiim/translate-readme@main
Original file line number Diff line number Diff line change @@ -162,4 +162,5 @@ cython_debug/
162162# Others
163163.vscode
164164logs
165- movie.parts
165+ movie.parts
166+ uv.lock
Original file line number Diff line number Diff line change 2323
2424## 🚀 快速开始
2525
26- ### 安装依赖
26+ ### 安装 uv
2727
28- 推荐使用虚拟环境:
28+ 首先需要安装 uv - 极速的 Python 包管理器和项目工具链:
29+
30+ ** 使用 pip 安装(跨平台):**
31+
32+ ``` bash
33+ pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple
34+ ```
35+
36+ ** 验证安装:**
37+
38+ ``` bash
39+ uv --version
40+ ```
41+
42+ ### 安装项目依赖
43+
44+ 使用 uv 管理项目依赖:
2945
3046``` bash
31- # 创建虚拟环境
32- python -m venv venv
47+ # 使用 uv 创建虚拟环境并安装所有依赖(一步完成)
48+ uv sync --dev
3349
34- # 激活虚拟环境 (Linux/macOS)
35- source venv/bin/activate
50+ # 或者分步执行:
51+ # 1. 创建虚拟环境(默认在 .venv 目录)
52+ uv venv
3653
37- # 或使用提供的脚本激活
38- source activate_venv.sh
54+ # 2. 激活虚拟环境 (Linux/macOS)
55+ source .venv/bin/activate
3956
40- # 安装依赖
41- pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
57+ # 3. 安装项目依赖(可编辑模式)
58+ uv pip install -e .
4259```
4360
4461### 同步依赖文件
@@ -49,10 +66,23 @@ pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
4966# 生成 requirements.txt
5067python sync_req.py
5168
52- # 使用生成的 requirements.txt 安装依赖
53- pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
69+ # 使用 uv 通过 requirements.txt 安装依赖
70+ uv pip install -r requirements.txt
71+ ```
72+
73+ ### 使用清华镜像加速(可选)
74+
75+ 如果需要使用国内镜像源:
76+
77+ ``` bash
78+ # 设置环境变量使用清华镜像
79+ export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
80+ uv sync --dev
81+
82+ # 或者单次命令指定镜像
83+ uv pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
5484```
5585
5686### 使用说明
5787
58- 👉 直接 ` cd ` 进对应目录,` python xxx.py -h ` 即可开玩 !
88+ 👉 直接 ` cd ` 进对应目录,` uv run python xxx.py -h` 查看具体用法 !
You can’t perform that action at this time.
0 commit comments