Files
2026-07-13 12:42:18 +08:00

139 lines
4.1 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "code-review-graph"
version = "2.3.6"
description = "Local-first knowledge graph for token-efficient code review through MCP and CLI"
readme = {file = "README.md", content-type = "text/markdown"}
license = "MIT"
requires-python = ">=3.10"
authors = [
{ name = "Tirth" },
]
keywords = ["code-review", "knowledge-graph", "tree-sitter", "mcp", "ai-coding-tools"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Quality Assurance",
]
dependencies = [
"mcp>=1.0.0,<2",
# fastmcp >=3.2.4 is required for Message-based prompts and includes the
# CVE-2025-62800/62801/66416 fixes; <4 prevents the next major release
# from breaking the server the way fastmcp 3.0 did. See: #488
"fastmcp>=3.2.4,<4",
"tree-sitter>=0.23.0,<1",
"tree-sitter-language-pack>=0.3.0,<1",
"networkx>=3.2,<4",
"watchdog>=4.0.0,<6",
"tomli>=2.0.0,<3; python_version < '3.11'",
]
[project.urls]
Homepage = "https://code-review-graph.com"
Repository = "https://github.com/tirth8205/code-review-graph"
Documentation = "https://github.com/tirth8205/code-review-graph/blob/main/docs/INDEX.md"
Changelog = "https://github.com/tirth8205/code-review-graph/blob/main/CHANGELOG.md"
Issues = "https://github.com/tirth8205/code-review-graph/issues"
[project.scripts]
code-review-graph = "code_review_graph.cli:main"
crg-daemon = "code_review_graph.daemon_cli:main"
[project.optional-dependencies]
embeddings = [
"sentence-transformers>=3.0.0,<4",
"numpy>=1.26,<3",
]
google-embeddings = [
"google-generativeai>=0.8.0,<1",
]
communities = [
"igraph>=0.11.0",
]
eval = [
"matplotlib>=3.7.0",
"pyyaml>=6.0",
]
wiki = [
"ollama>=0.1.0",
]
all = [
"code-review-graph[embeddings]",
"code-review-graph[communities]",
"code-review-graph[enrichment]",
"code-review-graph[eval]",
"code-review-graph[wiki]",
]
enrichment = [
"jedi>=0.19.2",
]
dev = [
"pytest>=8.0,<9",
"pytest-asyncio>=0.23,<1",
"pytest-cov>=4.0,<8",
"ruff>=0.3.0,<1",
"tomli>=2.0; python_version < '3.11'",
]
[tool.hatch.build.targets.wheel]
packages = ["code_review_graph"]
[tool.hatch.build.targets.wheel.force-include]
"docs/LLM-OPTIMIZED-REFERENCE.md" = "code_review_graph/docs/LLM-OPTIMIZED-REFERENCE.md"
[tool.hatch.build.targets.sdist]
include = [
"code_review_graph/",
"skills/",
"docs/",
"hooks/",
"LICENSE",
"README.md",
"pyproject.toml",
]
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = [
"diagrams/", # diagram DSL scripts — intentionally compact, non-standard style
"tests/fixtures/sample_databricks_notebook.ipynb", # SQL/R/Scala cells are not valid Python
]
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
[tool.ruff.lint.per-file-ignores]
"code_review_graph/visualization.py" = ["E501"] # embedded HTML/JS template
"tests/fixtures/sample_databricks_export.py" = ["F841", "W292"] # intentional fixture patterns
"tests/fixtures/sample_notebook.ipynb" = ["F401", "I001"] # fixture imports: intentionally unused, split across cells
"tests/test_multilang.py" = ["E501"] # long assertions with explanatory comments
[tool.bandit]
# B101: assert used (fine in non-security code)
# B404: import subprocess (we need git interaction)
# B603: subprocess without shell=True (we use list args, not shell)
# B607: partial executable path (calling "git" by name is standard)
# B608: SQL f-string — false positive, we use parameterized "?" placeholders on a local SQLite DB
skips = ["B101", "B404", "B603", "B607", "B608"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
norecursedirs = ["tests/fixtures"]
[dependency-groups]
dev = [
"pytest>=8.4.2",
"pytest-asyncio>=0.23,<1",
]