feat: Enhance activity session metrics handling and CSV import logic
- Updated the `ACTIVITY_SESSION_METRICS_EAV_AGENT_GUIDE` with new details on CSV import processes and EAV handling, improving documentation clarity. - Refactored the `_import_activity` function to utilize `apply_activity_mapped_column_aliases`, ensuring proper mapping of training parameters and reducing redundancy. - Introduced validation for numeric bounds in the `activity_csv_registry_updates_from_mapped` function, enhancing data integrity during CSV imports. - Added new utility functions to manage column aliasing and streamline the upsert process for session metrics, preventing duplicate entries. - Implemented unit tests to validate the new aliasing logic and ensure correct behavior during session metrics updates.
This commit is contained in:
1 parent
ca8cee990b
commit
cd29c7d433
7 files changed
+178
-59
No files matched your search
@@ -65,7 +65,13 @@ MODULE_DEFINITIONS: Dict[str, Dict[str, Any]] = {
|
||||
"max": 220,
|
||||
"label_de": "Herzfrequenz max (bpm)",
|
||||
},
|
||||
"rpe": {"type": "int", "required": False, "label_de": "RPE (1–10)"},
|
||||
"rpe": {
|
||||
"type": "int",
|
||||
"required": False,
|
||||
"min": 1,
|
||||
"max": 10,
|
||||
"label_de": "RPE (1–10)",
|
||||
},
|
||||
"notes": {"type": "string", "required": False, "label_de": "Notiz"},
|
||||
},
|
||||
"derive_date_from_datetime_field": "start_time",
|
||||
|
||||
Reference in new issue
Block a user