You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update architecture diagram and AGENTS.md for composition refactoring
Replace the old SubProject inheritance model (ArchiveSubProject/GitSubproject/
SvnSubproject each implementing abstract SubProject) with the new composition
design: SubProject composes with a Fetcher; Fetcher and VcsFetcher as protocols;
AbstractVcsFetcher as shared ABC; GitFetcher and SvnFetcher implementing
VcsFetcher; ArchiveFetcher implementing Fetcher only.
Update AGENTS.md to describe the concrete SubProject aggregate and direct
developers to implement Fetcher/VcsFetcher protocols when adding new backends.
https://claude.ai/code/session_01BMSF8XFAxV6hABQgL7RZ3z
-**`dfetch/__main__.py`** — CLI entry point; builds argparse subcommands and dispatches
72
72
-**`dfetch/commands/`** — One file per CLI command (e.g., `update.py`, `check.py`); all inherit from `command.py`'s abstract `Command` base
73
73
-**`dfetch/manifest/`** — YAML manifest loading/writing with `strictyaml` schema validation; `manifest.py` is the main handler
74
-
-**`dfetch/project/`** — Abstract `Subproject`/`Superproject` classes with concrete Git, SVN, and Archive implementations; factory functions `create_sub_project()` and `create_super_project()` are the main entry points
74
+
-**`dfetch/project/`** — Concrete `SubProject` domain aggregate that composes with a `Fetcher`; `GitFetcher`, `SvnFetcher`, and `ArchiveFetcher` implement the `Fetcher`/`VcsFetcher` protocols defined in `fetcher.py`; factory functions `create_sub_project()` and `create_super_project()` are the main entry points
75
75
-**`dfetch/vcs/`** — Low-level VCS operations: `git.py`, `svn.py`, `archive.py` (with hash verification in `integrity_hash.py`), and `patch.py`
76
76
-**`dfetch/reporting/`** — Output formatters; check results can be emitted as stdout, Jenkins JSON, SARIF, or Code Climate format; SBOM output uses CycloneDX format
Implement the abstract interfaces in `dfetch/project/subproject.py` and `dfetch/vcs/` and register via the factory in `dfetch/project/`.
87
+
Implement the `Fetcher` protocol (or `VcsFetcher` if you need branch/tag/revision semantics) defined in `dfetch/project/fetcher.py`, add a concrete class in `dfetch/project/`, add low-level VCS operations in `dfetch/vcs/`if needed, and register via the factory in `dfetch/project/__init__.py`.
0 commit comments