codegraph-py 1.1.0__py3-none-any.whl → 1.1.2__py3-none-any.whl
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.
- codegraph/__init__.py +1 -1
- codegraph/cli.py +14 -4
- codegraph/codegraph.py +1 -1
- codegraph/extraction/__init__.py +1 -1
- {codegraph_py-1.1.0.dist-info → codegraph_py-1.1.2.dist-info}/METADATA +1 -1
- {codegraph_py-1.1.0.dist-info → codegraph_py-1.1.2.dist-info}/RECORD +9 -9
- {codegraph_py-1.1.0.dist-info → codegraph_py-1.1.2.dist-info}/WHEEL +0 -0
- {codegraph_py-1.1.0.dist-info → codegraph_py-1.1.2.dist-info}/entry_points.txt +0 -0
- {codegraph_py-1.1.0.dist-info → codegraph_py-1.1.2.dist-info}/top_level.txt +0 -0
codegraph/__init__.py
CHANGED
codegraph/cli.py
CHANGED
|
@@ -14,12 +14,13 @@ from typing import Optional, List, Dict
|
|
|
14
14
|
|
|
15
15
|
import click
|
|
16
16
|
|
|
17
|
+
from codegraph import __version__
|
|
17
18
|
from codegraph.codegraph import CodeGraph
|
|
18
19
|
from codegraph.directory import (
|
|
19
20
|
is_initialized, find_nearest_codegraph_root,
|
|
20
21
|
unsafe_index_root_reason, derive_project_name_tokens,
|
|
21
22
|
)
|
|
22
|
-
from codegraph.types import SearchOptions, GraphStats
|
|
23
|
+
from codegraph.types import SearchOptions, SearchResult, GraphStats
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
# =============================================================================
|
|
@@ -68,6 +69,15 @@ def format_number(n: int) -> str:
|
|
|
68
69
|
return f'{n:,}'
|
|
69
70
|
|
|
70
71
|
|
|
72
|
+
def _pluralize(word: str) -> str:
|
|
73
|
+
"""Simple English pluralization."""
|
|
74
|
+
if word.endswith(('s', 'x', 'ch', 'sh')):
|
|
75
|
+
return word + 'es'
|
|
76
|
+
if word.endswith('y') and len(word) > 2 and word[-2] not in 'aeiou':
|
|
77
|
+
return word[:-1] + 'ies'
|
|
78
|
+
return word + 's'
|
|
79
|
+
|
|
80
|
+
|
|
71
81
|
def format_duration(ms: float) -> str:
|
|
72
82
|
"""Format duration in milliseconds to human readable."""
|
|
73
83
|
if ms < 1000:
|
|
@@ -107,7 +117,7 @@ def resolve_project_path(path_arg: Optional[str] = None) -> str:
|
|
|
107
117
|
# =============================================================================
|
|
108
118
|
|
|
109
119
|
@click.group(context_settings=dict(help_option_names=['-h', '--help']))
|
|
110
|
-
@click.version_option(version=
|
|
120
|
+
@click.version_option(version=__version__, prog_name='codegraph')
|
|
111
121
|
def main():
|
|
112
122
|
"""CodeGraph — Semantic code intelligence for AI coding agents.
|
|
113
123
|
|
|
@@ -486,7 +496,7 @@ def query(search: str, path_arg: Optional[str], limit: int,
|
|
|
486
496
|
else:
|
|
487
497
|
click.echo('No search term provided. Use --kind to browse by type.')
|
|
488
498
|
else:
|
|
489
|
-
title = f'\nSearch Results for "{search}":' if search else f'\nAll {kind}
|
|
499
|
+
title = f'\nSearch Results for "{search}":' if search else f'\nAll {_pluralize(kind)}:' if kind else '\nResults:'
|
|
490
500
|
click.echo(bold(title + '\n'))
|
|
491
501
|
for r in results:
|
|
492
502
|
node = r.node
|
|
@@ -754,7 +764,7 @@ def affected(files: List[str], path_arg: Optional[str]):
|
|
|
754
764
|
nodes = cg.get_nodes_by_file(filepath)
|
|
755
765
|
for node in nodes:
|
|
756
766
|
# Find what depends on these nodes
|
|
757
|
-
dependents = cg.get_impact_radius(node.id,
|
|
767
|
+
dependents = cg.get_impact_radius(node.id, max_depth=2)
|
|
758
768
|
for n in dependents.nodes.values():
|
|
759
769
|
if n.file_path.endswith('_test.py') or n.file_path.endswith('test_'):
|
|
760
770
|
affected_files.add(n.file_path)
|
codegraph/codegraph.py
CHANGED
|
@@ -31,7 +31,7 @@ from codegraph.graph import GraphTraverser, GraphQueryManager
|
|
|
31
31
|
from codegraph.context import ContextBuilder, create_context_builder
|
|
32
32
|
from codegraph.sync import FileWatcher, WatchOptions, PendingFile
|
|
33
33
|
|
|
34
|
-
__version__ = "1.1.
|
|
34
|
+
__version__ = "1.1.1"
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@dataclass
|
codegraph/extraction/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraph-py
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Supercharge AI coding agents with semantic code intelligence — surgical context, fewer tool calls, faster answers. 100% local.
|
|
5
5
|
Author-email: mading <martin98@bu.edu>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
codegraph/__init__.py,sha256=
|
|
1
|
+
codegraph/__init__.py,sha256=L4XnTGAGtClNz73T1-g-kG2QKZ79LKXtkUptHeiYXj0,285
|
|
2
2
|
codegraph/__main__.py,sha256=CU1tC_q6j0dvOAONsWUSBfVtbpVEsLmt8Jj358sbGjg,136
|
|
3
|
-
codegraph/cli.py,sha256=
|
|
4
|
-
codegraph/codegraph.py,sha256=
|
|
3
|
+
codegraph/cli.py,sha256=P7V4nxMjgYQS-9QHpOpWBd8qYW0Ymv1UHeRYCYCWhZk,36341
|
|
4
|
+
codegraph/codegraph.py,sha256=EhEQn0C7P7vc722oEv8FH3BwthG5pHK67KBdtCi5oDM,26220
|
|
5
5
|
codegraph/directory.py,sha256=N-6LiwqDnvD87ms9SEPpeukXRuZWpgIT0-juQRBxgG4,5136
|
|
6
6
|
codegraph/errors.py,sha256=70lFoLu-BW4VLR39O0fsqRStG4IgwUSCxVkWvLPlYTA,2861
|
|
7
7
|
codegraph/project_config.py,sha256=14tBQ66vPi44wVxJF3Suasy0xrHfCQYuHokEIh0sbfU,6117
|
|
@@ -12,7 +12,7 @@ codegraph/db/__init__.py,sha256=geWlUD7spD1kYC638ON5V2jPRmtt6s1_lcR5vVEvUls,302
|
|
|
12
12
|
codegraph/db/connection.py,sha256=xG6XSt5SWugWlePqpMP3paAgwCO_4Fva-GYPac0esww,5670
|
|
13
13
|
codegraph/db/queries.py,sha256=nGIXcvLW2GtN8aSnmChHg37YD2jZCqwwi40iISB8swU,30575
|
|
14
14
|
codegraph/db/schema.sql,sha256=4yJFQytPksbu0cvx92_xVyrxDYfoV2Um86kofQ7EoBU,5508
|
|
15
|
-
codegraph/extraction/__init__.py,sha256=
|
|
15
|
+
codegraph/extraction/__init__.py,sha256=AYsalO7xYRO7zsDmaa6NuOXgmC06r0GCj27Dj1c1leo,31470
|
|
16
16
|
codegraph/extraction/tree_sitter_extractor.py,sha256=4tDqaSs5enxdN_WtCvmHAf8H70WAOffR9m1Tmuts9iI,25217
|
|
17
17
|
codegraph/extraction/languages/__init__.py,sha256=9OTdDdAxRwkvaFoF_lkMJ0zEvDiMK0vNoQAvjDcnPII,2175
|
|
18
18
|
codegraph/extraction/languages/base.py,sha256=huH08ABk_d3zRlp2zVQ4NxO3R75fWYZJqGZYsOS2Ubw,4747
|
|
@@ -37,8 +37,8 @@ codegraph/resolution/__init__.py,sha256=VfDWWeFvYTNgJG1Mb3HW6vfbGafMGLEN97wKjnFl
|
|
|
37
37
|
codegraph/search/__init__.py,sha256=ZLghOTL2MWiwa0tQMKsjP0ARvALCVK0tvnowXR1DZK4,22109
|
|
38
38
|
codegraph/sync/__init__.py,sha256=n6Voj1neoSQPCwdvECoOzTFhCfN2zeHA1sPmJyUixww,6558
|
|
39
39
|
codegraph/ui/__init__.py,sha256=tCi-_FJ7-MLPwmRt02dadMlJ3iy3QR26o1fgFc1DsUI,229
|
|
40
|
-
codegraph_py-1.1.
|
|
41
|
-
codegraph_py-1.1.
|
|
42
|
-
codegraph_py-1.1.
|
|
43
|
-
codegraph_py-1.1.
|
|
44
|
-
codegraph_py-1.1.
|
|
40
|
+
codegraph_py-1.1.2.dist-info/METADATA,sha256=fCY-SEHZhLVGwobtfvHUyJyLakWT2RR4OtsP3Th9TrA,8393
|
|
41
|
+
codegraph_py-1.1.2.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
42
|
+
codegraph_py-1.1.2.dist-info/entry_points.txt,sha256=3f2dJK7oR3dBzP21qRk_KuQa6Li8MVbVXeKcx3UjQ6c,49
|
|
43
|
+
codegraph_py-1.1.2.dist-info/top_level.txt,sha256=RqBj9sPbifZTb9aeHtnbxTgKJvfHIQdmYE1Brv8Wdkg,10
|
|
44
|
+
codegraph_py-1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|