Architecture

DFetch has grown significantly. Below is a description of its internals.

These diagrams are based on Simon Brown’s C4-model.

The layer boundaries shown in the diagrams are enforced at development time by import-linter. The contracts are configured in pyproject.toml under [tool.importlinter]. Run lint-imports to verify them locally. Dependencies must remain unidirectional and follow this order:

dfetch.commands
     ↓
dfetch.reporting
     ↓
dfetch.project
     ↓
dfetch.manifest  (independent of dfetch.vcs)
dfetch.vcs       (independent of dfetch.manifest)
     ↓
dfetch.util  (independent of dfetch.log)
dfetch.log   (independent of dfetch.util)

C1 - Context

../_images/3b53cc3e43bb6ee5da008240f94383de8e9055ddcd1bd5cd81e09416488d8e2f.png

C2 - Containers

../_images/444f47f4112d97eb0a3c030453801ea405a9d02a7c5c16ffc2fc29841a0763dc.png

C3 - Components

Commands

../_images/04712593f908b1f2a881755990467ee888cda70df68a4fd40a52c6ccfef8fb65.png

Manifest

Error

Project

../_images/46422ab640bcc672b4604ae2be9451958ec1a013d82d06dd0d16b9af2789ff37.png