begin of unit tests
This commit is contained in:
@@ -780,8 +780,6 @@ def boxplotdata(workouts,options):
|
||||
# prepare data frame
|
||||
datadf,extracols = dataprep.read_cols_df_sql(ids,fieldlist)
|
||||
|
||||
|
||||
|
||||
datadf = dataprep.clean_df_stats(datadf,workstrokesonly=workstrokesonly)
|
||||
|
||||
datadf = dataprep.filter_df(datadf,'spm',spmmin,
|
||||
@@ -1686,7 +1684,7 @@ def performancemanager_view(request,userid=0,mode='rower',
|
||||
dofatigue = dofatigue,
|
||||
showtests = True,
|
||||
)
|
||||
|
||||
|
||||
ids = pd.Series(ids).dropna().values
|
||||
|
||||
bestworkouts = Workout.objects.filter(id__in=ids).order_by('date')
|
||||
@@ -5248,16 +5246,19 @@ def history_view_data(request,userid=0):
|
||||
time_min = datetime.time(hour=0,minute=0,second=0)
|
||||
time_max = datetime.time(hour=23,minute=59,second=59)
|
||||
|
||||
startdate = timezone.now()-datetime.timedelta(days=14)
|
||||
enddate = timezone.now()
|
||||
activity_enddate = usertimezone.localize(timezone.datetime.combine(enddate.date(),time_max))
|
||||
activity_startdate = usertimezone.localize(timezone.datetime.combine(startdate.date(),time_min))
|
||||
|
||||
|
||||
if request.GET.get('startdate'):
|
||||
startdate = datetime.datetime.strptime(request.GET.get('startdate'),"%Y-%m-%d")
|
||||
enddate = datetime.datetime.strptime(request.GET.get('enddate'),"%Y-%m-%d")
|
||||
activity_startdate = usertimezone.localize(timezone.datetime.combine(startdate,time_min))
|
||||
|
||||
if request.GET.get('enddate'):
|
||||
enddate = datetime.datetime.strptime(request.GET.get('enddate'),"%Y-%m-%d")
|
||||
activity_enddate = usertimezone.localize(timezone.datetime.combine(enddate,time_max))
|
||||
else:
|
||||
activity_enddate = timezone.now()
|
||||
activity_enddate = usertimezone.localize(timezone.datetime.combine(activity_enddate.date(),time_max))
|
||||
startdate = timezone.now()-datetime.timedelta(days=14)
|
||||
activity_startdate = usertimezone.localize(timezone.datetime.combine(startdate.date(),time_min))
|
||||
|
||||
|
||||
typeselect = 'All'
|
||||
@@ -5386,7 +5387,6 @@ def history_view_data(request,userid=0):
|
||||
ddf = dataprep.clean_df_stats(ddf,workstrokesonly=True,
|
||||
ignoreadvanced=True)
|
||||
|
||||
|
||||
totalscript, totaldiv = interactive_hr_piechart(
|
||||
ddf,r,mytypes.workouttypes_ordered[typeselect],
|
||||
totalseconds=totalseconds)
|
||||
|
||||
Reference in New Issue
Block a user