feat: Phase 0c - migrate body_metrics calculations to data_layer (20 functions)
- Migrated all 20 calculation functions from calculations/body_metrics.py to data_layer/body_metrics.py - Functions: weight trends (7d median, 28d/90d slopes, goal projection, progress) - Functions: body composition (FM/LBM changes) - Functions: circumferences (waist/hip/chest/arm/thigh deltas, WHR) - Functions: recomposition quadrant - Functions: scoring (body progress, data quality) - Updated data_layer/__init__.py with 20 new exports - Refactored placeholder_resolver.py to import body_metrics from data_layer Module 1/6 complete. Single Source of Truth for body metrics established. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
26110d44b4
commit
504581838c
3 files changed
+537
-3
No files matched your search
@@ -44,12 +44,30 @@ __all__ = [
|
||||
'calculate_confidence',
|
||||
'serialize_dates',
|
||||
|
||||
# Body Metrics
|
||||
# Body Metrics (Basic)
|
||||
'get_latest_weight_data',
|
||||
'get_weight_trend_data',
|
||||
'get_body_composition_data',
|
||||
'get_circumference_summary_data',
|
||||
|
||||
# Body Metrics (Calculated)
|
||||
'calculate_weight_7d_median',
|
||||
'calculate_weight_28d_slope',
|
||||
'calculate_weight_90d_slope',
|
||||
'calculate_goal_projection_date',
|
||||
'calculate_goal_progress_pct',
|
||||
'calculate_fm_28d_change',
|
||||
'calculate_lbm_28d_change',
|
||||
'calculate_waist_28d_delta',
|
||||
'calculate_hip_28d_delta',
|
||||
'calculate_chest_28d_delta',
|
||||
'calculate_arm_28d_delta',
|
||||
'calculate_thigh_28d_delta',
|
||||
'calculate_waist_hip_ratio',
|
||||
'calculate_recomposition_quadrant',
|
||||
'calculate_body_progress_score',
|
||||
'calculate_body_data_quality',
|
||||
|
||||
# Nutrition Metrics
|
||||
'get_nutrition_average_data',
|
||||
'get_nutrition_days_data',
|
||||
|
||||
Reference in new issue
Block a user