Skip to main content

Python code quality package that helps in defining and restricting how components of your code may interact

Project description

Depcheck: Dependency Checker

Depcheck is a command line code-quality tool which supports adopting a layered architecture by making it possible to specify dependency constraints between packages of your own Python application. The tool aims to achieve the same goals as Deptrac in PHP and JDepend in Java

Install

Install from Pypi via pip install depcheck

Usage

Let's say you have a project with the directory structure below:

example
    root
        foo
        bar
        main.py
        __init__.py
    README.md
    .gitignore
    .depcheck.yml

Note: Package directories should contain __init__.py to be recognized as a package.

  • Navigate to the example then run depcheck for your project:
    poetry run depcheck example -f .depcheck.ok.yml  # This should be correct
    poetry run depcheck example -f .depcheck.errors.yml  # This should give errors
    
  • As you can see in the directory structure above, we have .depcheck.yml configuration file in the project directory. If you would like to change the path of the configuration file, use -f or --file argument:
    depcheck root -f /path/to/your/custom/depcheck.yml
    

Contributing

All contributions are welcomed! See our CONTRIBUTING.md document.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

depcheck-0.3.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

depcheck-0.3-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page