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.
Files changed (54) hide show
  1. {graphifyy-0.2.1 → graphifyy-0.2.2}/PKG-INFO +9 -2
  2. {graphifyy-0.2.1 → graphifyy-0.2.2}/README.md +5 -0
  3. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/cluster.py +20 -7
  4. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/PKG-INFO +9 -2
  5. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/requires.txt +4 -1
  6. {graphifyy-0.2.1 → graphifyy-0.2.2}/pyproject.toml +3 -3
  7. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/__init__.py +0 -0
  8. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/__main__.py +0 -0
  9. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/analyze.py +0 -0
  10. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/benchmark.py +0 -0
  11. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/build.py +0 -0
  12. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/cache.py +0 -0
  13. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/detect.py +0 -0
  14. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/export.py +0 -0
  15. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/extract.py +0 -0
  16. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/hooks.py +0 -0
  17. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/ingest.py +0 -0
  18. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/manifest.py +0 -0
  19. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/report.py +0 -0
  20. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/security.py +0 -0
  21. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/serve.py +0 -0
  22. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/skill.md +0 -0
  23. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/validate.py +0 -0
  24. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/watch.py +0 -0
  25. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphify/wiki.py +0 -0
  26. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/SOURCES.txt +0 -0
  27. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/dependency_links.txt +0 -0
  28. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/entry_points.txt +0 -0
  29. {graphifyy-0.2.1 → graphifyy-0.2.2}/graphifyy.egg-info/top_level.txt +0 -0
  30. {graphifyy-0.2.1 → graphifyy-0.2.2}/setup.cfg +0 -0
  31. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_analyze.py +0 -0
  32. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_benchmark.py +0 -0
  33. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_build.py +0 -0
  34. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_cache.py +0 -0
  35. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_claude_md.py +0 -0
  36. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_cluster.py +0 -0
  37. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_confidence.py +0 -0
  38. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_detect.py +0 -0
  39. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_export.py +0 -0
  40. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_extract.py +0 -0
  41. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_hooks.py +0 -0
  42. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_hypergraph.py +0 -0
  43. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_ingest.py +0 -0
  44. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_languages.py +0 -0
  45. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_multilang.py +0 -0
  46. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_pipeline.py +0 -0
  47. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_rationale.py +0 -0
  48. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_report.py +0 -0
  49. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_security.py +0 -0
  50. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_semantic_similarity.py +0 -0
  51. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_serve.py +0 -0
  52. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_validate.py +0 -0
  53. {graphifyy-0.2.1 → graphifyy-0.2.2}/tests/test_watch.py +0 -0
  54. {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.1
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
  [![CI](https://github.com/safishamsi/graphify/actions/workflows/ci.yml/badge.svg?branch=v2)](https://github.com/safishamsi/graphify/actions/workflows/ci.yml)
49
+ [![PyPI](https://img.shields.io/pypi/v/graphifyy)](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
  [![CI](https://github.com/safishamsi/graphify/actions/workflows/ci.yml/badge.svg?branch=v2)](https://github.com/safishamsi/graphify/actions/workflows/ci.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/graphifyy)](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
- """Leiden community detection on NetworkX graphs. Splits oversized communities. Returns cohesion scores."""
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: dict[str, int] = leiden(connected)
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
- from graspologic.partition import leiden
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.1
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
  [![CI](https://github.com/safishamsi/graphify/actions/workflows/ci.yml/badge.svg?branch=v2)](https://github.com/safishamsi/graphify/actions/workflows/ci.yml)
49
+ [![PyPI](https://img.shields.io/pypi/v/graphifyy)](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,5 +1,4 @@
1
1
  networkx
2
- graspologic
3
2
  tree-sitter
4
3
  tree-sitter-python
5
4
  tree-sitter-javascript
@@ -21,6 +20,10 @@ neo4j
21
20
  pypdf
22
21
  html2text
23
22
  watchdog
23
+ graspologic
24
+
25
+ [leiden]
26
+ graspologic
24
27
 
25
28
  [mcp]
26
29
  mcp
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "graphifyy"
7
- version = "0.2.1"
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
- all = ["mcp", "neo4j", "pypdf", "html2text", "watchdog"]
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