-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
216 lines (191 loc) · 4.7 KB
/
pyproject.toml
File metadata and controls
216 lines (191 loc) · 4.7 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "memcord"
version = "3.4.0"
description = "privacy-first, self-hosted MCP server helps you organize chat history, summarize messages, search across past chats with AI — and keeps everything secure and fully under your control."
authors = [
{name = "MemCord", email = "memcord@ultrafastidio.us"}
]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"mcp>=1.27.0,<2", # MCP SDK - spec 2025-11-25 compliant; cap at v2 (breaking)
"nltk>=3.8",
"aiofiles>=23.0",
"pydantic>=2.0.0",
"requests>=2.31.0",
"beautifulsoup4>=4.12.0",
"pdfplumber>=0.10.0",
"pypdfium2>=5.0.0", # Explicitly pin to avoid yanked 4.30.1
"pandas>=2.0.0",
"trafilatura>=1.8.0",
"python-magic>=0.4.27",
"sumy>=0.11.0", # Default summarizer backend (graph-based, zero model files)
]
[project.optional-dependencies]
semantic = [
"sentence-transformers>=3.0.0",
]
transformers = [
"transformers>=4.40.0",
"torch>=2.0.0",
]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.10.0",
"pytest-cov>=4.0.0",
"pytest-benchmark>=4.0.0",
"factory-boy>=3.3.0",
"selenium>=4.15.0",
"webdriver-manager>=4.0.0",
"black>=23.0.0",
"ruff>=0.1.0",
"psutil>=5.9.0",
"mypy>=1.0.0",
"bandit>=1.7.0",
]
[project.scripts]
memcord = "memcord.server:main"
[tool.hatch.build.targets.wheel]
packages = ["src/memcord"]
[tool.hatch.build.targets.sdist]
include = [
"src/",
"README.md",
"pyproject.toml",
]
# Hatch environments
[tool.hatch.envs.default]
python = "3.10"
[tool.hatch.envs.lint]
dependencies = [
"ruff>=0.12.0",
"mypy>=1.15.0",
"bandit>=1.8.0",
"types-aiofiles>=24.1.0",
"types-psutil>=6.0.0",
"types-requests>=2.31.0",
"pandas-stubs>=2.0.0",
"pydantic>=2.0.0",
]
[tool.hatch.envs.lint.scripts]
fmt = [
"ruff format {args:.}",
"ruff check --fix {args:.}",
]
style = [
"ruff format --check {args:.}",
"ruff check {args:.}",
]
typing = "mypy {args:src/memcord}"
security = "bandit -r {args:src/memcord}"
checks = [
"style {args:.}",
"typing {args:src/memcord}",
"security {args:src/memcord}",
]
[tool.black]
line-length = 120
target-version = ['py310']
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--disable-warnings",
"--tb=short",
"-v"
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"mcp: MCP protocol tests",
"ui: UI automation tests",
"slow: Slow running tests",
"requires_external: Tests requiring external services",
"requires_claude_desktop: Tests requiring Claude Desktop",
"requires_claude_desktop_ui: Tests requiring Claude Desktop UI access",
"selenium: Browser automation tests"
]
asyncio_mode = "auto"
[tool.coverage.run]
source = ["src/memcord"]
omit = ["tests/*", "src/memcord/__pycache__/*"]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_ignores = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = "trafilatura.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "pdfplumber.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "bs4.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "nltk.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sumy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sentence_transformers.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "transformers.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "torch.*"
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[dependency-groups]
dev = [
"factory-boy>=3.3.3",
"psutil>=7.0.0",
"pytest>=8.4.1",
"pytest-asyncio>=1.0.0",
"pytest-benchmark>=5.1.0",
"pytest-cov>=6.2.1",
"pytest-mock>=3.14.1",
"ruff>=0.12.0",
"selenium>=4.34.0",
"mypy>=1.15.0",
"bandit>=1.8.0",
"types-aiofiles>=24.1.0",
"types-psutil>=6.0.0",
"types-requests>=2.31.0",
"pandas-stubs>=2.0.0",
]