I have inherited a huge codebase that I need to make some small changes into. I was wondering if there are utilities that would parse python code and give dependencies between functions, as in if I make changes to a function I want to be sure that I dont break other functions, so if I could see in a graph like diagram it would make my life easier.
Creating Dependency Graphs in Python
18.1k Views Asked by anijhaw At
1
There are 1 best solutions below
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in DEPENDENCY-MANAGEMENT
- Gradle dependencies recursively
- Media3 dependencies for build.gradle.kts for Android Studio 2023.2.1 Patch 2
- importing non-master go branch in another go repo
- Why use peer dependencies instead of regular after npm 7?
- Finding all available versions of a NuGet package within a specific version range
- Android Kotlin DSL gradle not finding dependencies in custom repositories
- How to fix CVE-2021-28170 Vulnerability in org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1; cannot find newer library version
- Overriding transitive dependency version in library's pom doesn't override version in pom using the library
- CMake is importing the wrong version of a library, used through a dependency, when it exists in different versions on the system
- Install xesmf with poetry
- IntelliJ, Maven and External Libraries - problems with dependencies
- Maven: error when adding a dependency to a jar which is inside a .tgz file
- Error when npm installing package.json dependencies - ERESOLVE unable to resolve dependency tree
- Sharing dependency version with NPM workspaces in monorepo
- Why am I unable to control the version of a grandchild dependency?
Related Questions in CALL-FLOW
- The name 'MyCall' is not recognized in the current context (3CX, CallFlowDesigner, ASP.NET)
- Amazon Connect not waiting for customer input in Get Customer Input widget
- Call forwarding / Recording / Messaging not working
- Algorithms for repairing ssaa form after modifying the call-flow graph
- How to read Visio Process Flow
- WebAssembly: Reconstructing the stack from scratch
- Schema and call flow in Voltdb
- Twilio Queue management issue / best practice
- How to create call graph for c/c++ code in eclipse?
- RTP SSRC: How to know call direction
- Practical differences between control flow graph and call (flow?) graph?
- Generate a call graph for a java program - Eclipse
- Tool for generating a call flow graph [C C++ solaris linux]
- Creating Dependency Graphs in Python
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What you are looking for is a visualizing call flow.
You can still not guarantee that you will not break functionality :)
My experience and solution:
Many a times, I found the call flow data overwhelming and the diagram too complex. So what i usually do is trace call flow partially for the function, I am interested in.
This is done by utilizing the sys.settrace(...) function. After generating the call flows as textual data, I generate a call graph using graphviz.
[Edit: based on comments]
Then my piecemeal solution works better. Just insert the code and use the decorator on a function that you want to trace. You will see gaps where deferred comes into picture but that can be worked out. You will not get the complete picture directly.
I have been trying to do that and made a few post that works on that understanding.