You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
collect_files() in extract.py ignores .graphifyignore #188
collect_files() in extract.py does not filter files through .graphifyignore. This means _rebuild_code() in watch.py (which calls collect_files()) scans all files regardless of ignore patterns.
Meanwhile, detect() in detect.py correctly loads and applies .graphifyignore via _load_graphifyignore() + _is_ignored().
Impact
On a project with node_modules/ in .graphifyignore, collect_files() returns 40,272 files instead of 210. The resulting Louvain clustering takes ~17 minutes and produces a polluted graph.
Steps to Reproduce
Create a project with a node_modules/ directory and a .graphifyignore containing node_modules/
Run _rebuild_code(Path('.')) from graphify.watch
Observe that collect_files() returns files from node_modules/
Expected Behavior
collect_files() should respect .graphifyignore the same way detect() does.
Suggested Fix
Have collect_files() accept an optional root parameter and call _load_graphifyignore(root) + _is_ignored() to filter results, similar to how detect() does it in detect.py lines 306-333.
Workaround
Monkey-patching collect_files before calling _rebuild_code:
Fixed in v4 (commit 271ee0a). collect_files() now loads .graphifyignore via _load_graphifyignore and filters through _is_ignored the same way detect() does. An optional root parameter lets callers specify where to look for the ignore file. Thanks for the detailed report and the workaround.
Activity
safishamsi commentedon Apr 10, 2026
Fixed in v4 (commit 271ee0a).
collect_files()now loads.graphifyignorevia_load_graphifyignoreand filters through_is_ignoredthe same waydetect()does. An optionalrootparameter lets callers specify where to look for the ignore file. Thanks for the detailed report and the workaround.Fix Graphify-Labs#188: collect_files() now respects .graphifyignore; fix
Fix #188: collect_files() now respects .graphifyignore; fix #195: ski…
Fix Graphify-Labs#188: collect_files() now respects .graphifyignore; fix