[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "openjiuwen-runtime-service"
version = "0.1.0"
description = "OpenJiuwen Runtime"
requires-python = ">=3.11.4"
dependencies = [
    "aiosqlite>=0.21.0,<1.0.0",
    "fastapi==0.115.11",
    "uvicorn[standard]==0.42.0",
    "websockets>=14.0",
    "redis>=5.0",
    "pydantic==2.11.7",
    "pydantic[email]==2.11.7",
    "pydantic-settings==2.5.2",
    "python-multipart>=0.0.20",
    "greenlet>=3.3.1",
    "openjiuwen-runtime-foundation==0.1.0"
]

[project.optional-dependencies]
etcd = [
    "aetcd==1.0.0a4",
]
kubernetes = [
    "kubernetes_asyncio==35.0.0",
]

[tool.uv]
default-groups = ['dev']

[tool.uv.sources]
openjiuwen-runtime-foundation = { path = "../foundation", editable = true }

[dependency-groups]
dev = [
    "coverage==7.8.0",
    "pytest==8.3.5",
    "pytest-asyncio==1.2.0",
    "pytest-mock==3.14.0",
    "ruff==0.9.10",
    "httpx>=0.27",
    "fakeredis>=2.20",
]

[[tool.uv.index]]
url = "https://mirrors.aliyun.com/pypi/simple/"

[tool.setuptools.packages.find]
where = ["."]
exclude = ["*.egg-info", "tests"]
include = ["openjiuwen_runtime*"]

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
    "unit: 单元测试(router/envelope/原语,fakeredis)",
    "integration: 集成测试",
    "system: 系统验收(REST/WS 适配器、多副本)",
    "slow: 慢测试",
    "async: 异步测试",
]