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

  • Via poetry (recommended): Install with poetry add depcheck
  • Via pip: Install from Pypi via pip install depcheck

Usage

To run via CLI you run:

depcheck <root_dir> -f <config_file>

# Or, with poetry
poetry run depcheck <root_dir> -f <config_file>

The example directory demonstrates how the tool works.

cd example

poetry run depcheck example -f .depcheck.ok.yml  # This should be correct
poetry run depcheck example -f .depcheck.errors.yml  # This should give errors

To understand how to configure the tool, look inside the YML files. The -f argument is optional. Implicitly, the tool will look for .depcheck.yml.

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

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.2.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

depcheck-0.3.2-py3-none-any.whl (7.6 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