forked from Durafen/Claude-code-memory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
234 lines (215 loc) · 5.71 KB
/
pyproject.toml
File metadata and controls
234 lines (215 loc) · 5.71 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "claude-indexer"
version = "1.0.0"
description = "Universal semantic code indexer for Claude Code memory"
authors = [{name = "Claude Memory Project"}]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"tree-sitter>=0.20.0",
"tree-sitter-python>=0.20.0",
"tree-sitter-javascript>=0.20.0",
"tree-sitter-typescript>=0.20.0",
"tree-sitter-json>=0.20.0",
"tree-sitter-html>=0.20.0",
"tree-sitter-css>=0.20.0",
"tree-sitter-yaml>=0.5.0",
"jedi>=0.19.0",
"qdrant-client>=1.7.0",
"openai>=1.0.0",
"requests>=2.31.0",
"watchdog>=3.0.0",
"click>=8.0.0",
"numpy>=1.24.0",
"psutil>=5.9.0",
"aiohttp>=3.9.0",
"tiktoken>=0.5.0",
"pydantic>=2.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.21.0",
"coverage>=7.3.0",
"black>=23.0.0",
"isort>=5.12.0",
"flake8>=6.0.0",
"mypy>=1.5.0",
"bandit>=1.7.0",
"pre-commit>=3.0.0",
"ruff>=0.12.0",
"bm25s>=0.1.0",
]
[project.scripts]
claude-indexer = "claude_indexer.main:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["claude_indexer*"]
exclude = ["tests*"]
[tool.pytest.ini_options]
minversion = "8.0"
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
"--tb=short",
"--durations=10",
]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"e2e: End-to-end tests",
"slow: Slow tests requiring external services",
"asyncio: Async test marker for asyncio tests",
"benchmark: Performance benchmark tests",
]
[tool.pytest_asyncio]
asyncio_mode = "auto"
[tool.coverage.run]
source = ["claude_indexer"]
branch = true
omit = [
"*/__init__.py",
"*/logging.py",
"tests/*",
".venv/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
fail_under = 15 # Lowered due to many tests requiring API keys or being flaky in CI
show_missing = true
[tool.coverage.html]
directory = "htmlcov"
[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["claude_indexer"]
[tool.mypy]
python_version = "3.11"
warn_return_any = false # Too noisy with Any returns
warn_unused_configs = true
disallow_untyped_defs = false # CLI functions don't need full typing
disallow_incomplete_defs = false # Allow partial typing
check_untyped_defs = true
disallow_untyped_decorators = false # Click decorators are untyped
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = false # Avoid false positives
warn_no_return = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"tree_sitter.*",
"jedi.*",
"qdrant_client.*",
"watchdog.*",
"click.*",
"aiohttp.*",
"playwright.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"claude_indexer.*", # Entire module for now - type coverage to improve incrementally
"tests.*",
"utils.*",
]
ignore_errors = true
# Ruff configuration (modern Python linter/formatter)
[tool.ruff]
line-length = 88
target-version = "py311"
exclude = [
".git",
".venv",
"__pycache__",
"node_modules",
"qdrant_storage",
"debug",
".claude-indexer",
"code-memory-explorer", # Separate project
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
# "I", # isort - disabled, using standalone isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"ARG001", # unused function argument
"ARG002", # unused method argument (many are interface implementations)
"ARG003", # unused class method argument
"ARG005", # unused lambda argument
"SIM102", # collapsible if (sometimes clearer to keep separate)
"SIM117", # multiple with statements (sometimes clearer to nest)
"SIM108", # ternary operator (sometimes clearer as if/else)
"SIM103", # return directly (sometimes clearer with explicit return)
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"ARG002", # Unused method argument (pytest fixtures)
"ARG003", # Unused class method argument (test classes)
]
"utils/**/*.py" = ["ARG002"] # Utility scripts with callbacks
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# Bandit security configuration
[tool.bandit]
exclude_dirs = ["tests", "debug", "utils"]
skips = [
"B101", # assert statements (fine in non-production code)
"B301", # pickle load (only loads our own cache files)
"B601", # paramiko call
"B602", # subprocess.call with shell=True (used for git/npm commands)
"B603", # subprocess without shell=True (false positives)
"B605", # start_process_with_a_shell
"B607", # start_process_with_partial_path
"B324", # MD5 hash (used for non-security content fingerprinting)
]