Skip to content

angee.compose.dependencies

Project dependency projection for the composed addon set.

AddonDependencyGroupResult

python
class AddonDependencyGroupResult(StrEnum)

Describe what dependency projection did for the host project.

skipped

python
@property
def skipped() -> bool

Return whether projection had no host target to inspect or write.

AddonDependencyGroup

python
class AddonDependencyGroup()

Project the composed folder addons into the host dependency group.

A co-located addon.toml marks a folder addon and owns its dependencies; hatch-angee owns parsing, union compilation, discovery, and the round-trip-safe pyproject edit. The normal build adapts the resolved Django app graph through :meth:from_app_configs; the pre-Django bootstrap adapts manifest roots through :meth:from_manifest_roots. Both paths converge on the same manifest compile/write core. Plain Django apps, including the framework core, have no manifest and therefore contribute nothing.

__init__

python
def __init__(manifests: Iterable[AddonManifest], *,
             project_dir: Path | None) -> None

Store the resolved addon manifests and host project directory.

from_app_configs

python
@classmethod
def from_app_configs(cls, addons: Iterable[AppConfig], *,
                     project_dir: Path | None) -> AddonDependencyGroup

Adapt an already-resolved Django app graph into the projector.

from_manifest_roots

python
@classmethod
def from_manifest_roots(cls, roots: Iterable[str],
                        available_manifests: Iterable[AddonManifest], *,
                        project_dir: Path | None) -> AddonDependencyGroup

Resolve root folder addons and their manifest-only dependency closure.

Discovery order is source precedence, so the first manifest for a name wins just as the first importable addon root does during Django boot. Dependencies without manifests are core or ordinary Django apps and do not contribute to the generated dependency group.

pyproject_path

python
@property
def pyproject_path() -> Path | None

Return the host pyproject, if a project directory was discovered.

compile

python
def compile() -> tuple[str, ...]

Compile the enabled folder-addon dependency union without writing.

write

python
def write() -> AddonDependencyGroupResult

Project dependencies and report whether the host changed or was skipped.

check

python
def check() -> AddonDependencyGroupResult

Raise when the host dependency group differs from the compiled union.

Released under the AGPL-3.0 License.