Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Deply #2634

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Deply #2634

wants to merge 1 commit into from

Conversation

Vashkatsi
Copy link

@Vashkatsi Vashkatsi commented Dec 25, 2024

Deply - Enforce architectural patterns and layer-based rules with a straightforward YAML config

What is this Python project?

Deply is a standalone Python tool that inspects your codebase and validates whether it follows predefined architectural rules. You can define layers (e.g., views, models, services) and restrict the ways these layers interact using a YAML configuration. Deply parses your Python files to check import statements, class inheritance, decorator usage, file organization, and more—flagging any violations that don't adhere to your architecture guidelines.

Key Features

  • Layer-Based Analysis: Organize code into logical layers to keep your architecture modular and clean.
  • Flexible Collectors: Define how classes, functions, or decorators get grouped into layers using regex, inheritance checks, or file patterns.
  • Rich Rule System: Enforce naming conventions, prohibit certain layers from referencing others, require specific decorators, and more.
  • Configuration-Driven: A YAML-based approach means no additional test files; just define your rules in one config.
  • Performance & CI Integration: Runs efficiently on large projects and can fail a build if it detects unwanted dependencies or naming violations.

What's the difference between this Python project and similar ones?

1. Goes Beyond Imports

  • Deply checks not just import hierarchies (like import-linter) but also class inheritance, file-based patterns, and decorator usage. This gives teams a more holistic way to enforce architectural rules.

2. Stand-Alone vs. Pytest Hooks

  • Tools like pytest-archon or pytestarch may require test cases. Deply is fully configuration-driven and can be integrated into any CI pipeline without modifying test suites.

3. Layered Approach

  • Many code analysis tools focus on code style or static typing. Deply focuses on enforcing your chosen high-level design principles, ensuring your architecture doesn't degrade over time.

4. Intuitive YAML Config

  • By using a straightforward YAML config, Deply is easier to integrate into existing developer workflows. No extra coding is needed for rule definitions.

Links


Anyone who agrees with this pull request could submit an Approve review to it.

deply - Enforce architectural patterns and layer-based rules with a straightforward YAML config.
@lucabotti
Copy link

Any link to the project?

@Vashkatsi
Copy link
Author

Any link to the project?

Added in the description.

GitHub: https://github.com/Vashkatsi/deply
PyPI: https://pypi.org/project/deply/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants