-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (175 loc) · 5.54 KB
/
Copy pathpyproject.toml
File metadata and controls
190 lines (175 loc) · 5.54 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
[project]
name = "chat-sdk"
version = "0.4.31.1"
description = "Multi-platform async chat SDK for Python — port of Vercel Chat"
keywords = [
"chat",
"chatbot",
"chatops",
"slack-bot",
"discord-bot",
"telegram-bot",
"teams-bot",
"whatsapp-bot",
"bot-framework",
"async",
"asyncio",
"vercel",
]
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.12"
dependencies = []
classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Communications",
"Topic :: Communications :: Chat",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://github.com/Chinchill-AI/chat-sdk-python"
Repository = "https://github.com/Chinchill-AI/chat-sdk-python"
Issues = "https://github.com/Chinchill-AI/chat-sdk-python/issues"
[project.optional-dependencies]
slack = ["slack-sdk>=3.27.0"]
# Slack Socket Mode (xapp-* WebSocket transport). slack_sdk's
# SocketModeClient ships with the slack-sdk wheel, but the aiohttp variant
# we use needs aiohttp at runtime.
slack-socket = ["slack-sdk>=3.27.0", "aiohttp>=3.9"]
github = ["pyjwt[crypto]>=2.8"]
redis = ["redis>=5.0"]
postgres = ["asyncpg>=0.29"]
crypto = ["cryptography>=42.0"]
discord = ["pynacl>=1.5", "aiohttp>=3.9"]
teams = [
"aiohttp>=3.9",
# Official Microsoft Teams Apps Python SDK (issue #93 migration; mirrors upstream
# adapter-teams@4.30.0's @microsoft/teams.* deps). Graph stays hand-rolled (no [graph] extra).
"microsoft-teams-apps>=2.0.13",
"microsoft-teams-api>=2.0.13",
"microsoft-teams-cards>=2.0.13",
]
telegram = ["aiohttp>=3.9"]
whatsapp = ["aiohttp>=3.9"]
messenger = ["aiohttp>=3.9"]
twilio = ["aiohttp>=3.9"]
google-chat = ["aiohttp>=3.9", "pyjwt[crypto]>=2.8", "google-auth>=2.0"]
linear = ["aiohttp>=3.9"]
all = [
"slack-sdk>=3.27.0",
"pyjwt[crypto]>=2.8",
"redis>=5.0",
"asyncpg>=0.29",
"cryptography>=42.0",
"pynacl>=1.5",
"aiohttp>=3.9",
"google-auth>=2.0",
"microsoft-teams-apps>=2.0.13",
"microsoft-teams-api>=2.0.13",
"microsoft-teams-cards>=2.0.13",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/chat_sdk"]
# Explicit sdist allowlist — hatch's default pulls in every tracked and
# untracked file in the repo, which has leaked `.coverage` (with local
# absolute paths), agent scratchpads, CI config, and dev scripts to PyPI.
# Everything here is what a source-install consumer needs; anything else
# (CI, dev scripts, local notes) stays out.
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/docs",
"/scripts",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
"/CONTRIBUTING.md",
"/pyproject.toml",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.ruff]
target-version = "py312"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "I", "B", "SIM", "UP"]
# Modernization of pre-3.12 patterns is deferred to follow-up PRs; the 3.12
# floor bump itself doesn't rewrite call sites. Re-enable these as the
# codebase is migrated.
ignore = [
"UP017", # datetime.timezone.utc → datetime.UTC (3.11+)
"UP040", # TypeAlias → PEP 695 `type` keyword (3.12+)
"UP041", # asyncio.TimeoutError → builtins TimeoutError (3.11+)
]
[dependency-groups]
dev = [
"cryptography>=42.0",
"pytest>=8.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=5.0",
"aiohttp>=3.9",
"pyjwt[crypto]>=2.8",
"ruff>=0.4.0",
"pyrefly==0.61.1",
# Teams adapter SDK (issue #93) — in dev so CI (`uv sync --group dev`) installs it
# and the Teams test suite runs; matches how the other optional adapter deps are wired.
"microsoft-teams-apps>=2.0.13",
"microsoft-teams-api>=2.0.13",
"microsoft-teams-cards>=2.0.13",
]
# ---------------------------------------------------------------------------
# Pyrefly type checker configuration
# ---------------------------------------------------------------------------
# Target: zero errors. Run:
# uv run pyrefly check
# ---------------------------------------------------------------------------
[tool.pyrefly]
project-includes = ["src"]
project-excludes = ["**/__pycache__", "**/.pytest_cache"]
# Without disabling heuristics pyrefly skips src/ because of our layout.
disable-project-excludes-heuristics = true
use-ignore-files = false
python-version = "3.12"
python-platform = "linux"
# Optional adapter deps that aren't in the default install. Treating them as
# Any keeps pyrefly from flagging missing-import every time we lazy-load one.
replace-imports-with-any = [
# Slack — covers top-level + submodule imports like slack_sdk.web.async_client
"slack_sdk",
"slack_sdk.*",
# Discord — signed-request verification uses pynacl's nacl.signing
"nacl",
"nacl.*",
# Google Chat — auth uses google.auth.* subpackages
"google",
"google.*",
# State backends
"redis",
"redis.*",
"asyncpg",
"asyncpg.*",
# HTTP clients used in lazy paths
"httpx",
"httpx.*",
# GitHub App auth
"jwt",
"jwt.*",
# Teams — official MS Teams Apps SDK (optional teams extra)
"microsoft_teams",
"microsoft_teams.*",
]
[tool.pyrefly.errors]
# CI policy: zero pyrefly errors.