added adaptive classes (not tested)
This commit is contained in:
@@ -140,6 +140,7 @@ def workout_summary_to_df(
|
||||
distances = []
|
||||
durations = []
|
||||
weightcategories = []
|
||||
adaptivetypes = []
|
||||
weightvalues = []
|
||||
notes = []
|
||||
tcx_links = []
|
||||
@@ -155,6 +156,7 @@ def workout_summary_to_df(
|
||||
distances.append(w.distance)
|
||||
durations.append(w.duration)
|
||||
weightcategories.append(w.weightcategory)
|
||||
adaptivetypes.append(w.adaptiveclass)
|
||||
weightvalues.append(w.weightvalue)
|
||||
notes.append(w.notes)
|
||||
tcx_link = SITE_URL+'/rowers/workout/{id}/emailtcx'.format(
|
||||
@@ -177,6 +179,7 @@ def workout_summary_to_df(
|
||||
'distance (m)':distances,
|
||||
'duration ':durations,
|
||||
'weight category':weightcategories,
|
||||
'adaptive classification':adaptivetypes,
|
||||
'weight (kg)':weightvalues,
|
||||
'notes':notes,
|
||||
'Stroke Data TCX':tcx_links,
|
||||
@@ -742,7 +745,8 @@ def create_row_df(r,distance,duration,startdatetime,workouttype='rower',
|
||||
avghr=None,avgpwr=None,avgspm=None,
|
||||
rankingpiece = False,
|
||||
duplicate=False,
|
||||
title='Manual entry',notes='',weightcategory='hwt'):
|
||||
title='Manual entry',notes='',weightcategory='hwt',
|
||||
adaptiveclass='None'):
|
||||
|
||||
if duration is not None:
|
||||
totalseconds = duration.hour*3600.
|
||||
@@ -832,6 +836,8 @@ def create_row_df(r,distance,duration,startdatetime,workouttype='rower',
|
||||
dosmooth=False,
|
||||
workouttype=workouttype,
|
||||
consistencychecks=False,
|
||||
weightcategory=weightcategory,
|
||||
adaptiveclass=adaptiveclass,
|
||||
totaltime=totalseconds)
|
||||
|
||||
return (id, message)
|
||||
@@ -841,6 +847,8 @@ from utils import totaltime_sec_to_string
|
||||
# Processes painsled CSV file to database
|
||||
def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
||||
boattype='1x',
|
||||
adaptiveclass='None',
|
||||
weightcategory='hwt',
|
||||
dosummary=True, title='Workout',
|
||||
workoutsource='unknown',
|
||||
notes='', totaldist=0, totaltime=0,
|
||||
@@ -1046,7 +1054,8 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
||||
workouttype=workouttype,
|
||||
boattype=boattype,
|
||||
duration=duration, distance=totaldist,
|
||||
weightcategory=r.weightcategory,
|
||||
weightcategory=weightcategory,
|
||||
adaptiveclass=adaptiveclass,
|
||||
starttime=workoutstarttime,
|
||||
duplicate=duplicate,
|
||||
workoutsource=workoutsource,
|
||||
|
||||
Reference in New Issue
Block a user