New precise activity and break inputs
Added new Activity types:
Added a logic to parse new specific inputs:
-
breaks if
self.specific_breaks != []
- parse a list of dictionaries with astart_time
andfinish_time
keys - format[{"start_time": "10:00", "finish_time": "11:00"}, ...]
. Otherwise keep the traditional logic for the breaks. -
precise activities if
self.precise_activity != {}
parse a dictionary with two keys,physical_activity
andrespiratory_activity
- in which the former value is a single string, while the latter is a list of dictionaries, with the keystype
andpercentage
- format{"physical_activity": "Light activity", "respiratory_activity": [{"type": "Breathing", "percentage": 100}, ...]}
. The sum of all the respiratory activity percentages should be100
. Ifself.precise_activity == {}
, keep the traditional logic for theself.activity_type
.
It was added a logic for data validation for each new input, as well as a test.
These new inputs will be needed once the ARIA project is ready to connect with CAiMIRA model.
Edited by Luis Aleixo