muse-agent-example/pyproject.toml
zizi 0658d178ad 工程底座:单一生成入口、验证期写闸门与并行分片
- Makefile:新增 验收数据库(生成→检查→库层全量,前置校验隔离库连接串)、数据库分片、浏览器测试三个入口;
  格式写入 末尾就地重新生成;数据库测试 与 验收数据库 统一排除 浏览器/网络;快检 不再静默跳过类型门;
  前端旅程 预检补齐四个必需变量;pytest 目标改用仓内解释器(uv run 在嵌套检出会解析到外层环境)。
- 工具/验证锁.py:验证会话持共享锁,写入口用 --执行 在独占锁内落盘,生成/格式写入/索引生成走同一闸门。
- 工具/并行数据库测试.py:按文件分片并行,缺连接串在采集前拒绝。
- 工具/构建编排.py、环境预检.py、构建资源包.py、维护索引.py 与上述口径对齐。
- .gitignore / CI / README / AGENTS:忽略构建产物、CI 与 Makefile 单一口径、README 按实际实现陈述、AGENTS 补日常入口与验证纪律。
2026-09-18 01:14:50 +08:00

86 lines
3.1 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# muse 应用包:安装、命令、依赖与检查配置。
# 边界:只约束安装、构建或编辑配置;不规范化作者正文、不替代业务权限与验收。
# 运行时依赖:数据库、模型传输、HTTP 服务等。
[build-system]
requires = ["hatchling==1.32.0"]
build-backend = "hatchling.build"
[project]
name = "muse"
version = "0.1.0"
description = "Muse:AI 驱动的长篇创作工具(单作者模块化单体)"
requires-python = ">=3.12"
dependencies = [
"fastapi>=0.115",
"httpx>=0.28",
"itsdangerous>=2.2",
"jsonschema>=4.23",
"referencing>=0.28.4",
"psycopg[binary,pool]>=3.2",
"pydantic>=2.0",
"pyyaml>=6.0",
"uvicorn>=0.30",
]
[project.scripts]
muse = "muse.__main__:main"
[dependency-groups]
dev = [
"pytest>=8.3",
"pytest-timeout>=2.3",
"ruff>=0.8",
"pyright>=1.1.390",
]
# 资源发布包(运行资源.zip、清单.json、工作台/)是 gitignore 的生成物:
# 存在时打入 sdist/wheel(artifacts 同时作用于两目标),未生成时不阻塞全新环境安装。
[tool.hatch.build]
# 迁移仅由数据库/迁移强制映射进入轮子,排除可编辑安装的同名投影。
exclude = ["src/muse/资源/迁移/**"]
artifacts = ["src/muse/资源/**", "!src/muse/资源/迁移/**"]
[tool.hatch.build.targets.sdist]
include = ["/src", "/数据库/迁移", "/数据库/初始化", "/pyproject.toml", "/uv.lock", "/README.md"]
[tool.hatch.build.targets.wheel.force-include]
"数据库/迁移" = "muse/资源/迁移"
[tool.hatch.build.targets.wheel]
packages = ["src/muse"]
[tool.pytest.ini_options]
# 只收集新版用例目录;旧实现与旧测试树已退出本仓,不参与同一收集。
testpaths = ["tests/单元", "tests/契约", "tests/集成", "tests/架构", "tests/迁移", "tests/端到端", "tests/真实调用"]
# 独立维护脚本以其目录为导入根;不把旧 muse 树加入路径。
pythonpath = ["src", "工具", "数据库/旧库迁移"]
# 架构/契约/集成/单元 是目录级组织;完整用例身份绑定登记文件与符号。
addopts = "--strict-markers --timeout=120"
markers = [
"安装包: 实际wheel/发布资源验收,不属于无包开发层",
"case_id(id): 源码中的稳定用例身份与人工语义",
"数据库: 显式外部执行需要 MUSE_TEST_DATABASE_URL;缺配置失败",
"网络: 需要真实网络访问;必须显式标记",
"真实模型: 需要真实模型调用与预算授权;必须显式标记",
"浏览器: 需要真实浏览器与后端;必须显式标记",
"宿主: 需要固定真实宿主与隔离数据库;必须显式选择",
"慢: 单例超过三分钟的真实链用例;发现期默认排除,最终全量才跑",
]
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["src", "tests", "工具", "数据库/旧库迁移"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP"]
[tool.pyright]
venvPath = "."
venv = ".venv"
include = ["src", "工具", "数据库/旧库迁移"]
extraPaths = ["src", "工具", "数据库/旧库迁移"]
pythonVersion = "3.12"
typeCheckingMode = "standard"