ragrep 0.2.2__tar.gz → 0.2.3__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 (28) hide show
  1. {ragrep-0.2.2/src/ragrep.egg-info → ragrep-0.2.3}/PKG-INFO +1 -1
  2. {ragrep-0.2.2 → ragrep-0.2.3}/pyproject.toml +1 -1
  3. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/__init__.py +1 -1
  4. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/core/document_processor.py +7 -12
  5. {ragrep-0.2.2 → ragrep-0.2.3/src/ragrep.egg-info}/PKG-INFO +1 -1
  6. {ragrep-0.2.2 → ragrep-0.2.3}/tests/test_ragrep.py +24 -0
  7. {ragrep-0.2.2 → ragrep-0.2.3}/LICENSE +0 -0
  8. {ragrep-0.2.2 → ragrep-0.2.3}/MANIFEST.in +0 -0
  9. {ragrep-0.2.2 → ragrep-0.2.3}/README.md +0 -0
  10. {ragrep-0.2.2 → ragrep-0.2.3}/docs/README.md +0 -0
  11. {ragrep-0.2.2 → ragrep-0.2.3}/env.example +0 -0
  12. {ragrep-0.2.2 → ragrep-0.2.3}/examples/basic_usage.py +0 -0
  13. {ragrep-0.2.2 → ragrep-0.2.3}/requirements.txt +0 -0
  14. {ragrep-0.2.2 → ragrep-0.2.3}/setup.cfg +0 -0
  15. {ragrep-0.2.2 → ragrep-0.2.3}/setup.py +0 -0
  16. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/cli.py +0 -0
  17. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/core/__init__.py +0 -0
  18. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/core/rag_system.py +0 -0
  19. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/retrieval/__init__.py +0 -0
  20. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/retrieval/embeddings.py +0 -0
  21. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep/retrieval/vector_store.py +0 -0
  22. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep.egg-info/SOURCES.txt +0 -0
  23. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep.egg-info/dependency_links.txt +0 -0
  24. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep.egg-info/entry_points.txt +0 -0
  25. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep.egg-info/requires.txt +0 -0
  26. {ragrep-0.2.2 → ragrep-0.2.3}/src/ragrep.egg-info/top_level.txt +0 -0
  27. {ragrep-0.2.2 → ragrep-0.2.3}/tests/test_cli.py +0 -0
  28. {ragrep-0.2.2 → ragrep-0.2.3}/tests/test_embeddings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragrep
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Local semantic code recall with mxbai embeddings and SQLite
5
5
  Author-email: RAGrep Team <ragrep@example.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ragrep"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Local semantic code recall with mxbai embeddings and SQLite"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "0.2.2"
5
+ __version__ = "0.2.3"
6
6
  __author__ = "RAGrep Team"
7
7
 
8
8
 
@@ -202,18 +202,13 @@ class DocumentProcessor:
202
202
  def _load_ignore_patterns(root: Path) -> List[str]:
203
203
  patterns = set(_DEFAULT_IGNORE_PATTERNS)
204
204
 
205
- current = root
206
- while True:
207
- gitignore = current / ".gitignore"
208
- if gitignore.exists():
209
- for line in gitignore.read_text(encoding="utf-8", errors="ignore").splitlines():
210
- stripped = line.strip()
211
- if not stripped or stripped.startswith("#"):
212
- continue
213
- patterns.add(stripped)
214
- if current.parent == current:
215
- break
216
- current = current.parent
205
+ gitignore = root / ".gitignore"
206
+ if gitignore.exists():
207
+ for line in gitignore.read_text(encoding="utf-8", errors="ignore").splitlines():
208
+ stripped = line.strip()
209
+ if not stripped or stripped.startswith("#"):
210
+ continue
211
+ patterns.add(stripped)
217
212
 
218
213
  return sorted(patterns)
219
214
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragrep
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Local semantic code recall with mxbai embeddings and SQLite
5
5
  Author-email: RAGrep Team <ragrep@example.com>
6
6
  License-Expression: MIT
@@ -205,6 +205,30 @@ class RAGrepTests(unittest.TestCase):
205
205
  finally:
206
206
  rag.close()
207
207
 
208
+ def test_index_subdirectory_does_not_inherit_parent_gitignore(self):
209
+ (self.root / ".gitignore").write_text("*\n", encoding="utf-8")
210
+ docs_root = self.root / "docs"
211
+ docs_root.mkdir(parents=True, exist_ok=True)
212
+ (docs_root / "storage-schema.md").write_text(
213
+ "# Storage Schema\n\nUser table and field definitions.\n",
214
+ encoding="utf-8",
215
+ )
216
+
217
+ rag = RAGrep(db_path=str(self.db_path), embedder=FakeEmbedder())
218
+ try:
219
+ index_result = rag.index(str(docs_root))
220
+ self.assertTrue(index_result["indexed"])
221
+ self.assertEqual(index_result["files"], 1)
222
+
223
+ recall_result = rag.recall("schema user", limit=5, auto_index=False)
224
+ self.assertEqual(recall_result["count"], 1)
225
+ self.assertEqual(
226
+ recall_result["matches"][0]["metadata"]["source"],
227
+ "storage-schema.md",
228
+ )
229
+ finally:
230
+ rag.close()
231
+
208
232
  def test_stats(self):
209
233
  rag = RAGrep(db_path=str(self.db_path), embedder=FakeEmbedder())
210
234
  try:
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