- engine/bindings:nanobind 官方薄绑定包 hunjing-lingtai(LingtaiEngine RAII、HjStatus→LingtaiError 映射、HJ_ABI_VERSION 导出);scikit-build-core 构建,直接编译引擎源码自包含 - backend 以 editable 路径依赖接入;typings/lingtai.pyi 类型存根(mypy strict 全绿) - app/core/lingtai.py:懒初始化单例 + LingtaiUnavailable fail-closed(禁止宿主第二实现降级) - 迁移 3:message.parser_version;post_message 的 markdown 输入经 hj_transform 规范化为 canonical blocks(展开 code/mermaid/math 并标注 parser_version,契约第 4 节) - 测试 29 项全绿:消息展开、Python/C++ golden 字节一致、引擎注入失败时消息路径显式 500(fail-closed 验证)
57 lines
1.1 KiB
TOML
57 lines
1.1 KiB
TOML
[project]
|
|
name = "hunjing-backend"
|
|
version = "0.1.0"
|
|
description = "Hunjing 后端服务(FastAPI 模块化单体)"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"uvicorn[standard]>=0.32",
|
|
"pydantic>=2.9",
|
|
"pydantic-settings>=2.6",
|
|
"sqlalchemy>=2.0",
|
|
"alembic>=1.14",
|
|
"asyncpg>=0.30",
|
|
"uuid-utils>=0.10",
|
|
"greenlet>=3.5.5",
|
|
"hunjing-lingtai",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.3",
|
|
"pytest-asyncio>=0.24",
|
|
"httpx>=0.27",
|
|
"ruff>=0.8",
|
|
"mypy>=1.13",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["app"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP", "B", "ASYNC"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"alembic/*" = ["E402"]
|
|
"alembic/versions/*" = ["E501"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
strict = true
|
|
mypy_path = "typings"
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
|
|
[tool.uv.sources]
|
|
hunjing-lingtai = { path = "../engine/bindings", editable = true }
|