29 lines
832 B
Python
29 lines
832 B
Python
|
|
"""Program delivery NextAction strategy — AP2.0a (Gate-Horizont)."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from steering.strategies.next_action.product_milestone_driven import (
|
||
|
|
ProductMilestoneDrivenStrategy,
|
||
|
|
)
|
||
|
|
from steering.strategies.next_action.registry import (
|
||
|
|
get_next_action_strategy,
|
||
|
|
register_next_action_strategy,
|
||
|
|
)
|
||
|
|
|
||
|
|
_strategy = ProductMilestoneDrivenStrategy()
|
||
|
|
|
||
|
|
|
||
|
|
class ProgramDeliveryStrategy:
|
||
|
|
key = "program_delivery"
|
||
|
|
|
||
|
|
def evaluate(self, ctx, *, initiative_id=None, limit=10):
|
||
|
|
return _strategy.evaluate(ctx, initiative_id=initiative_id, limit=limit)
|
||
|
|
|
||
|
|
|
||
|
|
program_delivery_strategy = ProgramDeliveryStrategy()
|
||
|
|
|
||
|
|
|
||
|
|
def register_program_delivery_strategy() -> None:
|
||
|
|
if not get_next_action_strategy(program_delivery_strategy.key):
|
||
|
|
register_next_action_strategy(program_delivery_strategy)
|