dirsql-plugin-embeddings 0.1.2__tar.gz → 0.1.4__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 (19) hide show
  1. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/PKG-INFO +2 -1
  2. dirsql_plugin_embeddings-0.1.2/e2e-attestations/claude-on-file-integration-e2e-lpeicb.json → dirsql_plugin_embeddings-0.1.4/e2e-attestations/claude-699-read-pdf.json +3 -3
  3. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/pyproject.toml +3 -0
  4. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/on_file/on_file.py +2 -2
  5. dirsql_plugin_embeddings-0.1.4/src/dirsql_plugin_embeddings/on_file/read_content.py +13 -0
  6. dirsql_plugin_embeddings-0.1.4/src/dirsql_plugin_embeddings/on_file/read_pdf.py +16 -0
  7. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/.gitignore +0 -0
  8. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/README.md +0 -0
  9. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/__init__.py +0 -0
  10. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/dirsql.toml +0 -0
  11. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/embedder.py +0 -0
  12. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/on_file/__init__.py +0 -0
  13. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/on_file/build_rows.py +0 -0
  14. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/on_file/read_text.py +0 -0
  15. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/src/dirsql_plugin_embeddings/pre_query.py +0 -0
  16. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/testing-conventions.toml +0 -0
  17. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/tests/conftest.py +0 -0
  18. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/tests/e2e/__init__.py +0 -0
  19. {dirsql_plugin_embeddings-0.1.2 → dirsql_plugin_embeddings-0.1.4}/tests/integration/__init__.py +0 -0
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dirsql-plugin-embeddings
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: First-party dirsql plugin: semantic search via an OpenAI-compatible embeddings endpoint.
5
5
  Requires-Python: >=3.11
6
+ Requires-Dist: pypdf>=6
6
7
  Description-Content-Type: text/markdown
7
8
 
8
9
  # dirsql-plugin-embeddings
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "command": "uv run --with sqlite-vec --with-editable . --with-editable ../../packages/python python -m pytest tests/e2e -x -q",
3
- "ran_at": 1785323892,
3
+ "ran_at": 1785327111,
4
4
  "exit_code": 0,
5
- "commit": "35c1c6929c4a8b517032cc51e0cc6720f43b58f4",
6
- "branch": "claude/on-file-integration-e2e-lpeicb"
5
+ "commit": "b59ad4bf5dce929e2172cde15888918de9d277fd",
6
+ "branch": "claude/699-read-pdf"
7
7
  }
@@ -12,6 +12,9 @@ dynamic = ["version"]
12
12
  description = "First-party dirsql plugin: semantic search via an OpenAI-compatible embeddings endpoint."
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.11"
15
+ # pypdf, not pymupdf: pymupdf is AGPL-3.0, and a runtime dependency of this
16
+ # MIT-licensed package propagates to everyone who installs it.
17
+ dependencies = ["pypdf>=6"]
15
18
 
16
19
  [tool.hatch.version]
17
20
  source = "vcs"
@@ -13,13 +13,13 @@ import sys
13
13
 
14
14
  from ..embedder import embed
15
15
  from .build_rows import build_rows
16
- from .read_text import read_text
16
+ from .read_content import read_content
17
17
 
18
18
 
19
19
  def on_file(argv: list[str] | None = None) -> int:
20
20
  if argv is None:
21
21
  argv = sys.argv
22
22
  path = argv[1]
23
- text = read_text(path)
23
+ text = read_content(path)
24
24
  print(json.dumps(build_rows(path, text, embed(text))))
25
25
  return 0
@@ -0,0 +1,13 @@
1
+ """The entry point's single read seam: everything the hook reads comes through
2
+ here, so per-format handling has one place to land without touching `on_file`.
3
+
4
+ Annotations are evaluated at runtime (no ``from __future__ import
5
+ annotations``) so a mutated ``X | None`` union in a signature fails at import
6
+ rather than surviving as an inert string.
7
+ """
8
+
9
+ from .read_text import read_text
10
+
11
+
12
+ def read_content(path: str) -> str:
13
+ return read_text(path)
@@ -0,0 +1,16 @@
1
+ """Extract a PDF's text.
2
+
3
+ pypdf rather than pymupdf: pymupdf is AGPL-3.0, and a runtime dependency of
4
+ this MIT-licensed package propagates to everyone who installs it.
5
+
6
+ Annotations are evaluated at runtime (no ``from __future__ import
7
+ annotations``) so a mutated ``X | None`` union in a signature fails at import
8
+ rather than surviving as an inert string.
9
+ """
10
+
11
+ from pypdf import PdfReader
12
+
13
+
14
+ def read_pdf(path: str) -> str:
15
+ reader = PdfReader(path)
16
+ return "\n".join(page.extract_text() for page in reader.pages)