Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
283 lines (266 loc) · 9.89 KB
/
Copy pathpyproject.toml
File metadata and controls
283 lines (266 loc) · 9.89 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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# ---------------------------------------------------------------------------
# repowise — unified PyPI package
# ---------------------------------------------------------------------------
[build-system]
requires = ["setuptools>=75"]
build-backend = "setuptools.build_meta"
[project]
name = "repowise"
version = "0.60.1"
description = "The codebase intelligence layer for your AI coding agent — dependency graph, git history, dead code, decisions, and code health, exposed over MCP"
readme = "README.md"
requires-python = ">=3.11"
license = "AGPL-3.0-or-later"
keywords = ["documentation", "codebase", "wiki", "llm", "ai", "mcp"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Environment :: Console",
"Framework :: FastAPI",
"Topic :: Software Development :: Documentation",
"Typing :: Typed",
]
# ---------------------------------------------------------------------------
# Core dependencies — everything needed for analysis + generation + CLI + server,
# including all LLM provider SDKs (anthropic, openai, google-genai, litellm).
# ---------------------------------------------------------------------------
dependencies = [
# HTTP client
"httpx>=0.27,<1",
# AST parsing. 0.26.0 crashes the interpreter (access violation) when
# nodes captured by QueryCursor.matches are read, e.g. C++ receiver typing.
"tree-sitter>=0.25,<0.26",
"tree-sitter-python>=0.23,<1",
"tree-sitter-typescript>=0.23,<1",
"tree-sitter-javascript>=0.23,<1",
"tree-sitter-go>=0.23,<1",
"tree-sitter-rust>=0.23,<1",
"tree-sitter-java>=0.23,<1",
"tree-sitter-cpp>=0.23,<1",
"tree-sitter-dart>=0.1,<1",
"tree-sitter-kotlin>=1,<2",
"tree-sitter-ruby>=0.23,<1",
"tree-sitter-c-sharp>=0.23,<1",
"tree-sitter-swift>=0.7.4,<0.8",
"tree-sitter-scala>=0.23,<1",
"tree-sitter-php>=0.23,<1",
"tree-sitter-pascal>=0.11,<1",
# No standalone Python wheel exists for COBOL. This pack supplies the
# maintained ABI-14 grammar and caches it on first use.
"tree-sitter-language-pack>=1.14,<2",
"tree-sitter-luau>=1.2,<2",
"tree-sitter-bash>=0.23,<1",
"tree-sitter-gdscript>=6.1,<7",
"tree-sitter-vb-dotnet>=0.3,<1",
"tree-sitter-elixir>=0.3.5,<1",
"tree-sitter-fsharp>=0.3.11,<1",
"tree-sitter-objc>=3.0.2,<4",
# Markup grammars for single-file components: these locate <script> blocks
# and markup expressions only; the JS inside them is parsed with the
# TypeScript grammar (see sfc_source.py). There is no tree-sitter-vue on
# PyPI — the HTML grammar parses a .vue SFC cleanly, since <template>,
# <script> and <style> are just elements to it.
"tree-sitter-svelte>=1,<2",
"tree-sitter-html>=0.23,<1",
# SQL parsing (multi-dialect, error-tolerant, pure Python)
"sqlglot>=26,<28",
# Dependency graph
"networkx>=3.3,<4",
"scipy>=1.11,<2",
# Template rendering
"jinja2>=3.1,<4",
# File filtering
"pathspec>=0.12,<1",
# Structured logging
"structlog>=24,<25",
# Database (async)
"sqlalchemy[asyncio]>=2.0,<3",
"aiosqlite>=0.20,<1",
"alembic>=1.13,<2",
# Data validation
"pydantic>=2.8,<3",
# Retry logic
"tenacity>=9,<10",
# Git operations
"gitpython>=3.2.1,<4",
# YAML parsing
"pyyaml>=6.0,<7",
# Vector search (LanceDB — pure Python wheel)
"lancedb>=0.12,<1",
# CLI
"click>=8.1,<9",
"rich>=13,<14",
"watchdog>=4,<5",
# Server
"fastapi>=0.115,<1",
"uvicorn[standard]>=0.32,<1",
"mcp>=1.30.0,<2",
"apscheduler>=3.10,<4",
"cryptography>=50.0.0,<51",
# LLM providers (bundled — no extras needed)
"anthropic>=0.40,<1",
"openai>=1.50,<3",
"google-genai>=1.0,<2",
"litellm>=1.90.7,<2",
]
[project.optional-dependencies]
postgres = [
"pgvector>=0.3,<1",
"asyncpg>=0.29,<1",
]
graph-extra = [
"graspologic>=3.4,<4",
]
dev = [
"pytest>=8,<9",
"pytest-asyncio>=0.23,<1",
"pytest-snapshot>=0.9,<1",
"pytest-xdist>=3.5,<4",
"pytest-timeout>=2.3,<3",
"respx>=0.21,<1",
"time-machine>=2.14,<3",
"ruff>=0.6,<1",
"mypy>=1.11,<2",
"types-networkx>=3.3,<4",
"build>=1.0",
]
[project.scripts]
repowise = "repowise.cli.main:cli"
repowise-augment = "repowise.cli.augment_hook:main"
repowise-rewrite = "repowise.cli.rewrite_hook:main"
[project.urls]
Homepage = "https://github.com/repowise-dev/repowise"
Repository = "https://github.com/repowise-dev/repowise"
Issues = "https://github.com/repowise-dev/repowise/issues"
Documentation = "https://github.com/repowise-dev/repowise/blob/main/docs/start/USER_GUIDE.md"
# ---------------------------------------------------------------------------
# setuptools — auto-discover packages across three src/ roots
# ---------------------------------------------------------------------------
[tool.setuptools.package-dir]
"repowise.core" = "packages/core/src/repowise/core"
"repowise.cli" = "packages/cli/src/repowise/cli"
"repowise.server" = "packages/server/src/repowise/server"
[tool.setuptools.packages.find]
where = ["packages/core/src", "packages/cli/src", "packages/server/src"]
include = ["repowise*"]
namespaces = true
[tool.setuptools.package-data]
"repowise.core.ingestion" = ["queries/*.scm"]
"repowise.core.generation" = ["templates/*.j2"]
# Bundled copy of docs/CHANGELOG.md so the CLI `whats-new` / post-upgrade panel
# and the web what's-new view work offline from the installed wheel. Lives in
# core (the neutral home shared by cli + server). Kept in sync with the
# canonical docs/CHANGELOG.md by a drift-guard test (see tests/unit/upgrade).
"repowise.core.upgrade" = ["_data/CHANGELOG.md", "_data/release_stats.json"]
# Codex slash commands. A Codex plugin manifest has no slot for commands, so
# ~/.codex/prompts is the only surface that yields one and the CLI is the only
# thing that can write it, which means the content has to be in the wheel.
# Generated from plugins/shared/commands/ by scripts/gen_plugin_content.py and
# pinned by tests/unit/cli/test_plugin_content.py.
"repowise.cli.agent_targets" = ["_data/codex_prompts/*.md"]
# ---------------------------------------------------------------------------
# uv workspace (kept for local development)
# ---------------------------------------------------------------------------
[tool.uv.workspace]
members = [
"packages/core",
"packages/cli",
"packages/server",
]
[dependency-groups]
dev = [
"pytest>=8,<9",
"pytest-asyncio>=0.23,<1",
"pytest-snapshot>=0.9,<1",
"pytest-xdist>=3.5,<4",
"pytest-timeout>=2.3,<3",
"respx>=0.21,<1",
"time-machine>=2.14,<3",
"ruff>=0.6,<1",
"mypy>=1.11,<2",
"types-networkx>=3.3,<4",
"httpx>=0.27,<1",
]
# ---------------------------------------------------------------------------
# Ruff — linter + formatter
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 100
# Language sample fixtures are analyzer *inputs*, not code we run. Several are
# deliberately malformed (undefined names, unclosed file handles) because that is
# exactly the finding the test asserts on. Linting them would fail forever.
extend-exclude = ["tests/fixtures/lang_samples", "tests/fixtures/refactoring_corpus"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"RUF001", # ambiguous unicode in strings — we ship prose with – — → in it
"RUF002", # ambiguous unicode in docstrings
"RUF003", # ambiguous unicode in comments
]
[tool.ruff.lint.isort]
known-first-party = ["repowise"]
[tool.ruff.lint.flake8-bugbear]
# FastAPI's dependency markers are evaluated once at import and are immutable by
# design, so B008 (function call in default argument) does not apply to them.
# Listed explicitly rather than ignoring B008 outright, which would also hide the
# genuine mutable-default bugs the rule exists to catch.
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.Path",
"fastapi.Header",
"fastapi.Body",
"fastapi.Form",
"fastapi.File",
"fastapi.Cookie",
"fastapi.Security",
]
[tool.ruff.lint.per-file-ignores]
# Tests favour readability over naming purity: fixtures shadow builtins, helper
# classes mirror the CamelCase names of the things they stand in for.
"tests/**/*.py" = ["N802", "N806", "N818"]
# ---------------------------------------------------------------------------
# mypy — strict type checking
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
warn_unused_configs = true
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
ignore_missing_imports = true
disallow_untyped_defs = false
check_untyped_defs = true
# ---------------------------------------------------------------------------
# pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "-v --tb=short"
pythonpath = ["."]
# A hung test fails here and names itself, instead of holding its xdist worker
# until the CI job times out. The slowest tests take about 60 s on CI. The
# thread method works for a hang in C code or a fixture teardown: it ends the
# worker, which xdist reports against the test.
timeout = 300
timeout_method = "thread"
# pytest-timeout writes its stack dump to the worker's stdout, which xdist
# discards. faulthandler writes every thread's stack to stderr, which reaches
# the CI log, shortly before the timeout ends the worker.
faulthandler_timeout = 280