context
Builds and manages the rendering context.
Classes¶
Functions¶
build_context
¶
build_context(
composition: Composition,
ui: Callable,
initial_context: Optional[dict] = None,
) -> dict
Build the context for the composition.
- set running_context to starting_context (the default from project forge)
- render composition’s extra_context using running_context
- update running_context with composition’s extra_context
- for each overlay - process_overlay - update running_context with the result of process_overlay
PARAMETER | DESCRIPTION |
---|---|
composition
|
The composition configuration.
TYPE:
|
ui
|
A callable that takes question information and returns the result from the user interface.
TYPE:
|
initial_context
|
The initial context to add to the context. |
RETURNS | DESCRIPTION |
---|---|
dict
|
A dictionary |
update_context
¶
update_context(
merge_keys: Mapping[str, MergeMethods],
left: dict,
right: dict,
) -> dict
Return a dict where the left is updated with the right according to the composition rules.