Hi everyone!
I recently put together a lightweight open-source tool for visualizing dependencies among Fortran modules. I built it because I wanted a simple way to inspect relationships and graphs in larger mixed-language CMake-driven projects, where fpm-based graph generation is not always applicable.
Repo at GitHub: FortGraph
The project has two parts:
- a Python parser that scans Fortran source files (single files or recursively through a tree) and produces a JSON representation of the dependency graph
- a standalone HTML app that loads that JSON for interactive visualization, and also supports lightweight in-browser graph building/parsing from pasted
USEstatements
I kept the parser and viewer separate so the visualization layer can be reused with other datasets as well.
The parser is intentionally lightweight, so I expect it to miss edge cases and more complex constructs. Still, it has already been useful for my own project and workflow, and Iām sharing it in case it helps others.
Suggestions and contributions are very welcome!