-
Notifications
You must be signed in to change notification settings - Fork 109
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
Not detecting imports in python file and questions #28
Comments
Which version (
If I remember correctly, then graphviz/dot has a limitation of 1000 nodes (or maybe it was 10 000), and if you hit that limit there will be no output.
The color assignment is done here https://github.com/thebjorn/pydeps/blob/master/pydeps/colors.py#L47 (it uses the part before the first dot in the module name and adjusts saturation depending on how many arrows go in/out of the node). Early versions of pydeps tried to use different colors for different modules, but my implementation(s) didn't work that well. Maybe you'll have better luck..?
Yes, check e.g. https://github.com/thebjorn/pydeps/blob/master/tests/test_cli.py#L25
I would suggest starting without any flags, i.e. PS: Python is not designed to support running scripts from sub-folders (mostly because Guido doesn't like it), so you're fighting against the system when you try to run a script that is two levels deep. In particular, you need to use absolute imports (like you're doing: The solution is to create a |
Thank you for your quick reply. |
I tried without any flag and pydeps finds nothing for |
Does |
With
With
|
Hmm.. I'm afraid I can't reproduce what you're seeing. I've created the following directory tree:
with the following contents:
If you grab With the above, and the following command:
or commands (I set the
I can look at it further if you can change the code above to demonstrate your problem, and then attach the output of |
I tried your example and I obtained the same result. For my case, I created a minimal example that reproduce the issue REPET_linux-x64-2.5.zip. You'll notice that the script is working for |
I'm guessing that is because you have syntax errors in that file:
|
You're absolutely right, it's Thank you for your time. |
Hi,
I run pydeps on my file with this following command line (with different parameters) :
pydeps JobScriptTemplate.py --max-bacon 6 --noise-level 2 --pylib
There is some imports in my file but it detects nothing, the graph is empty.
This file comes from a package and it imports a class from another directory in this package.
It imports :
The directory 'commons' is like :
and my file is on '/core/launcher' (each directory has a init.py file).
Morever I don't really understand the difference between --max-bacon and --noise-level. What is the effect of noise-level on max-bacon ?
I'm wondering if I can attribute a color for a folder level. How can I do this ? Because I want to run pydeps on different folders and I want to keep the same color for each folder.
And can I import and use pydeps in a python script ? I don't find any constructor in pydeps sources.
I thank you in advance for your help.
Mariene
The text was updated successfully, but these errors were encountered: