graphifyy 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graphifyy-0.2.1 → graphifyy-0.2.2}/PKG-INFO +9 -2
- {graphifyy-0.2.1 → graphifyy-0.2.2}/README.md +5 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/cluster.py +20 -7
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/PKG-INFO +9 -2
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/requires.txt +4 -1
- {graphifyy-0.2.1 → graphifyy-0.2.2}/pyproject.toml +3 -3
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/__init__.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/__main__.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/analyze.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/benchmark.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/build.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/cache.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/detect.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/export.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/extract.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/hooks.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/ingest.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/manifest.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/report.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/security.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/serve.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/skill.md +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/validate.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/watch.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/wiki.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/SOURCES.txt +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/dependency_links.txt +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/entry_points.txt +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/top_level.txt +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/setup.cfg +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_analyze.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_benchmark.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_build.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_cache.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_claude_md.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_cluster.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_confidence.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_detect.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_export.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_extract.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_hooks.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_hypergraph.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_ingest.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_languages.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_multilang.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_pipeline.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_rationale.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_report.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_security.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_semantic_similarity.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_serve.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_validate.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_watch.py +0 -0
- {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_wiki.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: graphifyy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Claude Code skill - turn any folder of code, docs, papers, images, or tweets into a queryable knowledge graph
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/safishamsi/graphify
|
|
@@ -10,7 +10,6 @@ Keywords: claude,claude-code,knowledge-graph,rag,graphrag,obsidian,community-det
|
|
|
10
10
|
Requires-Python: >=3.10
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: networkx
|
|
13
|
-
Requires-Dist: graspologic
|
|
14
13
|
Requires-Dist: tree-sitter
|
|
15
14
|
Requires-Dist: tree-sitter-python
|
|
16
15
|
Requires-Dist: tree-sitter-javascript
|
|
@@ -34,16 +33,20 @@ Requires-Dist: pypdf; extra == "pdf"
|
|
|
34
33
|
Requires-Dist: html2text; extra == "pdf"
|
|
35
34
|
Provides-Extra: watch
|
|
36
35
|
Requires-Dist: watchdog; extra == "watch"
|
|
36
|
+
Provides-Extra: leiden
|
|
37
|
+
Requires-Dist: graspologic; extra == "leiden"
|
|
37
38
|
Provides-Extra: all
|
|
38
39
|
Requires-Dist: mcp; extra == "all"
|
|
39
40
|
Requires-Dist: neo4j; extra == "all"
|
|
40
41
|
Requires-Dist: pypdf; extra == "all"
|
|
41
42
|
Requires-Dist: html2text; extra == "all"
|
|
42
43
|
Requires-Dist: watchdog; extra == "all"
|
|
44
|
+
Requires-Dist: graspologic; extra == "all"
|
|
43
45
|
|
|
44
46
|
# graphify
|
|
45
47
|
|
|
46
48
|
[](https://github.com/safishamsi/graphify/actions/workflows/ci.yml)
|
|
49
|
+
[](https://pypi.org/project/graphifyy/)
|
|
47
50
|
|
|
48
51
|
**A Claude Code skill.** Type `/graphify` in Claude Code - it reads your files, builds a knowledge graph, and gives you back structure you didn't know was there. Understand a codebase faster. Find the "why" behind architectural decisions.
|
|
49
52
|
|
|
@@ -191,6 +194,10 @@ Works with any mix of file types:
|
|
|
191
194
|
|
|
192
195
|
Token reduction scales with corpus size. 6 files fits in a context window anyway, so graph value there is structural clarity, not compression. At 52 files (code + papers + images) you get 71x+. Each `worked/` folder has the raw input files and the actual output (`GRAPH_REPORT.md`, `graph.json`) so you can run it yourself and verify the numbers.
|
|
193
196
|
|
|
197
|
+
## Privacy
|
|
198
|
+
|
|
199
|
+
graphify sends file contents to the Claude API (Anthropic) for semantic extraction of docs, papers, and images. Code files are processed locally via tree-sitter AST — no file contents leave your machine for code. No telemetry, usage tracking, or analytics of any kind. The only network calls are to Anthropic's API during extraction, using your own API key via Claude Code.
|
|
200
|
+
|
|
194
201
|
## Tech stack
|
|
195
202
|
|
|
196
203
|
NetworkX + Leiden (graspologic) + tree-sitter + Claude + vis.js. No Neo4j required, no server, runs entirely locally.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# graphify
|
|
2
2
|
|
|
3
3
|
[](https://github.com/safishamsi/graphify/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/graphifyy/)
|
|
4
5
|
|
|
5
6
|
**A Claude Code skill.** Type `/graphify` in Claude Code - it reads your files, builds a knowledge graph, and gives you back structure you didn't know was there. Understand a codebase faster. Find the "why" behind architectural decisions.
|
|
6
7
|
|
|
@@ -148,6 +149,10 @@ Works with any mix of file types:
|
|
|
148
149
|
|
|
149
150
|
Token reduction scales with corpus size. 6 files fits in a context window anyway, so graph value there is structural clarity, not compression. At 52 files (code + papers + images) you get 71x+. Each `worked/` folder has the raw input files and the actual output (`GRAPH_REPORT.md`, `graph.json`) so you can run it yourself and verify the numbers.
|
|
150
151
|
|
|
152
|
+
## Privacy
|
|
153
|
+
|
|
154
|
+
graphify sends file contents to the Claude API (Anthropic) for semantic extraction of docs, papers, and images. Code files are processed locally via tree-sitter AST — no file contents leave your machine for code. No telemetry, usage tracking, or analytics of any kind. The only network calls are to Anthropic's API during extraction, using your own API key via Claude Code.
|
|
155
|
+
|
|
151
156
|
## Tech stack
|
|
152
157
|
|
|
153
158
|
NetworkX + Leiden (graspologic) + tree-sitter + Claude + vis.js. No Neo4j required, no server, runs entirely locally.
|
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Community detection on NetworkX graphs. Uses Leiden (graspologic) if available, falls back to Louvain (networkx). Splits oversized communities. Returns cohesion scores."""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
import networkx as nx
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
def _partition(G: nx.Graph) -> dict[str, int]:
|
|
7
|
+
"""Run community detection. Returns {node_id: community_id}.
|
|
8
|
+
|
|
9
|
+
Tries Leiden (graspologic) first — best quality.
|
|
10
|
+
Falls back to Louvain (built into networkx) if graspologic is not installed.
|
|
11
|
+
"""
|
|
12
|
+
try:
|
|
13
|
+
from graspologic.partition import leiden
|
|
14
|
+
return leiden(G)
|
|
15
|
+
except ImportError:
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
# Fallback: networkx louvain (available since networkx 2.7)
|
|
19
|
+
communities = nx.community.louvain_communities(G, seed=42)
|
|
20
|
+
return {node: cid for cid, nodes in enumerate(communities) for node in nodes}
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
def build_graph(nodes: list[dict], edges: list[dict]) -> nx.Graph:
|
|
7
24
|
"""Build a NetworkX graph from graphify node/edge dicts.
|
|
8
25
|
|
|
@@ -36,8 +53,6 @@ def cluster(G: nx.Graph) -> dict[int, list[str]]:
|
|
|
36
53
|
if G.number_of_edges() == 0:
|
|
37
54
|
return {i: [n] for i, n in enumerate(sorted(G.nodes))}
|
|
38
55
|
|
|
39
|
-
from graspologic.partition import leiden # lazy - avoids 15s numba JIT on import
|
|
40
|
-
|
|
41
56
|
# Leiden warns and drops isolates - handle them separately
|
|
42
57
|
isolates = [n for n in G.nodes() if G.degree(n) == 0]
|
|
43
58
|
connected_nodes = [n for n in G.nodes() if G.degree(n) > 0]
|
|
@@ -45,7 +60,7 @@ def cluster(G: nx.Graph) -> dict[int, list[str]]:
|
|
|
45
60
|
|
|
46
61
|
raw: dict[int, list[str]] = {}
|
|
47
62
|
if connected.number_of_nodes() > 0:
|
|
48
|
-
partition
|
|
63
|
+
partition = _partition(connected)
|
|
49
64
|
for node, cid in partition.items():
|
|
50
65
|
raw.setdefault(cid, []).append(node)
|
|
51
66
|
|
|
@@ -76,13 +91,11 @@ def _split_community(G: nx.Graph, nodes: list[str]) -> list[list[str]]:
|
|
|
76
91
|
# No edges - split into individual nodes
|
|
77
92
|
return [[n] for n in sorted(nodes)]
|
|
78
93
|
try:
|
|
79
|
-
|
|
80
|
-
sub_partition: dict[str, int] = leiden(subgraph)
|
|
94
|
+
sub_partition = _partition(subgraph)
|
|
81
95
|
sub_communities: dict[int, list[str]] = {}
|
|
82
96
|
for node, cid in sub_partition.items():
|
|
83
97
|
sub_communities.setdefault(cid, []).append(node)
|
|
84
98
|
if len(sub_communities) <= 1:
|
|
85
|
-
# Leiden couldn't split it - return as-is
|
|
86
99
|
return [sorted(nodes)]
|
|
87
100
|
return [sorted(v) for v in sub_communities.values()]
|
|
88
101
|
except Exception:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: graphifyy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Claude Code skill - turn any folder of code, docs, papers, images, or tweets into a queryable knowledge graph
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/safishamsi/graphify
|
|
@@ -10,7 +10,6 @@ Keywords: claude,claude-code,knowledge-graph,rag,graphrag,obsidian,community-det
|
|
|
10
10
|
Requires-Python: >=3.10
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: networkx
|
|
13
|
-
Requires-Dist: graspologic
|
|
14
13
|
Requires-Dist: tree-sitter
|
|
15
14
|
Requires-Dist: tree-sitter-python
|
|
16
15
|
Requires-Dist: tree-sitter-javascript
|
|
@@ -34,16 +33,20 @@ Requires-Dist: pypdf; extra == "pdf"
|
|
|
34
33
|
Requires-Dist: html2text; extra == "pdf"
|
|
35
34
|
Provides-Extra: watch
|
|
36
35
|
Requires-Dist: watchdog; extra == "watch"
|
|
36
|
+
Provides-Extra: leiden
|
|
37
|
+
Requires-Dist: graspologic; extra == "leiden"
|
|
37
38
|
Provides-Extra: all
|
|
38
39
|
Requires-Dist: mcp; extra == "all"
|
|
39
40
|
Requires-Dist: neo4j; extra == "all"
|
|
40
41
|
Requires-Dist: pypdf; extra == "all"
|
|
41
42
|
Requires-Dist: html2text; extra == "all"
|
|
42
43
|
Requires-Dist: watchdog; extra == "all"
|
|
44
|
+
Requires-Dist: graspologic; extra == "all"
|
|
43
45
|
|
|
44
46
|
# graphify
|
|
45
47
|
|
|
46
48
|
[](https://github.com/safishamsi/graphify/actions/workflows/ci.yml)
|
|
49
|
+
[](https://pypi.org/project/graphifyy/)
|
|
47
50
|
|
|
48
51
|
**A Claude Code skill.** Type `/graphify` in Claude Code - it reads your files, builds a knowledge graph, and gives you back structure you didn't know was there. Understand a codebase faster. Find the "why" behind architectural decisions.
|
|
49
52
|
|
|
@@ -191,6 +194,10 @@ Works with any mix of file types:
|
|
|
191
194
|
|
|
192
195
|
Token reduction scales with corpus size. 6 files fits in a context window anyway, so graph value there is structural clarity, not compression. At 52 files (code + papers + images) you get 71x+. Each `worked/` folder has the raw input files and the actual output (`GRAPH_REPORT.md`, `graph.json`) so you can run it yourself and verify the numbers.
|
|
193
196
|
|
|
197
|
+
## Privacy
|
|
198
|
+
|
|
199
|
+
graphify sends file contents to the Claude API (Anthropic) for semantic extraction of docs, papers, and images. Code files are processed locally via tree-sitter AST — no file contents leave your machine for code. No telemetry, usage tracking, or analytics of any kind. The only network calls are to Anthropic's API during extraction, using your own API key via Claude Code.
|
|
200
|
+
|
|
194
201
|
## Tech stack
|
|
195
202
|
|
|
196
203
|
NetworkX + Leiden (graspologic) + tree-sitter + Claude + vis.js. No Neo4j required, no server, runs entirely locally.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "graphifyy"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Claude Code skill - turn any folder of code, docs, papers, images, or tweets into a queryable knowledge graph"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -12,7 +12,6 @@ keywords = ["claude", "claude-code", "knowledge-graph", "rag", "graphrag", "obsi
|
|
|
12
12
|
requires-python = ">=3.10"
|
|
13
13
|
dependencies = [
|
|
14
14
|
"networkx",
|
|
15
|
-
"graspologic",
|
|
16
15
|
"tree-sitter",
|
|
17
16
|
"tree-sitter-python",
|
|
18
17
|
"tree-sitter-javascript",
|
|
@@ -39,7 +38,8 @@ mcp = ["mcp"]
|
|
|
39
38
|
neo4j = ["neo4j"]
|
|
40
39
|
pdf = ["pypdf", "html2text"]
|
|
41
40
|
watch = ["watchdog"]
|
|
42
|
-
|
|
41
|
+
leiden = ["graspologic"]
|
|
42
|
+
all = ["mcp", "neo4j", "pypdf", "html2text", "watchdog", "graspologic"]
|
|
43
43
|
|
|
44
44
|
[project.scripts]
|
|
45
45
|
graphify = "graphify.__main__:main"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|