-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (104 loc) · 3.74 KB
/
Copy pathpyproject.toml
File metadata and controls
116 lines (104 loc) · 3.74 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
[project]
name = "therapy"
version = "0.1.0"
description = "Voice-first personal assistant for self-understanding — CBT/OT-informed, emotion-aware."
authors = [{ name = "Juan Sugg", email = "juanpedrosugg@gmail.com" }]
license = { text = "MIT" }
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.12,<3.14"
keywords = ["voice", "assistant", "speech", "emotion", "neurodiversity"]
dependencies = [
"anthropic>=0.116.0",
"cryptography>=49,<50",
"fastapi>=0.115,<1.0",
"fastembed>=0.8,<0.9",
"httpx>=0.28.1",
"kokoro-onnx>=0.5.0",
"lingua-language-detector>=2.1.1",
"loguru>=0.7,<1.0",
"numpy>=1.26,<3.0",
# Broad-plane telemetry (obs plan O2.1): stable SDK + OTLP HTTP only.
# Instrumentation pins track the 0.x semconv train; routing/compat tests
# gate every upgrade (semconv maturity re-audited per dependency bump).
"opentelemetry-sdk>=1.43,<2.0",
"opentelemetry-exporter-otlp-proto-http>=1.43,<2.0",
"opentelemetry-instrumentation-fastapi>=0.64b0,<1.0",
"opentelemetry-instrumentation-httpx>=0.64b0,<1.0",
"opentelemetry-instrumentation-system-metrics>=0.64b0,<1.0",
"pillow>=11,<13",
"pipecat-ai[silero,webrtc,whisper]~=1.5.0; sys_platform != 'darwin' or platform_machine != 'x86_64'",
"pymupdf>=1.26,<2.0",
"python-multipart>=0.0.20,<1.0",
"pytesseract>=0.3.13,<1.0",
"pywebpush>=2.3,<3.0",
"uvicorn[standard]>=0.30,<1.0",
]
# Phase-gated dependencies — added when their phase lands (docs/SPEC.md §9):
# ser (speech emotion recognition) — phase 3
[dependency-groups]
dev = [
"pytest>=8,<10",
"pytest-cov>=5,<8",
"httpx>=0.27,<1.0",
"jiwer>=4,<5",
"pyright>=1.1.411,<2.0",
"ruff>=0.6",
"pytest-playwright>=0.5", # phase-1 PWA browser E2E (install + connect/transcript)
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/therapy"]
[tool.uv]
override-dependencies = [
"onnxruntime==1.23.2; sys_platform == 'darwin' and platform_machine == 'x86_64'",
"onnxruntime==1.24.4; sys_platform != 'darwin' or platform_machine != 'x86_64'",
]
[tool.pytest.ini_options]
testpaths = ["tests/suites"]
addopts = ["-m", "not e2e"]
markers = [
"unit: fast single-module tests, no external I/O (framework-free)",
"integration: wire the app/DB/HTTP/CLI across components",
"e2e: full browser end-to-end tests (Playwright)",
]
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.ruff.lint]
# `extend-select` keeps ruff's defaults (E4/E7/E9 + F) and adds import-sorting
# (I), pyupgrade (UP), bugbear (B), and pytest-style (PT). Deliberately NOT the
# full `E` set — E501 line-length is left unenforced to avoid reflowing prose.
extend-select = ["I", "UP", "B", "PT"]
[tool.ruff.lint.per-file-ignores]
# pytest-style rules target the test suites, not the standalone phase scripts.
"scripts/**" = ["PT"]
[tool.pyright]
include = ["src", "tests", "scripts"]
stubPath = "typings"
pythonVersion = "3.12"
pythonPlatform = "Linux"
typeCheckingMode = "strict"
reportUnnecessaryTypeIgnoreComment = "error"
[tool.coverage.run]
# Denominator = testable code. Omit the thin launcher and the SER roadmap stubs
# (perception/emotion.py, session/timeline.py) so their intentional 0% does not
# distort the floor; drop each omit the moment its real implementation lands.
omit = [
"*/server/__main__.py",
"*/perception/emotion.py",
"*/session/timeline.py",
]
[tool.coverage.report]
show_missing = true
# Non-executable lines that must not count against the floor: typing-only import
# blocks, abstract stubs, and bare `...` Protocol/overload bodies (an explicit
# non-gap — voice/contracts.py & runtime.py Protocol bodies).
exclude_also = [
'if TYPE_CHECKING:',
'raise NotImplementedError',
'^\s*\.\.\.\s*$',
'@(typing\.)?overload',
]