-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (100 loc) · 2.78 KB
/
pyproject.toml
File metadata and controls
112 lines (100 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[project]
name = "ainfera-api"
version = "0.1.0"
description = "The Inference of AI Agents — L1-L5 backend monorepo"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "Apache-2.0" }
authors = [{ name = "Ainfera Inc." }]
dependencies = [
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"pydantic[email]>=2.9.0",
"pydantic-settings>=2.6.0",
"sqlalchemy[asyncio]>=2.0.36",
"asyncpg>=0.30.0",
"alembic>=1.14.0",
"cryptography>=44.0.0",
"httpx>=0.28.0",
"anthropic>=0.40.0",
"openai>=1.55.0",
"python-dotenv>=1.0.1",
"ainfera-routing>=0.1.0",
]
[tool.uv.sources]
# AIN-245: the routing brain lives in a sibling repo; api imports it.
# Pinned to a specific commit so prod builds are reproducible. Bump the
# rev when a new routing release is ready to land in the api runtime.
# Local devs editing the brain in-place can override with:
# uv pip install -e ../routing --no-deps
# after `uv sync`, until ainfera-routing publishes to PyPI (AIN-247).
ainfera-routing = { git = "https://github.com/ainfera-ai/routing.git", rev = "552ac1b64601eac2a5d6f54281a0c52ea1b328bd" }
[dependency-groups]
dev = [
"pytest>=8.3.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"respx>=0.21.1",
"ruff>=0.8.0",
"mypy>=1.13.0",
"pre-commit>=4.0.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["ainfera_api"]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"E", "F", "W",
"I",
"N",
"UP",
"B",
"SIM",
"RET",
"ARG",
"PTH",
"ERA",
"PL",
"RUF",
]
ignore = [
"PLR0913",
"PLR2004",
]
[tool.ruff.lint.per-file-ignores]
# Test files legitimately defer ainfera_api imports until env is set (conftest),
# run long end-to-end flows, and assert on literals.
"tests/**/*.py" = ["ARG001", "PLR2004", "S101", "PLR0915", "PLC0415"]
"alembic/versions/*.py" = ["E501", "N999"]
# Operational one-shot scripts: long log lines OK, local-scope constants in
# main() are intentional (read like script-level globals), and late imports
# inside helpers are fine for a 100-line probe script.
"scripts/*.py" = ["E501", "N806", "PLC0415"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.12"
strict = true
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_decorators = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = ["jose.*", "asyncpg.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-ra --strict-markers"
markers = [
"smoke: end-to-end smoke tests",
"integration: tests requiring a live database",
]