# Python-generated files
__pycache__/
*.py[ocd]
build/
dist/
wheels/
*.egg-info

# Virtual environments
.venv

# 测试与覆盖率
.coverage
.coverage.*
htmlcov/
coverage.xml

# 工具缓存
.eslintcache/
.mypy_cache/
.pnpm-store/
.pytmp/
.pytest_cache/
.pyrefly_cache/
.ruff_cache/
.screenshots/
.uv-cache/
.vitest-cache/

# --- Node / frontend ---
node_modules/
frontend/node_modules/
frontend/dist/
frontend/.vite/
frontend/coverage/
frontend/.eslintcache
frontend/package-lock.json
*.tsbuildinfo
package-lock.json

# --- 前端构建产物（pnpm build 后同步到后端 static，源码在 frontend/src 与 frontend/public）---
# 只保留占位文件，产物由 CI / 部署流水线构建，不入库
src/cndb/static/*
!src/cndb/static/.gitkeep

# --- E2E（Playwright）---
.e2e/
.e2e-data/
frontend/e2e-output/
frontend/test-results/
frontend/playwright-report/
frontend/blob-report/
frontend/e2e-report/
reports/
# Playwright 登录态（含 access token，绝不入库）
.auth/
frontend/.auth/

# --- Data & artifacts（绝不提交）---
# 数据库为本地研究数据，体积可达数百 MB
data/
*.db
*.db-wal
*.db-shm
*.sqlite
*.parquet
*.joblib
*.pkl
*.log
logs/

# IDE
.idea/
*_profile.html

# 本地协作产物一律不入库
.trae/*
!.trae/rules/
!.trae/skills/
.claude/
.workbuddy/

# --- OS / editor ---
Thumbs.db
desktop.ini
.DS_Store
.idea/
.vscode/
*.bak
*backup-*.tar.gz
pytest-of-*

# --- 本地环境与凭证 ---
.env
.env.local
.env.*
# 示例配置必须入库（.env.* 会误伤它）
!.env.example
!deploy/.env.prod.example

# Sphinx 文档构建输出
docs/_build/
.preview
