Skip to content

angee.compose.appgraph ​

Django AppConfig dependency resolution for composition.

AppGraph ​

python
class AppGraph()

Resolve settings app roots into ordered Django app configs.

resolve also annotates each returned config with composed-graph facts. Runtime addon readers (e.g. the platform console) cannot re-derive those correctly from outside, so the graph's owner records them here and consumers only read:

  • angee_addon_root: whether the project declared this app as a root (True) versus pulling it in only through another app's depends_on closure (False). If a declared root is also another root's dependency, the root declaration wins. The root/dependency split is the source of an addon's "consumer" vs "required" classification.
  • angee_depends_on: an addon's declared dependency names, normalized through :meth:app_dependencies; plain apps carry an empty tuple.
  • angee_forced: whether any other resolved app depends on this one — the composer's reading of "cannot be uninstalled" for addons another installed addon needs. Transitive: A→B→C forces both B and C. A leaf consumer/host root nothing depends on is not forced.

resolve ​

python
def resolve(roots: Iterable[str | AppConfig]) -> tuple[AppConfig, ...]

Return root Django apps plus their depends_on closure, annotated.

app_dependencies ​

python
def app_dependencies(config: AppConfig) -> tuple[str, ...]

Return an addon's declared app dependencies; plain apps have none.

Released under the AGPL-3.0 License.