-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (129 loc) · 4.82 KB
/
pyproject.toml
File metadata and controls
138 lines (129 loc) · 4.82 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
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "roam-code"
version = "12.5.0"
description = "Instant codebase comprehension for AI coding agents"
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
authors = [
{name = "CosmoHac"},
]
keywords = ["code-intelligence", "static-analysis", "mcp-server", "tree-sitter", "architecture", "code-graph", "ai-coding", "graph-analysis", "code-quality", "cli", "codebase", "code-analysis", "ai-tools", "mcp", "sql"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"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",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"click>=8.0",
"tree-sitter>=0.23",
# Pinned upper bound: 1.6.3's cp312 wheel ships a manylinux_2_34
# tarball that fails to register the ``tree_sitter_language_pack``
# module post-install (CI run 25217131296). 1.6.2 (cp310-abi3) works
# cleanly across 3.9–3.13.
"tree-sitter-language-pack>=0.6,<1.6.3",
"networkx>=3.0",
]
[project.urls]
Homepage = "https://github.com/Cranot/roam-code"
Documentation = "https://cranot.github.io/roam-code/"
Repository = "https://github.com/Cranot/roam-code"
Issues = "https://github.com/Cranot/roam-code/issues"
Changelog = "https://github.com/Cranot/roam-code/blob/main/CHANGELOG.md"
[project.scripts]
roam = "roam.cli:cli"
[project.optional-dependencies]
mcp = [
"fastmcp>=2.0",
]
semantic = [
"numpy>=1.24",
"onnxruntime>=1.16",
"tokenizers>=0.15",
]
leiden = [
# Strictly better community detection than Louvain (no badly-connected
# communities). Auto-detected at runtime; falls back to seeded Louvain
# when these aren't installed.
"igraph>=0.11",
"leidenalg>=0.10",
]
graph-fast = [
# rustworkx is a Rust-backed drop-in for many NetworkX algorithms;
# 3-100× speedup at >250k nodes per the v12.2 architecture review.
# Auto-detected via ``ROAM_GRAPH_BACKEND=rustworkx``.
"rustworkx>=0.14",
]
sbom = [
# CycloneDX 1.7 SBOM emit (with AIBOM extension) for `roam sbom`.
# Falls back to in-tree minimal emitter when not installed.
"cyclonedx-python-lib>=8.0",
]
learned = [
# LightGBM LambdaMART distillation for `roam retrieve --rerank learned`.
# Optional — current `--rerank fast` blend stays the default.
"lightgbm>=4.0",
]
dev = [
"pytest>=7.0",
"pytest-xdist>=3.0",
# pytest-asyncio is required by tests/test_taint_classifier.py — those
# tests use ``@pytest.mark.asyncio`` to verify the MCP-sampling-based
# taint classifier under a controlled async loop.
"pytest-asyncio>=0.23",
# scipy is required by ``nx.pagerank`` on networkx 3.x; without it,
# the personalized-pagerank tests exercise the degree-based fallback
# which doesn't honour ``alpha`` and trivially fails the
# alpha-override / chain-propagation invariants. Production users
# without scipy still get the (less accurate but correct) fallback.
"scipy>=1.11",
"ruff>=0.4",
"build>=1.0",
"twine>=5.0",
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q --tb=short"
# v12.2: pytest-asyncio strict-mode + auto fixture loop scope. Avoids the
# 11 PytestUnknownMarkWarning warnings on `@pytest.mark.asyncio` in
# test_taint_classifier.py when pytest-asyncio is installed (it ships
# under the `[dev]` extra).
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
markers = [
"smoke: fast, high-signal tests for local iteration",
"core: broader local suite for pre-push checks",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"asyncio: marks async tests requiring pytest-asyncio (skip when missing)",
]
[tool.ruff]
target-version = "py39"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "W", "I", "T20"]
ignore = [
"E402", # module-import-not-at-top — needed for sys.path manipulation in tests
"E501", # line-too-long — handled by ruff format; remaining are long strings/SQL
"E731", # lambda-assignment — used for concise dispatch tables
"E741", # ambiguous variable names (G, l, etc.) — common in graph code
"F841", # unused-variable — often intentional destructuring
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["T201", "T203"]
"dev/**/*.py" = ["T201", "T203"]