mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-11 18:07:31 +00:00
3c3b6554e7
_rewire_unique_stub_nodes gated merge targets through _is_type_like_definition,
which rejects any label ending in `)`. So a function referenced from another
module (passed by name, e.g. FastAPI's Depends(get_db)) left its reference edge
dangling on a sourceless name-only stub while the real def had zero incoming
edges — "who references this function" returned nothing. Class/type symbols were
fine; only functions/methods suffered.
Top-level function defs (label `name()`, not `.name()` methods or `Class.m()`
qualifiers) are now eligible rewire targets, but only when:
- the label key matches exactly one such function corpus-wide (existing
unique-candidate guard — two same-named functions stay unresolved), AND
- the candidate shares a language family with the stub's referrers, so a
Python `get_db` reference can't bind to a unique Go `get_db()` (#1718/#1749
interop guard), AND
- the stub is not used as a supertype (inherits/implements/extends) — you
don't inherit from a function.
Types are unchanged. Regression tests: cross-module function ref binds to def;
cross-language, ambiguous, and supertype cases all correctly left unresolved.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
148 lines
5.8 KiB
TOML
148 lines
5.8 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "graphifyy"
|
|
version = "0.9.13"
|
|
description = "AI coding assistant skill (Claude Code, CodeBuddy, Codex, OpenCode, Kilo Code, Cursor, Gemini CLI, Aider, OpenClaw, Factory Droid, Trae, Hermes, Kiro, Pi, Devin CLI, Google Antigravity) - turn any folder of code, docs, papers, images, or videos into a queryable knowledge graph"
|
|
readme = "README.md"
|
|
license = { file = "LICENSE" }
|
|
keywords = ["claude", "claude-code", "codex", "opencode", "kilo", "cursor", "gemini", "aider", "kiro", "pi", "devin", "knowledge-graph", "rag", "graphrag", "obsidian", "community-detection", "tree-sitter", "leiden", "llm"]
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"networkx>=3.4",
|
|
"numpy>=1.21",
|
|
"rapidfuzz>=3.0",
|
|
"tree-sitter>=0.23.0,<0.26",
|
|
"tree-sitter-python>=0.23,<0.26",
|
|
"tree-sitter-javascript>=0.23,<0.26",
|
|
"tree-sitter-typescript>=0.23,<0.25",
|
|
"tree-sitter-go>=0.23,<0.26",
|
|
"tree-sitter-rust>=0.23,<0.25",
|
|
"tree-sitter-java>=0.23,<0.25",
|
|
"tree-sitter-groovy>=0.1,<0.3",
|
|
"tree-sitter-c>=0.23,<0.25",
|
|
"tree-sitter-cpp>=0.23,<0.25",
|
|
"tree-sitter-ruby>=0.23,<0.25",
|
|
"tree-sitter-c-sharp>=0.23,<0.25",
|
|
"tree-sitter-kotlin>=1.0,<2.0",
|
|
"tree-sitter-scala>=0.23,<0.27",
|
|
"tree-sitter-php>=0.23,<0.25",
|
|
"tree-sitter-swift>=0.7,<0.9",
|
|
"tree-sitter-lua>=0.2,<0.6",
|
|
"tree-sitter-zig>=1.0,<2.0",
|
|
"tree-sitter-powershell>=0.26,<0.28",
|
|
"tree-sitter-elixir>=0.3,<0.5",
|
|
"tree-sitter-objc>=3.0,<4.0",
|
|
"tree-sitter-julia>=0.23,<0.25",
|
|
"tree-sitter-verilog>=1.0,<2.0",
|
|
"tree-sitter-fortran>=0.6,<0.8",
|
|
"tree-sitter-bash>=0.23,<0.27",
|
|
"tree-sitter-json>=0.23,<0.26",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/safishamsi/graphify"
|
|
Repository = "https://github.com/safishamsi/graphify"
|
|
Issues = "https://github.com/safishamsi/graphify/issues"
|
|
|
|
[project.optional-dependencies]
|
|
# starlette is pulled in transitively by mcp, but graphify/serve.py imports it
|
|
# directly for the HTTP transport, so declare it here and floor it above the
|
|
# CVE-2026-48818 / CVE-2026-54283 fixes (both resolved by 1.3.1) (#1391, #1396).
|
|
mcp = ["mcp", "starlette>=1.3.1"]
|
|
neo4j = ["neo4j"]
|
|
falkordb = ["falkordb"]
|
|
pdf = ["pypdf>=6.12.0", "markdownify"]
|
|
watch = ["watchdog"]
|
|
svg = ["matplotlib", "numpy>=2.0; python_version >= '3.13'"]
|
|
leiden = ["graspologic; python_version < '3.13'"]
|
|
office = ["python-docx", "openpyxl"]
|
|
google = ["openpyxl"]
|
|
postgres = ["psycopg[binary]"]
|
|
video = ["faster-whisper; python_version >= '3.11'", "yt-dlp>=2026.6.9"]
|
|
kimi = ["openai", "tiktoken"]
|
|
ollama = ["openai"]
|
|
bedrock = ["boto3"]
|
|
anthropic = ["anthropic"]
|
|
gemini = ["openai", "tiktoken"]
|
|
openai = ["openai", "tiktoken"]
|
|
chinese = ["jieba"]
|
|
sql = ["tree-sitter-sql"]
|
|
# extract_pascal() uses tree-sitter-pascal for AST-quality extraction (more
|
|
# accurate calls/inherits edges) and falls back to a regex extractor when it is
|
|
# absent (#781), so this stays optional. Unlike tree-sitter-dm below, it ships
|
|
# prebuilt wheels for every platform (win/macOS/Linux), so no C toolchain needed.
|
|
pascal = ["tree-sitter-pascal"]
|
|
# tree-sitter-dm (BYOND DreamMaker) ships only a Windows wheel, so on Linux/Mac it
|
|
# must compile from source (needs a C toolchain + python3-dev). Keeping it optional
|
|
# avoids breaking the default `uv tool install graphifyy` for everyone (#1104).
|
|
dm = ["tree-sitter-dm"]
|
|
terraform = ["tree-sitter-hcl"]
|
|
all = ["mcp", "starlette>=1.3.1", "neo4j", "falkordb", "pypdf>=6.12.0", "markdownify", "watchdog", "graspologic; python_version < '3.13'", "python-docx", "openpyxl", "faster-whisper; python_version >= '3.11'", "yt-dlp>=2026.6.9", "matplotlib", "numpy>=2.0; python_version >= '3.13'", "openai", "tiktoken", "boto3", "anthropic", "tree-sitter-sql", "jieba", "tree-sitter-dm", "tree-sitter-hcl", "tree-sitter-pascal"]
|
|
|
|
[project.scripts]
|
|
graphify = "graphify.__main__:main"
|
|
graphify-mcp = "graphify.serve:_main"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"bandit>=1.9.4",
|
|
"build>=1.5.0",
|
|
"hypothesis>=6.152.7",
|
|
"nuitka>=4.1",
|
|
"patchelf>=0.17.2.4 ; sys_platform != 'win32'",
|
|
"pip-audit>=2.10.0",
|
|
"pre-commit>=4.6.0",
|
|
"pyright>=1.1.409",
|
|
"pytest>=9.0.3",
|
|
"pytest-cov>=7.1.0",
|
|
"ruff>=0.15.13",
|
|
"setuptools>=82.0.1",
|
|
"wheel>=0.47.0",
|
|
"tomli>=2.0 ; python_version < '3.11'",
|
|
"tree-sitter-hcl>=1.2.0",
|
|
]
|
|
|
|
[tool.uv]
|
|
# Install via: uv tool install graphifyy
|
|
# Run without installing: uvx graphifyy install
|
|
package = true
|
|
|
|
[tool.setuptools]
|
|
packages = ["graphify", "graphify.extractors", "graphify.exporters"]
|
|
include-package-data = false
|
|
|
|
[tool.setuptools.package-data]
|
|
# The skill bodies ship as graphify/skill*.md (the SKILL.md a host installs is
|
|
# copied from one of these). The progressive-disclosure references sidecar ships
|
|
# under graphify/skills/<host>/references/, and the always-on injection blocks
|
|
# under graphify/always_on/. There is no graphify/skills/<host>/SKILL.md in the
|
|
# repo, so no SKILL.md glob is needed here.
|
|
graphify = ["skill.md", "skill-codex.md", "skill-opencode.md", "skill-kilo.md", "command-kilo.md", "skill-aider.md", "skill-amp.md", "skill-agents.md", "skill-copilot.md", "skill-claw.md", "skill-windows.md", "skill-droid.md", "skill-trae.md", "skill-kiro.md", "skill-vscode.md", "skill-pi.md", "skill-devin.md", "skills/*/references/*.md", "always_on/*.md"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
norecursedirs = [
|
|
"graphify-benchmark", "graphify_eval", "graphify_test",
|
|
"worked", "llm-stack-corpus", "llm-stack-demo", "product-site",
|
|
"scripts", "ebook", ".github", "dist", "build",
|
|
]
|
|
|
|
[tool.bandit]
|
|
skips = ["B404"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
# Keep the committed baseline conservative until upstream adopts a broader lint policy.
|
|
select = ["E9", "F63", "F7", "F82"]
|
|
|
|
[tool.pyright]
|
|
include = ["graphify", "tests"]
|
|
pythonVersion = "3.10"
|
|
typeCheckingMode = "basic"
|