https://github.com/flix-tech/depcheck
Python code quality package that helps in defining and restricting how components of your code may interact
https://github.com/flix-tech/depcheck
clean-architecture deptrac hexagonal-architecture jdepend layered-architecture
Last synced: over 1 year ago
JSON representation
Python code quality package that helps in defining and restricting how components of your code may interact
- Host: GitHub
- URL: https://github.com/flix-tech/depcheck
- Owner: flix-tech
- License: mit
- Created: 2021-04-12T09:56:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-06T09:07:23.000Z (about 3 years ago)
- Last Synced: 2025-03-24T19:39:52.430Z (over 1 year ago)
- Topics: clean-architecture, deptrac, hexagonal-architecture, jdepend, layered-architecture
- Language: Python
- Homepage:
- Size: 98.6 KB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README

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][deptrac] in PHP and [JDepend][jdepend] in Java
## Install
- Via [`poetry`][poetry] (recommended): Install with `poetry add depcheck`
- Via `pip`: Install from [Pypi][pypi-link] via `pip install depcheck`
## Usage
To run via CLI you run:
```shell
depcheck -f
# Or, with poetry
poetry run depcheck -f
```
The `example` directory demonstrates how the tool works.
```shell
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][contribution] document.
[hexagonal-architecture]: https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)
[upgrade-python-version]: ./docs/upgrade-python-version.md
[update-project-dependencies]: ./docs/upgrade-python-version.md
[pypi-link]: https://pypi.org/project/depcheck/
[contribution]: ./CONTRIBUTING.md
[deptrac]: https://github.com/qossmic/deptrac
[jdepend]: https://github.com/clarkware/jdepend
[poetry]: https://python-poetry.org/