forked from jsbattig/code-indexer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
251 lines (235 loc) · 8.37 KB
/
pyproject.toml
File metadata and controls
251 lines (235 loc) · 8.37 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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "code-indexer"
dynamic = ["version"]
description = "AI-powered semantic code search with local models"
authors = [
{name = "Seba Battig", email = "jsbattig@gmail.com"}
]
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.9"
keywords = ["ai", "code-search", "semantic-search", "ollama", "qdrant"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development",
"Topic :: Text Processing :: Indexing",
]
dependencies = [
"click>=8.0.0",
"rich>=13.0.0",
"httpx>=0.24.0",
"pydantic>=2.0.0",
"pyyaml>=6.0",
"pathspec>=0.11.0",
"watchdog>=3.0.0",
"jsonschema>=4.0.0",
"fastapi>=0.116.0",
"uvicorn>=0.24.0",
"python-jose[cryptography]>=3.3.0",
"pwdlib[bcrypt]>=0.2.0",
"python-multipart>=0.0.6",
"psutil>=5.9.0,<6.0.0",
"PyJWT>=2.8.0",
"tokenizers>=0.13.0",
"GitPython>=3.1.0",
"zstandard>=0.25.0",
# hnswlib is built from third_party/hnswlib submodule (Story #54)
# DO NOT use PyPI hnswlib - it lacks check_integrity() method
# Install: git submodule update --init && pip install -e .
"regex>=2023.0.0",
"rpyc>=6.0.0",
"authlib>=1.6.5",
"aiosqlite>=0.21.0",
"aiohttp>=3.8.0",
"msgpack>=1.0.0",
"sse-starlette>=1.6.0",
"itsdangerous>=2.1.0",
"jinja2>=3.1.0",
"msgpack>=1.0.0",
"pysqlite3-binary>=0.5.0; sys_platform == 'linux'",
"protobuf>=3.20.0",
"cachetools>=5.0.0",
"tenacity>=8.0.0",
"tantivy==0.25.0",
# OpenTelemetry dependencies (Story #695)
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
"opentelemetry-exporter-otlp>=1.20.0",
"opentelemetry-instrumentation-fastapi>=0.41b0",
# Markdown rendering for Research Assistant
"markdown>=3.4.0",
"bleach>=6.0.0",
# Wiki front matter parsing
"python-frontmatter>=1.0.0",
# MFA/TOTP dependencies (Epic #556)
"pyotp>=2.9.0",
"qrcode>=7.4.0",
"pillow>=10.0.0",
]
[project.optional-dependencies]
cluster = [
"psycopg[binary]>=3.1.0",
"psycopg-pool>=3.1.0",
]
cohere = ["cohere>=5.0.0"]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"mypy>=1.0.0",
"types-PyYAML>=6.0.0",
"types-requests>=2.28.0",
"black>=23.0.0",
"ruff>=0.0.280",
"pre-commit>=3.0.0",
]
[project.urls]
Homepage = "https://github.com/LightspeedDMS/code-indexer"
Repository = "https://github.com/LightspeedDMS/code-indexer"
Issues = "https://github.com/LightspeedDMS/code-indexer/issues"
[project.scripts]
code-indexer = "code_indexer.cli_fast_entry:main"
cidx = "code_indexer.cli_fast_entry:main"
[tool.hatch.build.targets.wheel]
packages = ["src/code_indexer"]
include = [
"src/code_indexer/docker/*"
]
exclude = [
"dist/docker-compose.yml"
]
[tool.hatch.version]
path = "src/code_indexer/__init__.py"
[tool.black]
line-length = 88
target-version = ["py39"]
[tool.ruff]
line-length = 88
target-version = "py39"
exclude = [
"tests/fixtures/cidx-test-repo/",
# Temporary exclusions for obsolete test files - need to be reviewed/updated
"tests/unit/services/test_granular_state_callback_system.py",
"tests/unit/progress/test_fix_validation_12_threads.py",
"tests/unit/services/test_clean_file_chunking_manager.py",
"tests/unit/services/test_safe_cancellation_strategy.py",
"tests/unit/services/test_progress_callback_enhancements.py",
"tests/unit/services/test_progress_display_surgical_fixes.py",
"tests/unit/services/test_story_02_non_blocking_state_changes.py",
"tests/unit/services/test_vector_calculation_manager.py",
"tests/unit/services/test_progress_callback_integration.py",
"tests/unit/services/test_parallel_processing_replacement.py",
"tests/integration/services/test_story_02_parallel_file_processing.py",
"tests/unit/services/test_voyage_threadpool_elimination.py",
"tests/unit/services/test_file_chunking_manager_slot_integration.py",
"tests/unit/progress/test_story_04_real_time_progress_calculations.py",
"tests/unit/bugfixes/test_container_name_resolution_stop_services.py",
"tests/manual/"
]
[tool.ruff.lint.per-file-ignores]
# Intentional lazy loading after logger initialization
"src/code_indexer/server/app.py" = ["E402"]
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
no_site_packages = false
explicit_package_bases = true
exclude = [
"tests/fixtures/cidx-test-repo/.*",
# Temporary exclusions for obsolete test files - need to be reviewed/updated
"tests/unit/services/test_granular_state_callback_system.py",
"tests/unit/progress/test_fix_validation_12_threads.py",
"tests/unit/services/test_clean_file_chunking_manager.py",
"tests/unit/services/test_safe_cancellation_strategy.py",
"tests/unit/services/test_progress_callback_enhancements.py",
"tests/unit/services/test_progress_display_surgical_fixes.py",
"tests/unit/services/test_story_02_non_blocking_state_changes.py",
"tests/unit/services/test_vector_calculation_manager.py",
"tests/unit/services/test_progress_callback_integration.py",
"tests/unit/services/test_parallel_processing_replacement.py",
"tests/integration/services/test_story_02_parallel_file_processing.py",
"tests/unit/services/test_voyage_threadpool_elimination.py",
"tests/unit/services/test_file_chunking_manager_slot_integration.py",
"tests/unit/progress/test_story_04_real_time_progress_calculations.py",
"tests/unit/bugfixes/test_container_name_resolution_stop_services.py",
"tests/manual/.*"
]
[[tool.mypy.overrides]]
module = "pydantic.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "pydantic._internal.*"
ignore_errors = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
tdd_guard_project_root = "."
filterwarnings = [
# Pydantic v2 deprecations
"ignore:The `__fields__` attribute is deprecated.*:DeprecationWarning",
"ignore:.*`__fields_set__` attribute is deprecated.*:DeprecationWarning",
# pytest-asyncio deprecations
"ignore:.*pytest-asyncio detected an unclosed event loop.*:DeprecationWarning",
"ignore:.*There is no current event loop.*:DeprecationWarning",
# httpx deprecations
"ignore:.*httpx.AsyncClient.*:DeprecationWarning",
"ignore:.*httpcore.*:DeprecationWarning",
# Asyncio runtime warnings
"ignore:.*coroutine.*was never awaited.*:RuntimeWarning",
# Coverage warnings
"ignore:.*Coverage.py warning.*:UserWarning",
# Generic deprecation from dependencies
"ignore:.*pkg_resources is deprecated.*:DeprecationWarning",
# Passlib crypt module deprecation (external dependency issue)
"ignore:.*'crypt' is deprecated and slated for removal.*:DeprecationWarning",
]
markers = [
"e2e: End-to-end tests",
"protocol: JSON-RPC and MCP protocol compliance tests",
"platform_darwin_x64: macOS Intel tests",
"platform_darwin_arm64: macOS Apple Silicon tests",
"platform_linux_x64: Linux x64 tests",
"platform_windows_x64: Windows x64 tests",
"voyage_ai: Tests requiring VoyageAI API key",
"real_api: Tests that make real API calls",
"slow: Tests that take longer to run",
"integration: Integration tests requiring multiple services",
"performance: Performance benchmark tests",
"unit: Unit tests with mocked dependencies",
"full_automation: Tests that should only be run in full automation pipeline",
"requires_ssh: Tests requiring SSH access to external repositories (skipped when CIDX_SKIP_SSH_TESTS=1)",
"destructive: Tests that modify repository state (require careful cleanup)",
]
[tool.coverage.run]
source = ["src/code_indexer"]
omit = [
"*/tests/*",
"*/test_*",
"setup.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]