chore(repo): 移除误跟踪的 egg-info 构建产物并新增忽略规则

server/src/x_financial_server.egg-info/ 为 uv/pip 构建产物,此前被误跟踪。
本次 git rm --cached 移除跟踪(本地保留),.gitignore 新增 *.egg-info/ 规则避免后续误入库。
This commit is contained in:
caoxiaozhu
2026-06-24 21:59:09 +08:00
parent bc560145a4
commit bb681aa1f3
6 changed files with 1 additions and 259 deletions

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ web/.vite/
.omc/
.omx/
.claude/
*.egg-info/
.codex/*
!.codex/skills/
.codex/skills/*

View File

@@ -1,97 +0,0 @@
Metadata-Version: 2.4
Name: x-financial-server
Version: 0.1.0
Summary: Backend service for X-Financial reimbursement and approval platform.
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: fastapi<1.0.0,>=0.115.0
Requires-Dist: uvicorn[standard]<1.0.0,>=0.30.0
Requires-Dist: sqlalchemy<3.0.0,>=2.0.36
Requires-Dist: alembic<2.0.0,>=1.14.0
Requires-Dist: psycopg[binary]<4.0.0,>=3.2.0
Requires-Dist: PyJWT<3.0.0,>=2.9.0
Requires-Dist: pydantic-settings<3.0.0,>=2.6.0
Requires-Dist: python-dotenv<2.0.0,>=1.0.1
Requires-Dist: email-validator<3.0.0,>=2.2.0
Requires-Dist: python-multipart<1.0.0,>=0.0.20
Requires-Dist: openpyxl<4.0.0,>=3.1.5
Requires-Dist: lightrag-hku<1.5.0,>=1.4.16
Requires-Dist: qdrant-client<2.0.0,>=1.18.0
Provides-Extra: dev
Requires-Dist: pytest<9.0.0,>=8.3.0; extra == "dev"
Requires-Dist: httpx<1.0.0,>=0.28.0; extra == "dev"
Requires-Dist: ruff<1.0.0,>=0.8.0; extra == "dev"
Provides-Extra: redis
Requires-Dist: redis<6.0.0,>=5.2.0; extra == "redis"
# Server
后端已按 `FastAPI + PostgreSQL + SQLAlchemy + Alembic` 起好基础工程。
## 为什么先选 PostgreSQL
这个项目是报销、审批、员工、流程、审计记录为主,核心特点是:
- 强事务
- 多表关联明显
- 审批流和审计日志需要一致性
- 后续大概率要做复杂查询、统计和条件筛选
这类系统优先选关系型数据库更合适,`PostgreSQL` 是当前默认推荐。
## Redis 要不要现在上
现在 **不是必须**。
先不把 Redis 作为启动前置,原因很直接:
- 当前第一阶段先把核心业务表、接口、权限、审批流跑通
- 如果一开始就把 Redis 绑死,会增加部署和排障复杂度
Redis 更适合后面这些场景:
- 登录态 / token 黑名单
- 热点数据缓存
- 限流
- 分布式锁
- 消息队列 / 后台任务
所以现在的策略是:
- 主数据库:`PostgreSQL`
- Redis`可选能力`,配置已预留,但不是必需依赖
## 目录
- `src/app/`:应用代码
- `alembic/`:数据库迁移
- `tests/`:测试
## 启动
1. 创建虚拟环境并安装依赖
```bash
cd server
python -m venv .venv
.venv\\Scripts\\activate
pip install -e .[dev]
```
2. 在项目根目录准备环境变量
```bash
copy ..\\.env.example ..\\.env
```
3. 启动服务
```bash
uvicorn app.main:app --reload --app-dir src
```
## 迁移
```bash
alembic upgrade head
```

View File

@@ -1,139 +0,0 @@
README.md
pyproject.toml
src/app/__init__.py
src/app/main.py
src/app/api/__init__.py
src/app/api/deps.py
src/app/api/router.py
src/app/api/v1/__init__.py
src/app/api/v1/router.py
src/app/api/v1/endpoints/__init__.py
src/app/api/v1/endpoints/agent_assets.py
src/app/api/v1/endpoints/agent_runs.py
src/app/api/v1/endpoints/audit_logs.py
src/app/api/v1/endpoints/auth.py
src/app/api/v1/endpoints/bootstrap.py
src/app/api/v1/endpoints/employees.py
src/app/api/v1/endpoints/health.py
src/app/api/v1/endpoints/knowledge.py
src/app/api/v1/endpoints/ocr.py
src/app/api/v1/endpoints/ontology.py
src/app/api/v1/endpoints/orchestrator.py
src/app/api/v1/endpoints/reimbursements.py
src/app/api/v1/endpoints/settings.py
src/app/api/v1/endpoints/system_logs.py
src/app/core/__init__.py
src/app/core/admin_secret.py
src/app/core/agent_enums.py
src/app/core/bootstrap.py
src/app/core/config.py
src/app/core/logging.py
src/app/core/openapi.py
src/app/core/secret_box.py
src/app/core/security.py
src/app/db/__init__.py
src/app/db/base.py
src/app/db/base_class.py
src/app/db/session.py
src/app/middleware/__init__.py
src/app/middleware/logging.py
src/app/models/__init__.py
src/app/models/agent_asset.py
src/app/models/agent_conversation.py
src/app/models/agent_run.py
src/app/models/approval.py
src/app/models/audit_log.py
src/app/models/employee.py
src/app/models/employee_change_log.py
src/app/models/financial_record.py
src/app/models/organization.py
src/app/models/reimbursement.py
src/app/models/role.py
src/app/models/system_model_setting.py
src/app/models/system_setting.py
src/app/models/system_setting_secret.py
src/app/repositories/__init__.py
src/app/repositories/agent_asset.py
src/app/repositories/agent_run.py
src/app/repositories/audit_log.py
src/app/repositories/employee.py
src/app/repositories/reimbursement.py
src/app/repositories/settings.py
src/app/schemas/__init__.py
src/app/schemas/agent_asset.py
src/app/schemas/agent_run.py
src/app/schemas/audit_log.py
src/app/schemas/auth.py
src/app/schemas/bootstrap.py
src/app/schemas/common.py
src/app/schemas/employee.py
src/app/schemas/knowledge.py
src/app/schemas/ocr.py
src/app/schemas/ontology.py
src/app/schemas/orchestrator.py
src/app/schemas/reimbursement.py
src/app/schemas/settings.py
src/app/schemas/system_log.py
src/app/schemas/user_agent.py
src/app/services/__init__.py
src/app/services/agent_asset_spreadsheet.py
src/app/services/agent_assets.py
src/app/services/agent_conversations.py
src/app/services/agent_foundation.py
src/app/services/agent_runs.py
src/app/services/audit.py
src/app/services/auth.py
src/app/services/document_intelligence.py
src/app/services/employee.py
src/app/services/employee_seed.py
src/app/services/expense_claims.py
src/app/services/expense_rule_runtime.py
src/app/services/hermes_sync.py
src/app/services/knowledge.py
src/app/services/knowledge_index_tasks.py
src/app/services/knowledge_normalizer.py
src/app/services/knowledge_rag.py
src/app/services/knowledge_scheduler.py
src/app/services/knowledge_sync.py
src/app/services/model_connectivity.py
src/app/services/ocr.py
src/app/services/ontology.py
src/app/services/orchestrator.py
src/app/services/reimbursement.py
src/app/services/runtime_chat.py
src/app/services/settings.py
src/app/services/system_hermes.py
src/app/services/system_logs.py
src/app/services/user_agent.py
src/x_financial_server.egg-info/PKG-INFO
src/x_financial_server.egg-info/SOURCES.txt
src/x_financial_server.egg-info/dependency_links.txt
src/x_financial_server.egg-info/requires.txt
src/x_financial_server.egg-info/top_level.txt
tests/test_agent_asset_onlyoffice_key.py
tests/test_agent_asset_service.py
tests/test_agent_asset_spreadsheet_import.py
tests/test_agent_foundation_endpoints.py
tests/test_agent_runs_service.py
tests/test_auth_service.py
tests/test_config_settings_reload.py
tests/test_document_intelligence.py
tests/test_employee_service.py
tests/test_env_file_precedence.py
tests/test_expense_claim_service.py
tests/test_imports.py
tests/test_knowledge_normalizer.py
tests/test_knowledge_onlyoffice_config.py
tests/test_knowledge_rag_service.py
tests/test_knowledge_service.py
tests/test_ocr_endpoints.py
tests/test_ocr_service.py
tests/test_ontology_service.py
tests/test_openapi_schema.py
tests/test_reimbursement_endpoints.py
tests/test_runtime_chat_service.py
tests/test_server_start_dependencies.py
tests/test_settings_persistence.py
tests/test_settings_service.py
tests/test_system_logs_service.py
tests/test_user_agent_service.py

View File

@@ -1,21 +0,0 @@
fastapi<1.0.0,>=0.115.0
uvicorn[standard]<1.0.0,>=0.30.0
sqlalchemy<3.0.0,>=2.0.36
alembic<2.0.0,>=1.14.0
psycopg[binary]<4.0.0,>=3.2.0
PyJWT<3.0.0,>=2.9.0
pydantic-settings<3.0.0,>=2.6.0
python-dotenv<2.0.0,>=1.0.1
email-validator<3.0.0,>=2.2.0
python-multipart<1.0.0,>=0.0.20
openpyxl<4.0.0,>=3.1.5
lightrag-hku<1.5.0,>=1.4.16
qdrant-client<2.0.0,>=1.18.0
[dev]
pytest<9.0.0,>=8.3.0
httpx<1.0.0,>=0.28.0
ruff<1.0.0,>=0.8.0
[redis]
redis<6.0.0,>=5.2.0