tilboerner / depx

Examine and visualize dependencies used by Python modules 🔍
Other
19 stars 3 forks source link
dependencies graph networkx python

Depx

Build Status

Examine and visualize dependencies used by Python modules.

This is a simple, exploratory prototype for now. The goal is to use explicit import statements in a module to identify the names of its dependencies. This will not always produce a complete picture of all other code a module uses, since there is a multitude of ways to import or reference other code dynamically. Idiomatic Django, for example, uses a number of them. Those are all out of scope, however, although some might get considered at a later time.

In this early stage, all functionality, structure and interfaces are subject to radical and surprising changes.

Dev setup

You're going to need Poetry and tox.

After cloning the repo, set up the dev environment:

$ cd depx
$ poetry install --no-root

Run tests:

$ make test

Lint:

$ make lint

Comprehensive test suite:

$ tox

Add dependencies:

$ poetry add [--dev] <PACKAGE_NAME>

Envisioned use cases

The project should enable the following use cases, but might do so by handing off the right kind of data to other software. If we do different things ourselves, they should end up in different commands (or at least subcommands).

Existing and potential functionality

Sketch of ideas. This is not meant as a plan, but to guide initial development.

Find dependencies

Names

Output formats

depx my-awesome-project --format html

The identified dependencies are the edges of a directed graph. Output formats should include several standard ways to consume such data.