fix: correct postgres install hint to graphifyy (#1906); classify .skill files as documents (#1901)

- pg_introspect: the psycopg-missing ImportError suggested pip install
  'graphify[postgres]', but the PyPI package is graphifyy (double-y)
- detect: add .skill (Markdown with YAML frontmatter agent files) to
  DOC_EXTENSIONS so they are no longer dropped as unclassified
- extract: route .skill through extract_markdown for the structural
  quick-scan

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
safishamsi
2026-07-15 00:41:36 +01:00
co-authored by Claude Opus 4.8
parent 75b7279d92
commit ef8771e8c1
5 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class FileType(str, Enum):
_MANIFEST_PATH = str(out_path("manifest.json"))
CODE_EXTENSIONS = {'.py', '.ts', '.tsx', '.mts', '.cts', '.js', '.jsx', '.mjs', '.ejs', '.ets', '.go', '.rs', '.java', '.groovy', '.gradle', '.cpp', '.cc', '.cxx', '.c', '.h', '.hpp', '.cu', '.cuh', '.metal', '.rb', '.rake', '.swift', '.kt', '.kts', '.cs', '.scala', '.php', '.lua', '.luau', '.toc', '.zig', '.ps1', '.psm1', '.psd1', '.ex', '.exs', '.m', '.mm', '.jl', '.vue', '.svelte', '.astro', '.dart', '.v', '.sv', '.svh', '.sql', '.r', '.f', '.F', '.f90', '.F90', '.f95', '.F95', '.f03', '.F03', '.f08', '.F08', '.pas', '.pp', '.dpr', '.dpk', '.lpr', '.inc', '.dfm', '.lfm', '.lpk', '.sh', '.bash', '.json', '.tf', '.tfvars', '.hcl', '.dm', '.dme', '.dmi', '.dmm', '.dmf', '.sln', '.slnx', '.csproj', '.fsproj', '.vbproj', '.xaml', '.razor', '.cshtml', '.cls', '.trigger'}
DOC_EXTENSIONS = {'.md', '.mdx', '.qmd', '.txt', '.rst', '.html', '.yaml', '.yml'}
DOC_EXTENSIONS = {'.md', '.mdx', '.qmd', '.skill', '.txt', '.rst', '.html', '.yaml', '.yml'}
PAPER_EXTENSIONS = {'.pdf'}
IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg'}
OFFICE_EXTENSIONS = {'.docx', '.xlsx'}
+1
View File
@@ -3896,6 +3896,7 @@ _DISPATCH: dict[str, Any] = {
".md": extract_markdown,
".mdx": extract_markdown,
".qmd": extract_markdown,
".skill": extract_markdown,
".pas": extract_pascal,
".pp": extract_pascal,
".dpr": extract_pascal,
+1 -1
View File
@@ -15,7 +15,7 @@ def introspect_postgres(dsn: str | None = None) -> dict:
except ModuleNotFoundError:
raise ImportError(
"psycopg is required for --postgres. "
"Install with: pip install 'graphify[postgres]'"
"Install with: pip install 'graphifyy[postgres]'"
)
try:
+4
View File
@@ -23,6 +23,10 @@ def test_classify_powershell_manifest():
def test_classify_markdown():
assert classify_file(Path("README.md")) == FileType.DOCUMENT
def test_classify_skill():
# #1901: .skill agent files (Markdown with YAML frontmatter) were dropped as unclassified.
assert classify_file(Path("10_Orchestrator.skill")) == FileType.DOCUMENT
def test_classify_pdf():
assert classify_file(Path("paper.pdf")) == FileType.PAPER
+3 -1
View File
@@ -313,8 +313,10 @@ def test_pg_introspect_connection_error():
def test_pg_introspect_import_error():
"""If psycopg is missing, introspect_postgres raises ImportError."""
with patch.dict("sys.modules", {"psycopg": None}):
with pytest.raises(ImportError, match="psycopg is required"):
with pytest.raises(ImportError, match="psycopg is required") as exc_info:
introspect_postgres("postgresql://localhost/db")
# #1906: the PyPI package is graphifyy (double-y), so the install hint must match
assert "graphifyy[postgres]" in str(exc_info.value)
def test_pg_introspect_uri_forward_slashes():