repoglass 0.1.0__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.
- repoglass-0.1.0/LICENSE +21 -0
- repoglass-0.1.0/PKG-INFO +77 -0
- repoglass-0.1.0/README.md +50 -0
- repoglass-0.1.0/pyproject.toml +52 -0
- repoglass-0.1.0/setup.cfg +4 -0
- repoglass-0.1.0/src/repoglass/__init__.py +19 -0
- repoglass-0.1.0/src/repoglass/cli.py +582 -0
- repoglass-0.1.0/src/repoglass/config/__init__.py +14 -0
- repoglass-0.1.0/src/repoglass/config/load.py +92 -0
- repoglass-0.1.0/src/repoglass/config/paths.py +88 -0
- repoglass-0.1.0/src/repoglass/config/render.py +111 -0
- repoglass-0.1.0/src/repoglass/config/schema.py +217 -0
- repoglass-0.1.0/src/repoglass/corpus/__init__.py +0 -0
- repoglass-0.1.0/src/repoglass/corpus/classify.py +84 -0
- repoglass-0.1.0/src/repoglass/corpus/discovery.py +211 -0
- repoglass-0.1.0/src/repoglass/corpus/extract.py +309 -0
- repoglass-0.1.0/src/repoglass/corpus/languages.py +99 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/NOTICE.md +29 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/bash-tags.scm +8 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/c-refs.scm +5 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/c-tags.scm +9 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/cpp-refs.scm +10 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/cpp-tags.scm +15 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/csharp-tags.scm +26 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/elixir-tags.scm +54 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/go-tags.scm +42 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/haskell-refs.scm +8 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/haskell-tags.scm +22 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/java-tags.scm +20 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/javascript-tags.scm +88 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/kotlin-tags.scm +27 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/lua-tags.scm +34 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/manifest.json +71 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/markdown-tags.scm +2 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/php-refs.scm +7 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/php-tags.scm +26 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/python-tags.scm +31 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/ruby-tags.scm +64 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/rust-refs.scm +7 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/rust-tags.scm +60 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/scala-refs.scm +12 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/scala-tags.scm +20 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/swift-refs.scm +13 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/swift-tags.scm +51 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/typescript-refs.scm +11 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/typescript-tags.scm +41 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/zig-refs.scm +12 -0
- repoglass-0.1.0/src/repoglass/corpus/queries/zig-tags.scm +10 -0
- repoglass-0.1.0/src/repoglass/corpus/render.py +133 -0
- repoglass-0.1.0/src/repoglass/corpus/windows.py +166 -0
- repoglass-0.1.0/src/repoglass/embeddings/__init__.py +82 -0
- repoglass-0.1.0/src/repoglass/embeddings/backends.py +371 -0
- repoglass-0.1.0/src/repoglass/embeddings/policy.py +85 -0
- repoglass-0.1.0/src/repoglass/index.py +463 -0
- repoglass-0.1.0/src/repoglass/models.py +197 -0
- repoglass-0.1.0/src/repoglass/search/__init__.py +0 -0
- repoglass-0.1.0/src/repoglass/search/boosting.py +224 -0
- repoglass-0.1.0/src/repoglass/search/fuse.py +93 -0
- repoglass-0.1.0/src/repoglass/search/lexical.py +60 -0
- repoglass-0.1.0/src/repoglass/search/penalties.py +101 -0
- repoglass-0.1.0/src/repoglass/search/query_shape.py +31 -0
- repoglass-0.1.0/src/repoglass/search/rank.py +60 -0
- repoglass-0.1.0/src/repoglass/search/tokens.py +45 -0
- repoglass-0.1.0/src/repoglass/search/vector.py +63 -0
- repoglass-0.1.0/src/repoglass/sql/index.sql +99 -0
- repoglass-0.1.0/src/repoglass/store.py +840 -0
- repoglass-0.1.0/src/repoglass/text.py +16 -0
- repoglass-0.1.0/src/repoglass.egg-info/PKG-INFO +77 -0
- repoglass-0.1.0/src/repoglass.egg-info/SOURCES.txt +98 -0
- repoglass-0.1.0/src/repoglass.egg-info/dependency_links.txt +1 -0
- repoglass-0.1.0/src/repoglass.egg-info/entry_points.txt +3 -0
- repoglass-0.1.0/src/repoglass.egg-info/requires.txt +17 -0
- repoglass-0.1.0/src/repoglass.egg-info/top_level.txt +1 -0
- repoglass-0.1.0/tests/test_categories.py +237 -0
- repoglass-0.1.0/tests/test_chunks.py +216 -0
- repoglass-0.1.0/tests/test_classify.py +84 -0
- repoglass-0.1.0/tests/test_cli.py +659 -0
- repoglass-0.1.0/tests/test_config.py +254 -0
- repoglass-0.1.0/tests/test_content_defaults.py +123 -0
- repoglass-0.1.0/tests/test_discovery.py +328 -0
- repoglass-0.1.0/tests/test_embed_backends.py +220 -0
- repoglass-0.1.0/tests/test_embeddings.py +48 -0
- repoglass-0.1.0/tests/test_extract.py +92 -0
- repoglass-0.1.0/tests/test_hybrid_chunks.py +95 -0
- repoglass-0.1.0/tests/test_import_direction.py +85 -0
- repoglass-0.1.0/tests/test_index.py +831 -0
- repoglass-0.1.0/tests/test_language_coverage.py +112 -0
- repoglass-0.1.0/tests/test_languages.py +117 -0
- repoglass-0.1.0/tests/test_lexical_storage.py +115 -0
- repoglass-0.1.0/tests/test_model_resolution.py +57 -0
- repoglass-0.1.0/tests/test_oversized_input.py +90 -0
- repoglass-0.1.0/tests/test_query_cache.py +95 -0
- repoglass-0.1.0/tests/test_query_free_languages.py +84 -0
- repoglass-0.1.0/tests/test_rank.py +214 -0
- repoglass-0.1.0/tests/test_review_regressions.py +152 -0
- repoglass-0.1.0/tests/test_search.py +115 -0
- repoglass-0.1.0/tests/test_store.py +415 -0
- repoglass-0.1.0/tests/test_vector_width.py +48 -0
- repoglass-0.1.0/tests/test_window_bounds.py +64 -0
- repoglass-0.1.0/tests/test_window_chunks.py +139 -0
repoglass-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nitin Kumar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING IN THE
|
|
21
|
+
SOFTWARE.
|
repoglass-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: repoglass
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local code and prose index: symbol navigation, lexical and semantic retrieval
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/nitkrar/repoglass
|
|
7
|
+
Project-URL: Source, https://github.com/nitkrar/repoglass
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: src/repoglass/corpus/queries/NOTICE.md
|
|
12
|
+
Requires-Dist: tree-sitter>=0.25
|
|
13
|
+
Requires-Dist: tree-sitter-language-pack>=1.19
|
|
14
|
+
Requires-Dist: grep-ast>=0.9
|
|
15
|
+
Requires-Dist: model2vec>=0.9
|
|
16
|
+
Requires-Dist: numpy>=1.26
|
|
17
|
+
Requires-Dist: pathspec>=0.12
|
|
18
|
+
Requires-Dist: huggingface-hub>=0.23
|
|
19
|
+
Provides-Extra: config
|
|
20
|
+
Requires-Dist: tomlkit>=0.13; extra == "config"
|
|
21
|
+
Provides-Extra: onnx
|
|
22
|
+
Requires-Dist: onnxruntime>=1.17; extra == "onnx"
|
|
23
|
+
Provides-Extra: webgpu
|
|
24
|
+
Requires-Dist: onnxruntime>=1.24.4; extra == "webgpu"
|
|
25
|
+
Requires-Dist: onnxruntime-ep-webgpu; extra == "webgpu"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# repoglass
|
|
29
|
+
|
|
30
|
+
Local code and prose search with exact symbol lookup.
|
|
31
|
+
|
|
32
|
+
repoglass builds a local index for one directory tree. `rpg search` does ranked
|
|
33
|
+
retrieval; `rpg defs` and `rpg refs` read the stored symbol table for exact
|
|
34
|
+
navigation.
|
|
35
|
+
|
|
36
|
+
## Quickstart
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uv tool install repoglass # or: pipx install repoglass
|
|
40
|
+
cd ~/your/repo
|
|
41
|
+
rpg search "how are retries handled"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Either installer puts `rpg` and `repoglass` on PATH and keeps them there
|
|
45
|
+
across upgrades. To work on repoglass itself, `pip install -e .` inside a
|
|
46
|
+
virtualenv leaves both commands in that virtualenv's `bin/`.
|
|
47
|
+
|
|
48
|
+
The first command that needs an index builds it. If the default model or grammar
|
|
49
|
+
bundle is not cached yet, that first run may download them; later runs are
|
|
50
|
+
local.
|
|
51
|
+
|
|
52
|
+
## Next commands
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
rpg defs Index
|
|
56
|
+
rpg refs humanise
|
|
57
|
+
rpg symbols --count-by lang
|
|
58
|
+
rpg status
|
|
59
|
+
repoglass --help
|
|
60
|
+
repoglass search --help
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Docs
|
|
64
|
+
|
|
65
|
+
- [docs/design.md](docs/design.md) records invariants that are not obvious from
|
|
66
|
+
one source file.
|
|
67
|
+
- [docs/decisions-log.md](docs/decisions-log.md) records non-obvious decisions
|
|
68
|
+
and absences.
|
|
69
|
+
- [docs/worklist.md](docs/worklist.md) lists current user-visible defects.
|
|
70
|
+
- `./.venv/bin/python benchmarks/run_corpus.py` prints current corpus scores.
|
|
71
|
+
- `python -m unittest discover -s tests` runs the test suite. It is stdlib
|
|
72
|
+
`unittest`; there is no test dependency to install.
|
|
73
|
+
|
|
74
|
+
## Licence
|
|
75
|
+
|
|
76
|
+
MIT, see [LICENSE](LICENSE). Third-party material is attributed in
|
|
77
|
+
[src/repoglass/corpus/queries/NOTICE.md](src/repoglass/corpus/queries/NOTICE.md).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# repoglass
|
|
2
|
+
|
|
3
|
+
Local code and prose search with exact symbol lookup.
|
|
4
|
+
|
|
5
|
+
repoglass builds a local index for one directory tree. `rpg search` does ranked
|
|
6
|
+
retrieval; `rpg defs` and `rpg refs` read the stored symbol table for exact
|
|
7
|
+
navigation.
|
|
8
|
+
|
|
9
|
+
## Quickstart
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv tool install repoglass # or: pipx install repoglass
|
|
13
|
+
cd ~/your/repo
|
|
14
|
+
rpg search "how are retries handled"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Either installer puts `rpg` and `repoglass` on PATH and keeps them there
|
|
18
|
+
across upgrades. To work on repoglass itself, `pip install -e .` inside a
|
|
19
|
+
virtualenv leaves both commands in that virtualenv's `bin/`.
|
|
20
|
+
|
|
21
|
+
The first command that needs an index builds it. If the default model or grammar
|
|
22
|
+
bundle is not cached yet, that first run may download them; later runs are
|
|
23
|
+
local.
|
|
24
|
+
|
|
25
|
+
## Next commands
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
rpg defs Index
|
|
29
|
+
rpg refs humanise
|
|
30
|
+
rpg symbols --count-by lang
|
|
31
|
+
rpg status
|
|
32
|
+
repoglass --help
|
|
33
|
+
repoglass search --help
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Docs
|
|
37
|
+
|
|
38
|
+
- [docs/design.md](docs/design.md) records invariants that are not obvious from
|
|
39
|
+
one source file.
|
|
40
|
+
- [docs/decisions-log.md](docs/decisions-log.md) records non-obvious decisions
|
|
41
|
+
and absences.
|
|
42
|
+
- [docs/worklist.md](docs/worklist.md) lists current user-visible defects.
|
|
43
|
+
- `./.venv/bin/python benchmarks/run_corpus.py` prints current corpus scores.
|
|
44
|
+
- `python -m unittest discover -s tests` runs the test suite. It is stdlib
|
|
45
|
+
`unittest`; there is no test dependency to install.
|
|
46
|
+
|
|
47
|
+
## Licence
|
|
48
|
+
|
|
49
|
+
MIT, see [LICENSE](LICENSE). Third-party material is attributed in
|
|
50
|
+
[src/repoglass/corpus/queries/NOTICE.md](src/repoglass/corpus/queries/NOTICE.md).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"] # PEP 639 license-files
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "repoglass"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Local code and prose index: symbol navigation, lexical and semantic retrieval"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11" # tomllib
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE", "src/repoglass/corpus/queries/NOTICE.md"]
|
|
13
|
+
|
|
14
|
+
dependencies = [
|
|
15
|
+
"tree-sitter>=0.25", # Query/QueryCursor; Language.query removed in the same release
|
|
16
|
+
"tree-sitter-language-pack>=1.19",
|
|
17
|
+
"grep-ast>=0.9",
|
|
18
|
+
"model2vec>=0.9", # brings numpy and tokenizers
|
|
19
|
+
"numpy>=1.26", # direct: search/vector.py uses it unconditionally
|
|
20
|
+
"pathspec>=0.12",
|
|
21
|
+
# Direct: embeddings.resolve_model_source calls snapshot_download.
|
|
22
|
+
"huggingface-hub>=0.23",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://github.com/nitkrar/repoglass"
|
|
27
|
+
Source = "https://github.com/nitkrar/repoglass"
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
repoglass = "repoglass.cli:main"
|
|
31
|
+
rpg = "repoglass.cli:main"
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
config = ["tomlkit>=0.13"]
|
|
35
|
+
# embed_backend="onnx". A real transformer without pulling in torch:
|
|
36
|
+
# onnxruntime is inference-only and has no dependency tree. tokenizers
|
|
37
|
+
# and numpy already arrive with model2vec.
|
|
38
|
+
onnx = ["onnxruntime>=1.17"]
|
|
39
|
+
# embed_providers="webgpu". A plugin provider registered at runtime, so
|
|
40
|
+
# it installs beside onnxruntime rather than replacing it. The device
|
|
41
|
+
# API it needs landed in 1.24.4.
|
|
42
|
+
webgpu = ["onnxruntime>=1.24.4", "onnxruntime-ep-webgpu"]
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.dynamic]
|
|
45
|
+
version = { attr = "repoglass.__version__" }
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.packages.find]
|
|
48
|
+
where = ["src"]
|
|
49
|
+
|
|
50
|
+
[tool.setuptools.package-data]
|
|
51
|
+
repoglass = ["corpus/queries/*.scm", "corpus/queries/NOTICE.md",
|
|
52
|
+
"corpus/queries/manifest.json", "sql/*.sql"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from .config import Paths, Settings
|
|
2
|
+
from .index import Index
|
|
3
|
+
from .models import Chunk, Hit, RefreshReport, SearchMode, Symbol
|
|
4
|
+
|
|
5
|
+
# The only copy. pyproject reads this attribute rather than restating it, so a
|
|
6
|
+
# release cannot ship a number that disagrees with what `rpg --version` prints.
|
|
7
|
+
__version__ = "0.1.0"
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"__version__",
|
|
11
|
+
"Index",
|
|
12
|
+
"Settings",
|
|
13
|
+
"Paths",
|
|
14
|
+
"Symbol",
|
|
15
|
+
"Chunk",
|
|
16
|
+
"Hit",
|
|
17
|
+
"RefreshReport",
|
|
18
|
+
"SearchMode",
|
|
19
|
+
]
|