Spaces:
Running
Running
| from typing import Optional, Dict, Any | |
| import uuid | |
| class GoalProgressService: | |
| """ | |
| Service to compute goal progress statistics. | |
| """ | |
| def compute(self, goal_service, goal, weekly_snapshot, period_comparison=None) -> Optional[Dict[str, Any]]: | |
| """ | |
| Computes goal progress for a runner. | |
| """ | |
| if not goal: | |
| return None | |
| return goal_service.compute_goal_progress(goal, weekly_snapshot, period_comparison) | |