Skip to main content

Crate mollify_graph

Crate mollify_graph 

Source
Expand description

§mollify-graph

Discovers Python modules, assigns path-sorted stable FileIds (ADR-004 analog), builds the internal import graph, computes reachability from entry points, and answers symbol-usage queries. Pure structure — the mollify-core crate turns these into mollify_parse-backed findings.

Structs§

FileId
Stable, path-sorted module identifier.
ModuleGraph
The whole project graph.
ModuleInfo
One module node in the graph.
UnresolvedImport
An import that looks first-party/relative but resolves to no module.

Functions§

discover_python_files
Walk root for *.py and *.ipynb files, honoring .gitignore and pruning [DEFAULT_EXCLUDE_DIRS] (plus any virtualenv detected via pyvenv.cfg). Deterministic order.
discover_python_files_excluding
Like discover_python_files, but also prunes extra_excludes directory names (in addition to the builtin denylist) — used to honor a project’s .mollifyrc.json exclude_dirs.
read_source
Read a module’s source. For .ipynb, extract and concatenate code cells into one Python source (line numbers are relative to that concatenation — a documented v1 simplification). Jupyter magics/shell-escapes are skipped.