feat: Update placeholder metadata and nutrition metrics
- Adjusted the total number of placeholders from 116 to 114 across various documentation and code files to reflect the current state of the system. - Enhanced TDEE calculation logic in `nutrition_metrics.py` to prioritize Mifflin–St Jeor BMR with PAL when demographic data is available, with a fallback to a weight-based estimate. - Updated placeholder registrations to ensure consistency with the new metadata structure and improved data handling. - Revised documentation to clarify the authoritative source of placeholder metadata and the implications of the changes on existing functionalities. These updates improve the accuracy and consistency of the placeholder system and enhance the nutritional assessment capabilities within the application.
This commit is contained in:
1 parent
2ea5f905c4
commit
052ba195cc
11 files changed
+159
-77
No files matched your search
@@ -18,7 +18,7 @@ This document establishes **mandatory governance rules** for placeholder managem
|
||||
## 2. Scope
|
||||
|
||||
These guidelines apply to:
|
||||
- All 116 existing placeholders
|
||||
- All 114 existing placeholders (canonical: `PLACEHOLDER_MAP`)
|
||||
- All new placeholders
|
||||
- All modifications to existing placeholders
|
||||
- All placeholder deprecations
|
||||
|
||||
@@ -79,7 +79,7 @@ curl -s -H "X-Auth-Token: $TOKEN" \
|
||||
**Expected response:**
|
||||
```json
|
||||
{
|
||||
"total_placeholders": 116,
|
||||
"total_placeholders": 114,
|
||||
"available": 98,
|
||||
"missing": 18,
|
||||
"by_type": {
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
## Executive Summary
|
||||
|
||||
This document summarizes the complete implementation of the normative placeholder metadata system for Mitai Jinkendo. The system provides a comprehensive, standardized framework for managing, documenting, and validating all 116 placeholders in the system.
|
||||
This document summarizes the complete implementation of the normative placeholder metadata system for Mitai Jinkendo. The system provides a comprehensive, standardized framework for managing, documenting, and validating all 114 placeholders in the system.
|
||||
|
||||
**Key Achievements:**
|
||||
- ✅ Complete metadata schema (normative compliant)
|
||||
- ✅ Automatic metadata extraction
|
||||
- ✅ Manual curation for 116 placeholders
|
||||
- ✅ Manual curation for 114 placeholders
|
||||
- ✅ Extended export API (non-breaking)
|
||||
- ✅ Catalog generator (4 documentation files)
|
||||
- ✅ Validation & testing framework
|
||||
@@ -75,7 +75,7 @@ This document summarizes the complete implementation of the normative placeholde
|
||||
|
||||
### 1.3 Complete Metadata Definitions
|
||||
|
||||
#### `backend/placeholder_metadata_complete.py` (220 lines, expandable to all 116)
|
||||
#### `backend/placeholder_metadata_complete.py` (220 lines, expandable to all 114)
|
||||
|
||||
**Purpose:** Manually curated, authoritative metadata for all placeholders
|
||||
|
||||
@@ -106,7 +106,7 @@ PlaceholderMetadata(
|
||||
|
||||
**Key Features:**
|
||||
- Hand-curated for accuracy
|
||||
- Complete for all 116 placeholders
|
||||
- Complete for all 114 placeholders
|
||||
- Serves as authoritative source
|
||||
- Normative compliant
|
||||
|
||||
@@ -285,7 +285,7 @@ pytest backend/tests/test_placeholder_metadata.py -v
|
||||
v
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Complete Registry │
|
||||
│ (116 placeholders with full metadata) │
|
||||
│ (114 placeholders with full metadata) │
|
||||
└──────────┬──────────────────────────────────────────────────┘
|
||||
│
|
||||
├──> Generation Scripts (generate_*.py)
|
||||
@@ -309,7 +309,7 @@ pytest backend/tests/test_placeholder_metadata.py -v
|
||||
### 3.1 Metadata Extraction Flow
|
||||
|
||||
```
|
||||
1. PLACEHOLDER_MAP (116 entries)
|
||||
1. PLACEHOLDER_MAP (114 entries)
|
||||
└─> extract_resolver_name()
|
||||
└─> analyze_data_layer_usage()
|
||||
└─> infer_type/time_window/output_type()
|
||||
@@ -468,7 +468,7 @@ curl -H "X-Auth-Token: <token>" \
|
||||
|
||||
# Output:
|
||||
{
|
||||
"total_placeholders": 116,
|
||||
"total_placeholders": 114,
|
||||
"available": 98,
|
||||
"missing": 18,
|
||||
"by_type": {
|
||||
@@ -599,7 +599,7 @@ The system is designed for extensibility:
|
||||
## 8. Compliance Checklist
|
||||
|
||||
✅ **Normative Standard Compliance:**
|
||||
- All 116 placeholders inventoried
|
||||
- All 114 placeholders inventoried
|
||||
- Complete metadata schema implemented
|
||||
- Validation framework in place
|
||||
- Non-breaking export API
|
||||
|
||||
Reference in new issue
Block a user