Comments (2)
The --show-deps
flag will ouput the result of the dependency analysis.
The output is something like (very abridged):
"pydeps.arguments": {
"bacon": 1,
"imported_by": [
"__main__",
"pydeps.cli"
],
"imports": [
"pydeps.pycompat"
],
"name": "pydeps.arguments",
"path": "c:\\srv\\lib\\code\\pydeps\\pydeps\\arguments.py"
},
"pydeps.cli": {
"bacon": 1,
"imported_by": [
"__main__",
"pydeps.depgraph",
"pydeps.dot",
"pydeps.dummymodule",
"pydeps.pydeps"
],
"imports": [
"pydeps",
"pydeps.arguments",
"pydeps.pycompat"
],
"name": "pydeps.cli",
"path": "c:\\srv\\lib\\code\\pydeps\\pydeps\\cli.py"
},
There is currently no functionality to start with/import this format, but it seems like a useful feature. The relevant lines from pydeps.py
makes me believe that it would be relatively easy to do as well:
dep_graph = py2depgraph.py2dep(trgt, **kw)
if kw.get('show_deps'):
cli.verbose("DEPS:")
pprint.pprint(dep_graph)
dotsrc = depgraph_to_dotsrc(trgt, dep_graph, **kw)
We should probably define the format to be json to make such a feature useful (and specify a jsonschema, https://json-schema.org/, to make it extra useful).
I don't have the time to do something like this until well after the holidays, but I'm to include it if anyone wants to create a PR.
from pydeps.
Great, thank you for your anwser. I'll play with depgraph_to_dotsrc
and see if I can send a PR with some "import" command/flag.
from pydeps.
Related Issues (20)
- feature: exclude externals deps HOT 5
- Pydeps: Support compiled python filename HOT 2
- [Problem already solved, you can close this]
- The cycles display mode shows useless information and does not work properly for larger projects. HOT 8
- [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
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.