- strawberry-graphql[asgi] dependency added - 13 Federation 2 types: ClassPerformance/StudentWeakness/Dashboards/Mastery/ErrorBook - 11 Query resolvers delegate to existing analytics/mastery services - RouterAuthMiddleware validates Router-Authorization header on /graphql - GraphQL endpoint mounted at /graphql alongside existing REST endpoints
38 lines
1.3 KiB
TOML
38 lines
1.3 KiB
TOML
[project]
|
||
name = "data-ana-service"
|
||
version = "1.0.0"
|
||
description = "数据分析服务 - ClickHouse 宽表 + CDC + 掌握度算法 + 预警"
|
||
requires-python = ">=3.12"
|
||
dependencies = [
|
||
# 通过 workspace 继承 shared-py 集中声明的共享库版本
|
||
"edu-shared-py",
|
||
# 服务特有依赖(非共享库)
|
||
"clickhouse-connect>=0.7.0",
|
||
# CDC 链路:消费 Debezium 写入 Kafka 的 MySQL binlog 变更事件
|
||
"aiokafka>=0.11.0",
|
||
# gRPC:AnalyticsService 12 RPC + HealthService(端口 50055)
|
||
"grpcio-health-checking>=1.66.0",
|
||
# protobuf 运行时(buf generate 生成的 stub 依赖)
|
||
"protobuf>=5.28.0",
|
||
# GraphQL Federation 2 子图(v2.1 M1,Apollo Router 组合)
|
||
"strawberry-graphql[asgi]>=0.257.0",
|
||
]
|
||
|
||
[tool.uv.sources]
|
||
edu-shared-py = { workspace = true }
|
||
|
||
[tool.ruff]
|
||
line-length = 100
|
||
target-version = "py312"
|
||
|
||
[tool.ruff.lint]
|
||
select = ["E", "F", "I", "N", "W", "UP", "B", "SIM"]
|
||
|
||
[tool.ruff.lint.per-file-ignores]
|
||
# gRPC servicer 方法必须用 PascalCase(proto 契约约定),N802 不适用
|
||
"src/data_ana/grpc_server.py" = ["N802"]
|
||
# FastAPI 标准模式:Depends/Query 在参数默认值中调用,B008 不适用
|
||
"src/data_ana/main.py" = ["B008"]
|
||
# 自动生成的 protobuf 代码,不做任何 lint 校验
|
||
"src/generated_proto/*.py" = ["ALL"]
|