Files
operating-room-monitor-server/backend/pyproject.toml
Kevin 70431ca3f9 重命名 refs 为 algorithm_subprocesses,并清理误提交的权重与缓存文件。
算法子进程目录仅保留源码与配置;权重、样本 I/O、构建产物通过 .gitignore 离线交付。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 16:10:08 +08:00

123 lines
3.2 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.
[build-system]
requires = ["hatchling>=1.27.0"]
build-backend = "hatchling.build"
[project]
name = "operation-room-monitor-server"
version = "0.1.0"
description = "Operation room monitor API server"
requires-python = ">=3.13"
dependencies = [
"alembic>=1.14.0",
"asyncpg>=0.31.0",
"psycopg[binary]>=3.2.0",
"greenlet>=3.1.0",
"minio>=7.2.15",
"baidu-aip>=4.16.13",
"chardet>=7.4.3",
"fastapi>=0.136.0",
"loguru>=0.7.3",
"pillow>=12.2.0",
"pydantic-settings>=2.13.1",
"python-multipart>=0.0.26",
"sqlalchemy>=2.0.49",
# 视觉推理栈由 uv 安装Linux/Windows 走 cu130 官方索引macOS 走 CPU 索引(无 CUDA wheel
"torch>=2.6.0",
"torchvision>=0.21.0",
"torchaudio>=2.6.0",
"ultralytics>=8.3.0",
"numpy>=2.0.0",
"opencv-python>=4.10.0",
"uvicorn[standard]>=0.44.0",
"rich>=15.0.0",
"pyyaml>=6.0.3",
"scipy>=1.14.0",
"pandas>=2.2.0",
"openpyxl>=3.1.0",
# algorithm_subprocesses/5-6-code ActionFormer eval.py 导入 libs.datasets → anet.py 需要 h5py
"h5py>=3.13.0",
# algorithm_subprocesses actionformer libs/utils/metrics.py随 datasets 链路导入)
"joblib>=1.4.2",
"mediapipe>=0.10.35",
]
[project.scripts]
operation-room-monitor-server = "main:main"
# 默认 PyPI清华 simplePyTorch 使用官方 wheel 索引(可按需改为国内镜像,如阿里云 pytorch-wheels
[tool.uv]
package = true
index-strategy = "unsafe-best-match"
[[tool.uv.index]]
name = "pypi-cn"
url = "https://uv.agentsmirror.com/pypi/simple"
default = true
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu130"
url = "https://download.pytorch.org/whl/cu130"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
{ index = "pytorch-cu130", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
{ index = "pytorch-cu130", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchaudio = [
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
{ index = "pytorch-cu130", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
[tool.hatch.build.targets.wheel]
packages = ["app"]
[tool.hatch.build.targets.wheel.force-include]
"main.py" = "main.py"
[dependency-groups]
dev = [
"httpx>=0.28.0",
"pytest>=8.3.0",
"pytest-asyncio>=0.25.0",
"aiosqlite>=0.21.0",
"livereload>=2.7.1",
"ruff>=0.15.12",
"mypy>=1.20.2",
"types-pyyaml>=6.0.12.20260408",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
[tool.ruff]
target-version = "py313"
line-length = 120
[tool.ruff.lint]
# 先覆盖错误与未使用符号;避免 I/UP 等对全仓库做大规模风格改写
select = ["E4", "E7", "E9", "F"]
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
"tests/test_probs_numpy_device.py" = ["E402"]
[tool.mypy]
python_version = "3.13"
files = ["app", "main.py"]
ignore_missing_imports = true
warn_unused_ignores = true
show_error_codes = true
check_untyped_defs = true
no_implicit_optional = true