feat: Phase 0c - migrate recovery_metrics calculations to data_layer (16 functions)
- Migrated all 16 calculation functions from calculations/recovery_metrics.py to data_layer/recovery_metrics.py - Functions: Recovery score v2 (main + 7 helper scorers) - Functions: HRV vs baseline (percentage calculation) - Functions: RHR vs baseline (percentage calculation) - Functions: Sleep metrics (avg duration 7d, sleep debt, regularity proxy, quality 7d) - Functions: Load balance (recent 3d) - Functions: Data quality assessment - Updated data_layer/__init__.py with 9 new exports - Refactored placeholder_resolver.py to import recovery_metrics from data_layer Module 4/6 complete. Single Source of Truth for recovery metrics established. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc34d3d2f2
commit
2bc1ca4daf
3 files changed
+603
-5
No files matched your search
@@ -114,11 +114,22 @@ __all__ = [
|
||||
'calculate_vo2max_trend_28d',
|
||||
'calculate_activity_data_quality',
|
||||
|
||||
# Recovery Metrics
|
||||
# Recovery Metrics (Basic)
|
||||
'get_sleep_duration_data',
|
||||
'get_sleep_quality_data',
|
||||
'get_rest_days_data',
|
||||
|
||||
# Recovery Metrics (Calculated)
|
||||
'calculate_recovery_score_v2',
|
||||
'calculate_hrv_vs_baseline_pct',
|
||||
'calculate_rhr_vs_baseline_pct',
|
||||
'calculate_sleep_avg_duration_7d',
|
||||
'calculate_sleep_debt_hours',
|
||||
'calculate_sleep_regularity_proxy',
|
||||
'calculate_recent_load_balance_3d',
|
||||
'calculate_sleep_quality_7d',
|
||||
'calculate_recovery_data_quality',
|
||||
|
||||
# Health Metrics
|
||||
'get_resting_heart_rate_data',
|
||||
'get_heart_rate_variability_data',
|
||||
|
||||
Reference in new issue
Block a user