Comments (3)
Hi @androa and thank you for your interest in pydeps. Could you explain a bit more how you would like the graph filtered? I'm assuming you mean depth to mean the number of directories counted from the root of your app..? There are -x
flags to exclude parts of the graph, --max-bacon
to limit the number of "import" hops, and there is also a new --cluster
flag, but that is mostly for external modules...
from pydeps.
That is correct. I think I've managed to get where I wanted by --max-bacon 1
. The graph is still rather massive though. Which leads me into another question; is it possible to control the colors somehow? There is now two shades of red (which I don't quite understand the difference between), but it would very helpful to either out of the box get different colors for each module, or control it somehow (f.ex. a pattern that tells which items should be in different colors).
from pydeps.
Ok, good to know. I have min/max-depth functionality that works that way on an internal tool that's used for inter-module dependency analysis. It's a bit complex, but I'll see about moving it over to pydeps.
The current color algorithm takes the number of root nodes (in this context what is before the first dot in the module name), then it divides the H part of the HSL color space's 360 degrees by the number of root nodes to get the initial set of colors. Each Hue "angle" is then adjusted in the Saturation and Lightness dimensions by the in/out connectedness of a node. With many root-nodes, and because of deficiencies of the HSL color model (https://en.wikipedia.org/wiki/HSL_and_HSV#Disadvantages), this can lead to colors that are perceptually very similar.
Of the many algorithms I've tried, this has been the least sucky one... it has room for improvement ;-)
Feel free to add any ideas or suggestions to issue #34.
from pydeps.
Related Issues (20)
- [Feature Request] Specify module name instead of filename HOT 4
- Resolving relative dependencies? HOT 7
- Support for namespace packages HOT 1
- use of `--externals` results in TypeError: 'Config' object does not support item assignment HOT 1
- --dot-output option is not effective HOT 1
- Support output markdown mermaid HOT 1
- empty result with WARNING: SKIPPING ILLEGAL MODULE_NAME: D:.test.a HOT 2
- Support for specifying more than one `fname`
- 1.12.19: pitest fails in `tests/test_package_names.py::test_find_package_names` unit HOT 2
- `--exclude` option not working HOT 1
- Show only top-level imports HOT 1
- Exclude/include dependencies by filepath HOT 1
- Add type hints HOT 1
- Use of pydeps in CI to reject introduction of new import cycles? HOT 3
- Constrain output geometry / size HOT 2
- pydeps randomly generates compiled pyc files when examine python source file HOT 4
- Support for editable packages / direct_url.json HOT 10
- Different types of imports get disconnected. HOT 3
- Feature Request: Pydeps for pipelines HOT 2
- Option to ignore modules in the graph HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydeps.