-
Notifications
You must be signed in to change notification settings - Fork 641
Expand file tree
/
Copy pathpyproject.toml
More file actions
168 lines (152 loc) · 6.42 KB
/
Copy pathpyproject.toml
File metadata and controls
168 lines (152 loc) · 6.42 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[project]
name = "cwyd-v2"
version = "0.1.0"
description = "Chat With Your Data Solution Accelerator — v2 (FastAPI + Functions + Foundry IQ)"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
# Core web + Functions runtime
"fastapi==0.133.0",
"uvicorn[standard]>=0.34,<1.0",
"azure-functions>=1.24,<2.0",
"httpx>=0.28,<1.0",
"python-dotenv>=1.2,<2.0",
"python-multipart>=0.0.18,<1.0",
# Config + validation
"pydantic>=2.11,<3.0",
"pydantic-settings>=2.7,<3.0",
"jsonschema>=4.25,<5.0",
# Foundry IQ + Azure AI
"azure-ai-projects==2.2.0",
"azure-ai-agents==1.2.0b6",
"azure-ai-documentintelligence>=1.0,<2.0",
"azure-ai-contentsafety>=1.0,<2.0",
"azure-search-documents>=11.6.0b1",
"openai==2.32.0",
"tiktoken>=0.12,<1.0",
# LangChain / LangGraph orchestrators
"langchain>=0.3,<1.0",
"langgraph>=0.4,<1.0",
"langchain-openai>=0.3,<1.0",
# OSS Microsoft Agent Framework (orchestrator backend behind the
# `agent_framework` registry key). Pin the *core* distribution, not the
# `agent-framework` umbrella meta-package: the umbrella depends on
# `agent-framework-hyperlight` (env marker `python_version < "3.14"`),
# which in turn requires `hyperlight-sandbox-backend-wasm` — unresolvable
# on the Functions host's Python 3.11 runtime, so a remote pip build
# backtracks indefinitely and never completes. Only `agent_framework`
# (core) and `agent_framework_foundry` are imported in this codebase;
# `agent-framework-foundry` supplies the Foundry hosted-agent integration.
"agent-framework-core==1.7.0",
"agent-framework-foundry==1.7.0",
# Azure data plane (passwordless via Managed Identity)
"azure-identity>=1.25,<2.0",
"azure-storage-blob>=12.28,<13.0",
"azure-storage-queue>=12.15,<13.0",
"azure-cosmos>=4.14,<5.0",
# aiohttp is required by azure-core's async transport (used by every
# `azure.*.aio` client incl. azure.identity.aio.DefaultAzureCredential).
"aiohttp>=3.10,<4.0",
# PostgreSQL (pgvector mode)
"asyncpg>=0.31,<1.0",
"psycopg2-binary>=2.9,<3.0",
"pgvector>=0.4,<1.0",
# Document parsers
"python-docx>=1.2,<2.0",
"beautifulsoup4>=4.14,<5.0",
"chardet>=5.2,<6.0",
"pillow>=12.3.0,<13.0",
"fake-useragent>=2.2,<3.0",
"requests>=2.32,<3.0",
# Observability
"azure-monitor-opentelemetry>=1.6.10,<2.0",
"opentelemetry-instrumentation-httpx>=0.52b0",
]
[dependency-groups]
dev = [
"pytest>=9.0,<10.0",
"pytest-cov>=7.0,<8.0",
"pytest-asyncio>=1.2,<2.0",
"pytest-httpserver>=1.1,<2.0",
"black>=25.12,<26.0",
"flake8>=7.3,<8.0",
"trustme>=1.2,<2.0",
# Q13 (2026-05-05): CI-enforced static type checking. Pinned to a
# known-good minor; bump deliberately so a pyright minor release
# cannot silently change the diagnostic surface between PRs.
"pyright>=1.1.380,<2.0",
]
[tool.uv]
prerelease = "if-necessary-or-explicit"
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
# Import mode is `importlib` (not the legacy `prepend`) so test modules are
# loaded under their full dotted package path. This is what lets the modular
# blueprint tree work: `tests.functions.batch_start.test_blueprint` and
# `tests.functions.batch_push.test_blueprint` co-exist with identical
# basenames because pytest sees them as different fully-qualified modules.
# Default `prepend` mode would crash on import because it only inserts the
# test file's directory on sys.path and imports by basename. See pytest docs
# https://docs.pytest.org/en/stable/explanation/pythonpath.html#import-modes
# Locked-in 2026-05-26 as the scaling strategy for every future Phase-6
# Functions blueprint (add_url, search_skill, …) so each new blueprint can
# drop `tests/functions/<name>/test_blueprint.py` without renames or new
# `__init__.py` markers. Note: pytest 9 only recognises the import-mode flag
# via `addopts` (the bare `import_mode` ini key is rejected as unknown).
addopts = "--import-mode=importlib -m 'not smoke and not integration'"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"unit: fast unit tests with all I/O mocked",
"integration: opt-in live tests that boot the real app against real Azure data-plane services; deselected by default; require a populated .env + az login (see tests/integration)",
"smoke: CI-only live-container end-to-end checks; excluded from default pytest run by addopts",
]
[tool.coverage.run]
source = ["src"]
omit = ["**/tests/*", "**/__init__.py"]
[tool.coverage.report]
skip_empty = true
show_missing = true
# ---------------------------------------------------------------------------
# Static type checking (Q13, 2026-05-05; updated 2026-05-06 by REFACTOR-B).
#
# Strict mode is scoped to the production packages owned by the FastAPI
# backend (`src/backend/**` -- now includes the moved `backend/core/**`)
# and the functions extension layer (`src/functions/core/**`). Functions
# legacy stub (`src/functions/function_app.py`, etc.) and tests
# (`tests/**`) stay on basic mode for now -- promoting them is a follow-up
# CU triggered by the first errors-or-zero pyright run after this turn.
# Files NOT listed in `include` are excluded entirely; `strict` then
# promotes the listed globs from basic to strict (full reporting +
# treat-warnings-as-errors).
#
# `reportMissingTypeStubs = "warning"` keeps third-party libraries
# without bundled stubs (pgvector, asyncpg in some versions, etc.) from
# turning the whole run red while still surfacing them in the report.
#
# 2026-05-06 (REFACTOR-B): `src/shared` removed from include / strict /
# exclude (folder was `git mv`'d to `src/backend/core/` and is fully
# covered by the existing `src/backend/**` glob). `src/functions` added
# to include + `src/functions/core/**` added to strict per user decision
# (functions/core gets the strict bar from day one, even while empty).
# ---------------------------------------------------------------------------
[tool.pyright]
pythonVersion = "3.13"
include = ["src/backend", "src/functions"]
exclude = [
"**/__pycache__",
"**/.venv",
"**/node_modules",
"src/backend/**/tests",
"src/functions/**/tests",
]
strict = ["src/backend/**", "src/functions/core/**"]
reportMissingTypeStubs = "warning"
venvPath = "."
venv = ".venv"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/backend", "src/functions"]