grover 0.0.1__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.
- grover-0.0.1/.github/workflows/deploy-docs.yml +44 -0
- grover-0.0.1/.github/workflows/publish.yml +38 -0
- grover-0.0.1/.github/workflows/test.yml +36 -0
- grover-0.0.1/.gitignore +220 -0
- grover-0.0.1/.python-version +1 -0
- grover-0.0.1/CONTRIBUTING.md +148 -0
- grover-0.0.1/LICENSE +190 -0
- grover-0.0.1/PKG-INFO +255 -0
- grover-0.0.1/README.md +208 -0
- grover-0.0.1/docs/api.md +504 -0
- grover-0.0.1/docs/architecture.md +179 -0
- grover-0.0.1/docs/contributing.md +148 -0
- grover-0.0.1/docs/fs_architecture.md +463 -0
- grover-0.0.1/docs/index.md +216 -0
- grover-0.0.1/docs/internals/fs.md +370 -0
- grover-0.0.1/grover_implementation_plan.md +965 -0
- grover-0.0.1/grover_market_research.md +192 -0
- grover-0.0.1/grover_proposal.md +416 -0
- grover-0.0.1/mkdocs.yml +73 -0
- grover-0.0.1/pyproject.toml +139 -0
- grover-0.0.1/scripts/bump_version.py +59 -0
- grover-0.0.1/scripts/store_repo.py +413 -0
- grover-0.0.1/src/grover/__init__.py +11 -0
- grover-0.0.1/src/grover/_grover.py +285 -0
- grover-0.0.1/src/grover/_grover_async.py +675 -0
- grover-0.0.1/src/grover/events.py +88 -0
- grover-0.0.1/src/grover/fs/__init__.py +76 -0
- grover-0.0.1/src/grover/fs/database_fs.py +756 -0
- grover-0.0.1/src/grover/fs/dialect.py +166 -0
- grover-0.0.1/src/grover/fs/diff.py +121 -0
- grover-0.0.1/src/grover/fs/directories.py +130 -0
- grover-0.0.1/src/grover/fs/exceptions.py +25 -0
- grover-0.0.1/src/grover/fs/local_fs.py +1256 -0
- grover-0.0.1/src/grover/fs/metadata.py +131 -0
- grover-0.0.1/src/grover/fs/mounts.py +137 -0
- grover-0.0.1/src/grover/fs/operations.py +551 -0
- grover-0.0.1/src/grover/fs/permissions.py +12 -0
- grover-0.0.1/src/grover/fs/protocol.py +249 -0
- grover-0.0.1/src/grover/fs/trash.py +166 -0
- grover-0.0.1/src/grover/fs/types.py +189 -0
- grover-0.0.1/src/grover/fs/utils.py +927 -0
- grover-0.0.1/src/grover/fs/versioning.py +152 -0
- grover-0.0.1/src/grover/fs/vfs.py +784 -0
- grover-0.0.1/src/grover/graph/__init__.py +5 -0
- grover-0.0.1/src/grover/graph/_graph.py +385 -0
- grover-0.0.1/src/grover/graph/analyzers/__init__.py +94 -0
- grover-0.0.1/src/grover/graph/analyzers/_base.py +77 -0
- grover-0.0.1/src/grover/graph/analyzers/go.py +243 -0
- grover-0.0.1/src/grover/graph/analyzers/javascript.py +294 -0
- grover-0.0.1/src/grover/graph/analyzers/python.py +220 -0
- grover-0.0.1/src/grover/models/__init__.py +19 -0
- grover-0.0.1/src/grover/models/edges.py +26 -0
- grover-0.0.1/src/grover/models/embeddings.py +25 -0
- grover-0.0.1/src/grover/models/files.py +75 -0
- grover-0.0.1/src/grover/py.typed +0 -0
- grover-0.0.1/src/grover/ref.py +44 -0
- grover-0.0.1/src/grover/search/__init__.py +19 -0
- grover-0.0.1/src/grover/search/_index.py +242 -0
- grover-0.0.1/src/grover/search/extractors.py +50 -0
- grover-0.0.1/src/grover/search/providers/__init__.py +9 -0
- grover-0.0.1/src/grover/search/providers/_protocol.py +32 -0
- grover-0.0.1/src/grover/search/providers/sentence_transformers.py +62 -0
- grover-0.0.1/tests/__init__.py +0 -0
- grover-0.0.1/tests/conftest.py +54 -0
- grover-0.0.1/tests/fs/__init__.py +0 -0
- grover-0.0.1/tests/graph/__init__.py +0 -0
- grover-0.0.1/tests/search/__init__.py +0 -0
- grover-0.0.1/tests/test_analyzers.py +874 -0
- grover-0.0.1/tests/test_base_fs.py +916 -0
- grover-0.0.1/tests/test_capabilities.py +549 -0
- grover-0.0.1/tests/test_configurable_model.py +371 -0
- grover-0.0.1/tests/test_database_fs.py +175 -0
- grover-0.0.1/tests/test_dialect.py +417 -0
- grover-0.0.1/tests/test_diff.py +99 -0
- grover-0.0.1/tests/test_events.py +433 -0
- grover-0.0.1/tests/test_fs_types.py +183 -0
- grover-0.0.1/tests/test_fs_utils.py +400 -0
- grover-0.0.1/tests/test_graph.py +728 -0
- grover-0.0.1/tests/test_grover.py +391 -0
- grover-0.0.1/tests/test_grover_async.py +575 -0
- grover-0.0.1/tests/test_local_fs.py +451 -0
- grover-0.0.1/tests/test_models.py +361 -0
- grover-0.0.1/tests/test_mounts.py +173 -0
- grover-0.0.1/tests/test_public_api_contracts.py +282 -0
- grover-0.0.1/tests/test_ref.py +181 -0
- grover-0.0.1/tests/test_search.py +529 -0
- grover-0.0.1/tests/test_search_ops.py +781 -0
- grover-0.0.1/tests/test_vfs.py +383 -0
- grover-0.0.1/uv.lock +2822 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- uses: astral-sh/setup-uv@v5
|
|
24
|
+
|
|
25
|
+
- name: Install docs dependencies
|
|
26
|
+
run: uv pip install --system mkdocs-material
|
|
27
|
+
|
|
28
|
+
- name: Build docs
|
|
29
|
+
run: mkdocs build
|
|
30
|
+
|
|
31
|
+
- uses: actions/upload-pages-artifact@v3
|
|
32
|
+
with:
|
|
33
|
+
path: site/
|
|
34
|
+
|
|
35
|
+
deploy:
|
|
36
|
+
needs: build
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
environment:
|
|
39
|
+
name: github-pages
|
|
40
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
41
|
+
steps:
|
|
42
|
+
- name: Deploy to GitHub Pages
|
|
43
|
+
id: deployment
|
|
44
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
|
|
15
|
+
- name: Build package
|
|
16
|
+
run: uv build
|
|
17
|
+
|
|
18
|
+
- uses: actions/upload-artifact@v4
|
|
19
|
+
with:
|
|
20
|
+
name: dist
|
|
21
|
+
path: dist/
|
|
22
|
+
|
|
23
|
+
publish:
|
|
24
|
+
needs: build
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
environment: pypi
|
|
27
|
+
permissions:
|
|
28
|
+
id-token: write
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/download-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: dist
|
|
33
|
+
path: dist/
|
|
34
|
+
|
|
35
|
+
- uses: astral-sh/setup-uv@v5
|
|
36
|
+
|
|
37
|
+
- name: Publish to PyPI
|
|
38
|
+
run: uv publish --trusted-publishing always
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: astral-sh/setup-uv@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: uv pip install -e ".[all]" --group dev
|
|
24
|
+
|
|
25
|
+
- name: Lint
|
|
26
|
+
run: uvx ruff check src/ tests/
|
|
27
|
+
|
|
28
|
+
- name: Format check
|
|
29
|
+
run: uvx ruff format --check src/ tests/
|
|
30
|
+
|
|
31
|
+
- name: Type check
|
|
32
|
+
if: matrix.python-version == '3.13'
|
|
33
|
+
run: uvx ty check src/
|
|
34
|
+
|
|
35
|
+
- name: Tests
|
|
36
|
+
run: uv run pytest --tb=short
|
grover-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Claude Code
|
|
2
|
+
.claude/
|
|
3
|
+
CLAUDE.md
|
|
4
|
+
|
|
5
|
+
# JetBrains
|
|
6
|
+
.idea/
|
|
7
|
+
|
|
8
|
+
# Byte-compiled / optimized / DLL files
|
|
9
|
+
__pycache__/
|
|
10
|
+
*.py[codz]
|
|
11
|
+
*$py.class
|
|
12
|
+
|
|
13
|
+
# C extensions
|
|
14
|
+
*.so
|
|
15
|
+
|
|
16
|
+
# Distribution / packaging
|
|
17
|
+
.Python
|
|
18
|
+
build/
|
|
19
|
+
develop-eggs/
|
|
20
|
+
dist/
|
|
21
|
+
downloads/
|
|
22
|
+
eggs/
|
|
23
|
+
.eggs/
|
|
24
|
+
lib/
|
|
25
|
+
lib64/
|
|
26
|
+
parts/
|
|
27
|
+
sdist/
|
|
28
|
+
var/
|
|
29
|
+
wheels/
|
|
30
|
+
share/python-wheels/
|
|
31
|
+
*.egg-info/
|
|
32
|
+
.installed.cfg
|
|
33
|
+
*.egg
|
|
34
|
+
MANIFEST
|
|
35
|
+
|
|
36
|
+
# PyInstaller
|
|
37
|
+
# Usually these files are written by a python script from a template
|
|
38
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
39
|
+
*.manifest
|
|
40
|
+
*.spec
|
|
41
|
+
|
|
42
|
+
# Installer logs
|
|
43
|
+
pip-log.txt
|
|
44
|
+
pip-delete-this-directory.txt
|
|
45
|
+
|
|
46
|
+
# Unit test / coverage reports
|
|
47
|
+
htmlcov/
|
|
48
|
+
.tox/
|
|
49
|
+
.nox/
|
|
50
|
+
.coverage
|
|
51
|
+
.coverage.*
|
|
52
|
+
.cache
|
|
53
|
+
nosetests.xml
|
|
54
|
+
coverage.xml
|
|
55
|
+
*.cover
|
|
56
|
+
*.py.cover
|
|
57
|
+
.hypothesis/
|
|
58
|
+
.pytest_cache/
|
|
59
|
+
cover/
|
|
60
|
+
|
|
61
|
+
# Translations
|
|
62
|
+
*.mo
|
|
63
|
+
*.pot
|
|
64
|
+
|
|
65
|
+
# Django stuff:
|
|
66
|
+
*.log
|
|
67
|
+
local_settings.py
|
|
68
|
+
db.sqlite3
|
|
69
|
+
db.sqlite3-journal
|
|
70
|
+
|
|
71
|
+
# Flask stuff:
|
|
72
|
+
instance/
|
|
73
|
+
.webassets-cache
|
|
74
|
+
|
|
75
|
+
# Scrapy stuff:
|
|
76
|
+
.scrapy
|
|
77
|
+
|
|
78
|
+
# Sphinx documentation
|
|
79
|
+
docs/_build/
|
|
80
|
+
|
|
81
|
+
# PyBuilder
|
|
82
|
+
.pybuilder/
|
|
83
|
+
target/
|
|
84
|
+
|
|
85
|
+
# Jupyter Notebook
|
|
86
|
+
.ipynb_checkpoints
|
|
87
|
+
|
|
88
|
+
# IPython
|
|
89
|
+
profile_default/
|
|
90
|
+
ipython_config.py
|
|
91
|
+
|
|
92
|
+
# pyenv
|
|
93
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
94
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
95
|
+
# .python-version
|
|
96
|
+
|
|
97
|
+
# pipenv
|
|
98
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
99
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
100
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
101
|
+
# install all needed dependencies.
|
|
102
|
+
#Pipfile.lock
|
|
103
|
+
|
|
104
|
+
# UV
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
#uv.lock
|
|
109
|
+
|
|
110
|
+
# poetry
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
112
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
113
|
+
# commonly ignored for libraries.
|
|
114
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
115
|
+
#poetry.lock
|
|
116
|
+
#poetry.toml
|
|
117
|
+
|
|
118
|
+
# pdm
|
|
119
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
120
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
121
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
122
|
+
#pdm.lock
|
|
123
|
+
#pdm.toml
|
|
124
|
+
.pdm-python
|
|
125
|
+
.pdm-build/
|
|
126
|
+
|
|
127
|
+
# pixi
|
|
128
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
129
|
+
#pixi.lock
|
|
130
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
131
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
132
|
+
.pixi
|
|
133
|
+
|
|
134
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
135
|
+
__pypackages__/
|
|
136
|
+
|
|
137
|
+
# Celery stuff
|
|
138
|
+
celerybeat-schedule
|
|
139
|
+
celerybeat.pid
|
|
140
|
+
|
|
141
|
+
# SageMath parsed files
|
|
142
|
+
*.sage.py
|
|
143
|
+
|
|
144
|
+
# Environments
|
|
145
|
+
.env
|
|
146
|
+
.envrc
|
|
147
|
+
.venv
|
|
148
|
+
env/
|
|
149
|
+
venv/
|
|
150
|
+
ENV/
|
|
151
|
+
env.bak/
|
|
152
|
+
venv.bak/
|
|
153
|
+
|
|
154
|
+
# Spyder project settings
|
|
155
|
+
.spyderproject
|
|
156
|
+
.spyproject
|
|
157
|
+
|
|
158
|
+
# Rope project settings
|
|
159
|
+
.ropeproject
|
|
160
|
+
|
|
161
|
+
# mkdocs documentation
|
|
162
|
+
/site
|
|
163
|
+
|
|
164
|
+
# mypy
|
|
165
|
+
.mypy_cache/
|
|
166
|
+
.dmypy.json
|
|
167
|
+
dmypy.json
|
|
168
|
+
|
|
169
|
+
# Pyre type checker
|
|
170
|
+
.pyre/
|
|
171
|
+
|
|
172
|
+
# pytype static type analyzer
|
|
173
|
+
.pytype/
|
|
174
|
+
|
|
175
|
+
# Cython debug symbols
|
|
176
|
+
cython_debug/
|
|
177
|
+
|
|
178
|
+
# PyCharm
|
|
179
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
180
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
181
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
182
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
183
|
+
#.idea/
|
|
184
|
+
|
|
185
|
+
# Abstra
|
|
186
|
+
# Abstra is an AI-powered process automation framework.
|
|
187
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
188
|
+
# Learn more at https://abstra.io/docs
|
|
189
|
+
.abstra/
|
|
190
|
+
|
|
191
|
+
# Visual Studio Code
|
|
192
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
193
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
194
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
195
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
196
|
+
# .vscode/
|
|
197
|
+
|
|
198
|
+
# Ruff stuff:
|
|
199
|
+
.ruff_cache/
|
|
200
|
+
|
|
201
|
+
# PyPI configuration file
|
|
202
|
+
.pypirc
|
|
203
|
+
|
|
204
|
+
# Cursor
|
|
205
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
206
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
207
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
208
|
+
.cursorignore
|
|
209
|
+
.cursorindexingignore
|
|
210
|
+
|
|
211
|
+
# Marimo
|
|
212
|
+
marimo/_static/
|
|
213
|
+
marimo/_lsp/
|
|
214
|
+
__marimo__/
|
|
215
|
+
|
|
216
|
+
# Test fixture repos (cloned for integration tests)
|
|
217
|
+
tests/fixtures/repos/
|
|
218
|
+
|
|
219
|
+
# Test Notebooks
|
|
220
|
+
*test.ipynb
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Contributing to Grover
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing to Grover! This guide covers how to set up your development environment, run the test suite, and submit changes.
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- **Python 3.11+** (3.13 recommended)
|
|
10
|
+
- **[uv](https://docs.astral.sh/uv/)** for package management
|
|
11
|
+
|
|
12
|
+
### Setup
|
|
13
|
+
|
|
14
|
+
Clone the repo and install in editable mode with dev dependencies:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git clone https://github.com/ClayGendron/grover.git
|
|
18
|
+
cd grover
|
|
19
|
+
uv venv
|
|
20
|
+
uv pip install -e ".[all]"
|
|
21
|
+
uv pip install --group dev
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This installs Grover with all optional extras (search, tree-sitter, PostgreSQL) plus the development tools (pytest, pre-commit, etc.).
|
|
25
|
+
|
|
26
|
+
### Verify your setup
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
uvx ruff check src/
|
|
30
|
+
uvx ty check src/
|
|
31
|
+
uv run pytest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
All three should pass cleanly.
|
|
35
|
+
|
|
36
|
+
## Development workflow
|
|
37
|
+
|
|
38
|
+
### Making changes
|
|
39
|
+
|
|
40
|
+
1. Create a branch from `main`.
|
|
41
|
+
2. Make your changes.
|
|
42
|
+
3. Run the quality checks (see below).
|
|
43
|
+
4. Open a pull request against `main`.
|
|
44
|
+
|
|
45
|
+
Issues are encouraged for larger changes or design discussions, but not required for straightforward fixes or additions. If you're unsure whether something warrants an issue, go ahead and open a PR — we can discuss there.
|
|
46
|
+
|
|
47
|
+
### Quality checks
|
|
48
|
+
|
|
49
|
+
Every PR should pass all three checks:
|
|
50
|
+
|
|
51
|
+
**Linting** (ruff):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
uvx ruff check src/ tests/
|
|
55
|
+
uvx ruff format --check src/ tests/
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
To auto-fix lint issues and formatting:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
uvx ruff check --fix src/ tests/
|
|
62
|
+
uvx ruff format src/ tests/
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Type checking** (ty):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
uvx ty check src/
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Tests** (pytest):
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
uv run pytest
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
To run with coverage:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
uv run pytest --cov
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Writing tests
|
|
84
|
+
|
|
85
|
+
Tests live in `tests/` and use pytest with `pytest-asyncio` (async mode is set to `auto`). A few conventions:
|
|
86
|
+
|
|
87
|
+
- Test files mirror the source structure: `src/grover/fs/vfs.py` is tested in `tests/test_vfs.py`.
|
|
88
|
+
- Shared fixtures are in `tests/conftest.py` (in-memory SQLite engines, async sessions, etc.).
|
|
89
|
+
- Use the `@pytest.mark.slow` and `@pytest.mark.integration` markers when appropriate.
|
|
90
|
+
- Prefer in-memory SQLite and fake backends for unit tests; use temp directories for LocalFileSystem tests.
|
|
91
|
+
|
|
92
|
+
### Commit messages
|
|
93
|
+
|
|
94
|
+
Keep commit messages concise and descriptive. Focus on the *why*, not the *what*:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Fix version reconstruction when snapshot is at boundary
|
|
98
|
+
|
|
99
|
+
The snapshot interval check was off-by-one, causing reconstruction
|
|
100
|
+
to miss the boundary snapshot and fall back to a stale one.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Project structure
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
src/grover/
|
|
107
|
+
├── _grover.py # Sync wrapper (Grover)
|
|
108
|
+
├── _grover_async.py # Async core (GroverAsync)
|
|
109
|
+
├── ref.py # Ref frozen dataclass
|
|
110
|
+
├── events.py # EventBus and event types
|
|
111
|
+
├── fs/ # Filesystem layer
|
|
112
|
+
│ ├── vfs.py # Mount router
|
|
113
|
+
│ ├── local_fs.py # Disk + SQLite backend
|
|
114
|
+
│ ├── database_fs.py # Pure-database backend
|
|
115
|
+
│ ├── protocol.py # StorageBackend + capability protocols
|
|
116
|
+
│ ├── operations.py # Shared orchestration functions
|
|
117
|
+
│ └── ...
|
|
118
|
+
├── graph/ # Knowledge graph
|
|
119
|
+
│ ├── _graph.py # rustworkx wrapper
|
|
120
|
+
│ └── analyzers/ # Language-specific code analyzers
|
|
121
|
+
├── search/ # Vector search
|
|
122
|
+
│ ├── _index.py # usearch HNSW wrapper
|
|
123
|
+
│ └── providers/ # Embedding providers
|
|
124
|
+
└── models/ # SQLModel database models
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For a deeper dive into patterns and design principles, see [docs/architecture.md](docs/architecture.md).
|
|
128
|
+
|
|
129
|
+
## Tooling reference
|
|
130
|
+
|
|
131
|
+
| Tool | Purpose | Command |
|
|
132
|
+
|------|---------|---------|
|
|
133
|
+
| **ruff** | Linting and formatting | `uvx ruff check src/` / `uvx ruff format src/` |
|
|
134
|
+
| **ty** | Type checking | `uvx ty check src/` |
|
|
135
|
+
| **pytest** | Test runner | `uv run pytest` |
|
|
136
|
+
| **uv** | Package management | `uv pip install ...` |
|
|
137
|
+
|
|
138
|
+
Note: ruff and ty are invoked via `uvx` (not installed as pip packages). Tests and package commands use `uv run` to ensure the correct virtualenv.
|
|
139
|
+
|
|
140
|
+
## Code of Conduct
|
|
141
|
+
|
|
142
|
+
This project follows the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). By participating, you agree to uphold a welcoming, inclusive, and respectful environment for everyone.
|
|
143
|
+
|
|
144
|
+
In short: be kind, be constructive, and assume good intent. If you experience or witness unacceptable behavior, please reach out to the maintainers.
|
|
145
|
+
|
|
146
|
+
## Questions?
|
|
147
|
+
|
|
148
|
+
If you're not sure about something, open an issue or start a discussion. We're happy to help.
|
grover-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Clay Gendron
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|