wger-project / wger

Self hosted FLOSS fitness/workout, nutrition and weight tracker
https://wger.de
GNU Affero General Public License v3.0
3.15k stars 579 forks source link

Calculate statistics for training session #1624

Open rolandgeider opened 6 months ago

rolandgeider commented 6 months ago

Calculate some simple statistics for each training session:

This can be calculated either for the complete session, for a muscle group or a specifig exercise

AlexChulo commented 5 months ago

Hi, I'd like to work on this issue for my school project. I'm a beginner, and I'd like to implement these statistics for each training session. I'll try to calculate these for the entire session, muscle groups, and specific exercises. Please let me know if you have any other specific requirements. Thanks!

rolandgeider commented 5 months ago

Some more details:

the session data is stored in the WorkoutSession model, which is also were we want to calculate all this. It is perfectly OK to do this on the fly, we don't need to store any results anywere. If we later see that this is needed, we can always cache them or something. We would add a new method statistics that would return a dictionary with the results.

Also note that at the moment there is no foreign key between a session and its corresponding WorkoutLog (this will change once the flexible workout branch is merged). To access the logs they will need to be filtered manually by workout, user and date.