I'm digging into a huge legacy Python class that has a lot of methods. I eventually break complex ones into smaller pieces so the amount of methods increases even more. I wonder if there is a tool that can scan the Python code and build some kind of dependency diagram for its methods.
I define method x()
to be a dependency of method y()
if x()
is called at least once in y()
.
I could use such a tool to isolate (if possible) subsets of class methods that have no external dependencies (all their dependencies are methods from the same subset).
I'm planning to move some functionality into other classes and I think that such an approach would help me to decide which parts to extract from the initial huge class.
Edit: I would really like a command-line tool.
To install Python dependencies for a private IP environment inside a perimeter, you can: Use a private PyPI repository hosted in your VPC network. Use a proxy server VM in your VPC network to connect to a PyPI repository on the public internet. Specify the proxy address in the /config/pip/pip.
1. Graph representing the system modules as nodes and the module-level relationships as edges between these nodes. Learn more in: Software Module Clustering Using Bio-Inspired Algorithms. Find more terms and definitions using our Dictionary Search.
Dependency diagrams for . NET Core projects are supported starting Visual Studio 2019 version 16.2. On the Architecture menu, choose New Dependency Diagram. Under Templates, choose dependency diagram.
Have you looked at Snakefood yet? It looks like it's exactly what you're looking for.
Have you tried pydev? It's a python extension for eclipse. I believe it allows you to use the "call hierarchy" feature of Eclipse to view a call graph for a given method. It's not quite what you want but maybe it's enough to get started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With