Skip to content

angee.compose.appgraph

Django AppConfig dependency resolution for composition.

AppGraph

python
class AppGraph()

Resolve project addon roots into ordered Django app configs.

resolve also annotates each returned config with the composed-graph facts a runtime reader (e.g. the platform console) needs but cannot re-derive correctly from outside — the graph's owner records them here so 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: the addon's declared dependency names, normalized through :meth:app_dependencies (the one parser of that fact).
  • angee_forced: whether any other resolved app depends on this one — the composer's reading of "cannot be uninstalled" (framework core + anything 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 the app names or labels the addon's addon.toml declares.

Released under the AGPL-3.0 License.