[project] name = "qiao-mcp" version = "0.3.3" description = "MCP server for intelligent bridge structural design and analysis (桥梁智能设计 MCP 服务器)" readme = "README.md" authors = [ { name = "Sorata", email = "194564851+SorataYang@users.noreply.github.com" } ] requires-python = ">=3.11" license = "Apache-2.0" license-files = ["LICENSE", "NOTICE"] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", ] dependencies = [ # mcp 2.0 移除了 mcp.server.fastmcp(FastMCP 更名为 mcp.server.mcpserver.MCPServer), # 本项目锁定到已验证的 1.29 维护线,直至完成 2.x API 与并发语义迁移 "mcp[cli]>=1.29,<2", "numpy>=2.4.2", "openpyxl>=3.1.5", "pandas>=3.0.1", # qtmodel 自身未声明任何依赖,但 import 时需要 psutil/requests 等,须在此代为声明 "psutil>=5.9", # 2.6.x 曾对桥通做精确版本握手(QT_VERSION 硬编码,不匹配即拒连),故上界一度收在 # <2.7。2.8.2 起该握手被移除(get_connection_status 恒返回 compatible=True), # 跨次版本不再强制用户同步升级桥通,上界因此放宽到 <2.9。 # 下界保持 2.6.3:模型状态守卫按能力探测而非版本判断——PyPI 的 2.8.2 wheel 打包自 # 上游 340e94e,早于 get_model_state 特性(67e2f03)合入,故没有该方法;上游源码 # (如 fb19a6a)同样标 2.8.2 却已带上它。守卫检测到 API 缺失时自动降级放行, # 详见 QtModelProvider.get_model_state 的分层降级说明。 "qtmodel>=2.6.3,<2.9", "requests>=2.32.5", ] [project.scripts] qiao-mcp = "qiao_mcp.server:main" [project.urls] Homepage = "https://github.com/SorataYang/qiao-mcp" Repository = "https://github.com/SorataYang/qiao-mcp" Issues = "https://github.com/SorataYang/qiao-mcp/issues" [build-system] requires = ["uv_build>=0.9.28,<0.12"] build-backend = "uv_build" [tool.pytest.ini_options] # reference_codes/ 下是嵌套的上游仓库(非 submodule),自带 tests/ 与 pyproject.toml。 # 不限定 testpaths 时裸跑 pytest 会递归收集它,并与本仓库同名的 test_model_state.py # 撞出 "import file mismatch"。本仓库的测试只在 tests/ 下。 testpaths = ["tests"] [tool.ruff] target-version = "py311" line-length = 100 [tool.ruff.lint] # E/F = pyflakes+pycodestyle, I = isort, UP = pyupgrade, B = bugbear select = ["E", "F", "I", "UP", "B"] ignore = [ "E501", # 行宽由 line-length 控制,长中英双语 docstring 不强制换行 "E741", # 允许 i/j 等工程惯用单字母变量 ] [tool.ruff.lint.per-file-ignores] # 测试通过 `from conftest import ...` 依赖 pytest 的 rootdir 注入,非标准包导入 "tests/*" = ["E402"] [tool.mypy] python_version = "3.11" # qtmodel 无类型信息;provider 是唯一直接触碰它的边界,单独放宽 ignore_missing_imports = true warn_redundant_casts = true warn_unused_ignores = true # 渐进式:先保证不引入语法/名称级错误,不强制全量类型注解 check_untyped_defs = false [[tool.mypy.overrides]] module = "qtmodel.*" ignore_missing_imports = true [dependency-groups] dev = [ "mypy>=2.3.0", "pytest>=9.1.1", "ruff>=0.15.21", ]