feat: Phase 0c - migrate scores calculations to data_layer (14 functions)
- Created NEW data_layer/scores.py with all 14 scoring functions - Functions: Focus weights & mapping (get_user_focus_weights, get_focus_area_category, map_focus_to_score_components, map_category_de_to_en) - Functions: Category weight calculation - Functions: Progress scores (goal progress, health stability) - Functions: Health score helpers (blood pressure, sleep quality scorers) - Functions: Data quality score - Functions: Top priority/focus (get_top_priority_goal, get_top_focus_area, calculate_focus_area_progress) - Functions: Category progress - Updated data_layer/__init__.py to import scores module and export 12 functions - Refactored placeholder_resolver.py to import scores from data_layer Module 5/6 complete. Single Source of Truth for scoring metrics established. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
2bc1ca4daf
commit
dba6814bc2
3 files changed
+601
-4
No files matched your search
@@ -34,6 +34,7 @@ from .nutrition_metrics import *
|
||||
from .activity_metrics import *
|
||||
from .recovery_metrics import *
|
||||
from .health_metrics import *
|
||||
from .scores import *
|
||||
|
||||
# Future imports (will be added as modules are created):
|
||||
# from .goals import *
|
||||
@@ -134,4 +135,18 @@ __all__ = [
|
||||
'get_resting_heart_rate_data',
|
||||
'get_heart_rate_variability_data',
|
||||
'get_vo2_max_data',
|
||||
|
||||
# Scoring Metrics
|
||||
'get_user_focus_weights',
|
||||
'get_focus_area_category',
|
||||
'map_focus_to_score_components',
|
||||
'map_category_de_to_en',
|
||||
'calculate_category_weight',
|
||||
'calculate_goal_progress_score',
|
||||
'calculate_health_stability_score',
|
||||
'calculate_data_quality_score',
|
||||
'get_top_priority_goal',
|
||||
'get_top_focus_area',
|
||||
'calculate_focus_area_progress',
|
||||
'calculate_category_progress',
|
||||
]
|
||||
Reference in new issue
Block a user