From 202415dd19eae87b31ee21f0589666423ccd13f3 Mon Sep 17 00:00:00 2001 From: Justin Gu <97915@qq.com> Date: Sat, 27 Jun 2026 04:22:50 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20CLAUDE.md=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=96=87=E4=BB=B6=EF=BC=8C=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E9=80=92=E4=BA=A4=E5=88=B0=20GitHub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLAUDE.md 含本地开发指引(venv 使用要求等),属于本地配置。 git rm --cached 移除跟踪(本地文件保留),加入 .gitignore 防止误加回。 --- .gitignore | 3 +++ CLAUDE.md | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 885147a..3de151b 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ signals.json # 本地独立脚本(不属于 easy_tdx 库,依赖外部 unified_config / sqlalchemy) src/easy_tdx/exchange_margin.py + +# 本地文件,不递交到 GitHub +CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md index ad5bbe0..9a979a1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,23 @@ # CLAUDE.md -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +This file provides guidance to Claude Code (claude.ai/code) when working with this repository. + +## 虚拟环境(必须) + +本项目所有 Python 命令**必须使用项目根目录下的 venv 虚拟环境**,不要用系统 Python 或其他环境。 + +```bash +# 激活 venv(Windows / Git Bash) +source venv/Scripts/activate + +# 或直接用 venv 的解释器(无需激活) +venv/Scripts/python.exe -m pytest ... +venv/Scripts/python.exe -m mypy src/ +venv/Scripts/ruff check src/ +venv/Scripts/easy-tdx --help +``` + +easy-tdx 已在 venv 中以 editable 模式安装(`pip install -e .`),修改 `src/` 后即时生效,无需重装。 ## Build / Test / Lint