diff --git a/graphify/detect.py b/graphify/detect.py index 6e9d283a5..bc73fbde7 100644 --- a/graphify/detect.py +++ b/graphify/detect.py @@ -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'} diff --git a/graphify/extract.py b/graphify/extract.py index d5faa5235..0343a5673 100644 --- a/graphify/extract.py +++ b/graphify/extract.py @@ -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, diff --git a/graphify/pg_introspect.py b/graphify/pg_introspect.py index dc7b2bbf8..2a2cca628 100644 --- a/graphify/pg_introspect.py +++ b/graphify/pg_introspect.py @@ -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: diff --git a/tests/test_detect.py b/tests/test_detect.py index 2c9160303..374b2552f 100644 --- a/tests/test_detect.py +++ b/tests/test_detect.py @@ -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 diff --git a/tests/test_pg_introspect.py b/tests/test_pg_introspect.py index 919d7ba40..fb4749b3c 100644 --- a/tests/test_pg_introspect.py +++ b/tests/test_pg_introspect.py @@ -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():