Skip to content

Chained Visualisation for imported modules #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Awizhey opened this issue Jun 4, 2023 · 1 comment
Closed

Chained Visualisation for imported modules #186

Awizhey opened this issue Jun 4, 2023 · 1 comment

Comments

@Awizhey
Copy link

Awizhey commented Jun 4, 2023

Hi, I am trying to use pydeps to visualise dependencies inside of a huge repository that I am working with.

However, I can only see the modules that are imported into the file I specified as an argument for pydeps (with --include-missing), and not any further dependencies for those imported modules. I want it to be like a recursive function that stops once it finds modules that are not dependent on any other.

Also, I do not want to see detailed dependency graph for installed python modules like mlflow.

Is there a way to achieve this?

@thebjorn
Copy link
Owner

thebjorn commented Jun 4, 2023

The --max-bacon parameter lets you control how many "hops" in the import graph pydeps will follow (default is 2, higer values gives you more of the graph, 0 gives you the entire graph -- although I can't guarantee that graphviz will be able to generate a graph for a very large package).

The --cluster parameter collapses external dependencies into a single node, and you can control it further by using --min-cluster-size and --max-cluster-size, which will control how many nodes there has to be in a sub-graph before it is collapsed.

If pydeps doesn't catch some files that you are interested in, you can either write a dummy file that imports all the modules you're interested in, or call pydeps with on a directory or package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants